Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
e53060f
Tailwind Update
Saccyx Jul 7, 2025
cea3bd5
Tailwind Conversion p2
Saccyx Jul 7, 2025
661f42a
Font addition and Title changes
Saccyx Jul 14, 2025
1b642ab
Background colors fixed
Saccyx Jul 14, 2025
e174d6a
Fonts Fixed
Saccyx Jul 22, 2025
e58355f
Dark Mode Finished
Saccyx Jul 22, 2025
53d8db5
Search Bar Changes + Backend fix
Saccyx Jul 29, 2025
2f6386f
tailwind conversion
Saccyx Aug 8, 2025
ad9fb8c
Slight update to the images on the calandar
winsonlin21 Aug 12, 2025
b07f5b6
NavBar Conversion to Tailwind + UI Chnages to Single Event Page
Saccyx Aug 15, 2025
caae735
SearchBar Conversion to Tailwind
Saccyx Aug 15, 2025
a627867
Carousel Tailwind Conversion
Saccyx Aug 15, 2025
3114543
Added a slider on the calandar
winsonlin21 Sep 16, 2025
ac9de3b
added a 3 day view
winsonlin21 Sep 23, 2025
00bedb5
added mobile fiexes
winsonlin21 Sep 23, 2025
d3d5ce8
final tweaks for calandar
winsonlin21 Sep 23, 2025
69d8962
Fixed mobile
winsonlin21 Sep 26, 2025
cb37fd7
Final polish of the calaandar page.
winsonlin21 Sep 30, 2025
46c0464
About me page finsihed
winsonlin21 Oct 3, 2025
f2c06fc
Temporary Experiemnt with ISC
winsonlin21 Oct 14, 2025
2c75f64
fixing the mobile ui
winsonlin21 Oct 17, 2025
0292126
Revert "About me page finsihed"
winsonlin21 Oct 21, 2025
38b18e0
Reapply "About me page finsihed"
winsonlin21 Oct 21, 2025
d6a271f
Revert "Temporary Experiemnt with ISC"
winsonlin21 Oct 21, 2025
2c890a9
Finished mobile tweakinig
winsonlin21 Oct 21, 2025
8e95337
Merge branch 'events-page-test' into new-UI-2025
winsonlin21 Oct 21, 2025
d13c4f0
Working on home page
winsonlin21 Oct 24, 2025
694e322
Home page tweaks
winsonlin21 Oct 28, 2025
a16f352
Finished hte desktop light and dark mode
winsonlin21 Oct 31, 2025
bb7bb77
Started working on home page mobile
winsonlin21 Oct 31, 2025
8a18079
Mobile tweaks
winsonlin21 Nov 4, 2025
f2cf5f8
Finished mobile
winsonlin21 Nov 7, 2025
812ed30
Merge branch 'Home-page' into new-UI-2025
winsonlin21 Nov 11, 2025
08cf904
Quick spacing change
winsonlin21 Nov 12, 2025
5b88d00
Revert "NavBar Conversion to Tailwind + UI Chnages to Single Event Page"
winsonlin21 Nov 14, 2025
42647aa
Atttemppts at coloring
winsonlin21 Nov 14, 2025
1bc3473
Added the corect colors to teh top bar
winsonlin21 Nov 18, 2025
75c25b3
Final resizes
winsonlin21 Dec 4, 2025
d653cee
Finsihed fixing the footer colors
winsonlin21 Dec 4, 2025
bd14371
fixed issue with encoded data
winsonlin21 Dec 6, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1,622 changes: 953 additions & 669 deletions rpi-eventhub/backend/package-lock.json

Large diffs are not rendered by default.

71 changes: 38 additions & 33 deletions rpi-eventhub/frontend/src/components/Carousel/Carousel.jsx
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
import React, { useState, useEffect, useRef, useCallback } from "react";
import styles from "./Carousel.module.css";
import "bootstrap-icons/font/bootstrap-icons.css";
import axios from "axios";
import { Skeleton } from "@mui/material";
import config from "../../config";
import { DateTime } from "luxon";
import { useColorScheme } from '../../hooks/useColorScheme';


const placeholderImage =
"https://upload.wikimedia.org/wikipedia/commons/thumb/6/65/No-Image-Placeholder.svg/1665px-No-Image-Placeholder.svg.png";

const timeZone = 'America/New_York';
const timeZone = "America/New_York";

const formatDateAsEST = (utcDateString) => {
if (!utcDateString) return "Date not specified";

const dateTime = DateTime.fromISO(utcDateString, { zone: 'utc' }).setZone(timeZone);
return dateTime.toFormat('MMMM dd, yyyy');
const dateTime = DateTime.fromISO(utcDateString, { zone: "utc" }).setZone(timeZone);
return dateTime.toFormat("MMMM dd, yyyy");
};

const formatTimeAsEST = (utcDateString) => {
if (!utcDateString) return 'Time not specified';

const dateTime = DateTime.fromISO(utcDateString, { zone: 'utc' }).setZone(timeZone);
return dateTime.toFormat('h:mm a');
if (!utcDateString) return "Time not specified";
const dateTime = DateTime.fromISO(utcDateString, { zone: "utc" }).setZone(timeZone);
return dateTime.toFormat("h:mm a");
};

const ImageCarousel = () => {
const [events, setEvents] = useState([]);
const [activeIndex, setActiveIndex] = useState(0);
const [isLoading, setIsLoading] = useState(true);
const intervalRef = useRef(null);
const { isDark } = useColorScheme();


useEffect(() => {
const fetchEvents = async () => {
try {
const response = await axios.get(`${config.apiUrl}/events`);

const sortedEvents = response.data
.map((event) => ({
src: event.image || placeholderImage,
Expand All @@ -48,32 +48,25 @@ const ImageCarousel = () => {
originalDate: event.startDateTime || event.date,
likes: event.likes || 0,
}))

.filter( a => new Date(a.originalDate) - new Date > 0)
.filter((a) => new Date(a.originalDate) - new Date() > 0)
.sort((a, b) => b.likes - a.likes)

.slice(0, 5);

setEvents(sortedEvents);
setIsLoading(false);
} catch (error) {
console.error("Failed to fetch events:", error);
}
};

fetchEvents();
}, []);

const goToNext = useCallback(() => {
setActiveIndex((current) =>
current === events.length - 1 ? 0 : current + 1
);
setActiveIndex((current) => (current === events.length - 1 ? 0 : current + 1));
}, [events.length]);

const goToPrev = useCallback(() => {
setActiveIndex((current) =>
current === 0 ? events.length - 1 : current - 1
);
setActiveIndex((current) => (current === 0 ? events.length - 1 : current - 1));
}, [events.length]);

const resetTimer = useCallback(() => {
Expand All @@ -95,55 +88,67 @@ const ImageCarousel = () => {
return (
<div
className="carousel"
onMouseEnter={pauseAutoplay} // pause carousel when on hover
onMouseEnter={pauseAutoplay}
onMouseLeave={resetTimer}
style={{
backgroundColor: "#AB2328",
width: "100%",
maxWidth: "100%",
maxHeight: "100%",
display: "flex",
justifyContent: "center",
alignItems: "center",
height: "100%",
}}
>
<div className={styles.carousel}>
<div className={styles.mainImage}>
<div className="relative flex flex-col justify-center items-center w-4/5 mx-auto">
{isLoading ? (
<div>
<Skeleton variant="rectangular" width={420} height={580} />
<Skeleton variant="text" width={300} />
<Skeleton variant="text" width={200} />
</div>
) : (
) : (
events.length > 0 && (
<div className={styles.carouselCard}>
<div className={styles.captionAbove}>
<div className="flex flex-col justify-center items-center w-full h-full">
<div className={`w-full max-w-[750px] ${isDark ? 'text-[#272727]' : 'text-[#FFFFFF]'} text-[275%] font-bold text-center p-2 px-5 mb-2 rounded-lg whitespace-nowrap overflow-hidden text-ellipsis`} title={events[activeIndex].caption}>
{events[activeIndex].caption}
</div>
<button
onClick={() => {
goToPrev();
resetTimer();
}}
className={styles.prevButton}
className={`absolute top-1/2 -left-14 transform -translate-y-1/2 cursor-pointer z-10 p-4 text-[56px] font-bold ${isDark ? 'text-[#272727]' : 'text-[#FFFFFF]'} bg-transparent border-none hover:scale-110 transition-transform duration-200`}
>
<i className="bi bi-chevron-left"></i>
</button>
<div className={styles.imgContainer}>
<div className="w-[80%] h-full flex justify-center items-center overflow-hidden">
<img
src={events[activeIndex].src}
alt={`Slide ${activeIndex}`}
className="max-w-full max-h-full object-cover"
/>
</div>
<button
onClick={() => {
goToNext();
resetTimer();
}}
className={styles.nextButton}
className={`absolute top-1/2 -right-14 transform -translate-y-1/2 cursor-pointer z-10 p-4 text-[56px] font-bold ${isDark ? 'text-[#272727]' : 'text-[#FFFFFF]'} bg-transparent border-none hover:scale-110 transition-transform duration-200`}
>
<i className="bi bi-chevron-right"></i>
</button>
<div className={styles.captionBelow}>
<div
className={`w-full max-w-[750px] ${isDark ? 'text-[#272727]' : 'text-[#FFFFFF]'} text-[1.1em] font-bold text-center p-2 px-5 mt-2 rounded-lg font-[Afacad] whitespace-nowrap overflow-hidden text-ellipsis`}
title={`${events[activeIndex].location} - ${events[activeIndex].date} @ ${events[activeIndex].time}`}
>
{`${events[activeIndex].location} - ${events[activeIndex].date} @ ${events[activeIndex].time}`}
</div>
</div>
)
)}
</div>
</div>
</div>
);
};
Expand Down
121 changes: 0 additions & 121 deletions rpi-eventhub/frontend/src/components/Carousel/Carousel.module.css

This file was deleted.

16 changes: 11 additions & 5 deletions rpi-eventhub/frontend/src/components/EventCard/EventCard.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ const VERIFIED = 2;
const OFFICER = 3;
const ADMIN = 4;

const decodeHtml = (str = "") => {
const txt = document.createElement("textarea");
txt.innerHTML = str;
return txt.value;
};


const EventCard = ({ event, isLiked, onSelect, selected, showEditButton, onEdit, onTagClick, selectedTags = [] }) => {
const {isLoggedIn} = useAuth();
Expand Down Expand Up @@ -143,11 +149,11 @@ const EventCard = ({ event, isLiked, onSelect, selected, showEditButton, onEdit,
</button>
)}
<div className={styles.eventDetails}>
<h2>{event.title}</h2>
<p>{event.description}</p>
<h2>{decodeHtml(event.title || "")}</h2>
<p>{decodeHtml(event.description || "")}</p>
<p><strong>Date & Time:</strong> {`${eventTime} on ${eventDate}`}</p>
<p><strong>Location:</strong> {event.location || "Location not specified"}</p>
<div className={styles.tags}>
<p><strong>Location:</strong> {event.location ? decodeHtml(event.location) : "Location not specified"}</p>
<div className={styles['tag-container']}>
{event.tags && event.tags.length > 0 ? (
event.tags.map(tag => (
<span
Expand All @@ -156,7 +162,7 @@ const EventCard = ({ event, isLiked, onSelect, selected, showEditButton, onEdit,
onClick={() => handleTagClick(tag)}
style={{ cursor: 'pointer' }}
>
{tag}
{decodeHtml(tag || "")}
</span>
))
) : (
Expand Down
Loading