From d658401e750585f498e4ceab65e0b21ea2d61251 Mon Sep 17 00:00:00 2001 From: Jaz-spec Date: Sun, 15 Jun 2025 21:39:12 +0100 Subject: [PATCH 01/16] updated tailwind config --- tailwind.config.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/tailwind.config.ts b/tailwind.config.ts index e0f5d1e..cfa35d2 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,4 +1,5 @@ export default { + content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], lightMode: 'class', theme: { extend: { From 13f644a5e44037ad0e00da6ed5207dafd7000192 Mon Sep 17 00:00:00 2001 From: Jaz-spec Date: Sun, 15 Jun 2025 21:42:45 +0100 Subject: [PATCH 02/16] commented out tailwind config file --- tailwind.config.ts | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/tailwind.config.ts b/tailwind.config.ts index cfa35d2..eb565f0 100644 --- a/tailwind.config.ts +++ b/tailwind.config.ts @@ -1,12 +1,12 @@ -export default { - content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], - lightMode: 'class', - theme: { - extend: { - colors: { - background: 'var(--color-background)', - text: 'var(--color-text)', - }, - }, - }, -}; +// export default { +// content: ['./index.html', './src/**/*.{js,ts,jsx,tsx}'], +// lightMode: 'class', +// theme: { +// extend: { +// colors: { +// background: 'var(--color-background)', +// text: 'var(--color-text)', +// }, +// }, +// }, +// }; From 456e47bb149af6a000dcad2aa64f0d51666271d2 Mon Sep 17 00:00:00 2001 From: Jaz-spec Date: Sun, 15 Jun 2025 21:51:49 +0100 Subject: [PATCH 03/16] added html element to css --- src/styles/main.css | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/styles/main.css b/src/styles/main.css index 3bdbe3f..3ab5de5 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -21,7 +21,7 @@ } } -.light { +html.light { --color-background: #e1d2e5; --color-accent: #e1d2e5; --color-text: #2d272f; @@ -46,4 +46,4 @@ input { input { background: var(--color-input-bg); -} \ No newline at end of file +} From 3847708c3c65839b549118aba4a78f352701476a Mon Sep 17 00:00:00 2001 From: Jaz-spec Date: Sun, 15 Jun 2025 22:00:00 +0100 Subject: [PATCH 04/16] tried being more explicit with my theme classes --- src/styles/main.css | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) diff --git a/src/styles/main.css b/src/styles/main.css index 3ab5de5..400dcda 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -1,7 +1,7 @@ @import 'tailwindcss'; @import 'tw-animate-css'; -:root { +/* :root { --color-background: #2d272f; --color-accent: rgb(38, 35, 39); --color-text: #e1d2e5; @@ -29,6 +29,40 @@ html.light { --color-error: rgb(215, 41, 41); } +@import 'tailwindcss'; +@import 'tw-animate-css'; */ + +:root, +html { + /* Default (dark) theme */ + --color-background: #2d272f; + --color-accent: rgb(38, 35, 39); + --color-text: #e1d2e5; + --color-input-bg: #e1d2e51a; + --color-error: rgb(248, 111, 111); + + --animate-fade-in-left: fade-in-left 0.4s; + @keyframes fade-in-left { + from { + opacity: 0; + transform: translateX(-20px); + } + to { + opacity: 1; + transform: translateX(0); + } + } +} + +html.light, +:root.light { + --color-background: #e1d2e5; + --color-accent: #e1d2e5; + --color-text: #2d272f; + --color-input-bg: rgba(255, 0, 0, 0.05); + --color-error: rgb(215, 41, 41); +} + body { min-height: 100vh; color: var(--color-text); From 9685cef0629f0b5778bfd6536b70e985352ccd54 Mon Sep 17 00:00:00 2001 From: Jaz-spec Date: Sun, 15 Jun 2025 22:03:04 +0100 Subject: [PATCH 05/16] forced :host properties --- src/styles/main.css | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/styles/main.css b/src/styles/main.css index 400dcda..cb3d60c 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -63,6 +63,17 @@ html.light, --color-error: rgb(215, 41, 41); } +html, +html *, +:host, +:host * { + --color-background: inherit; + --color-accent: inherit; + --color-text: inherit; + --color-input-bg: inherit; + --color-error: inherit; +} + body { min-height: 100vh; color: var(--color-text); From d52083fbd15b4ebcd11e70acacf9eedabb352ae8 Mon Sep 17 00:00:00 2001 From: Jaz-spec Date: Sun, 15 Jun 2025 22:06:33 +0100 Subject: [PATCH 06/16] explicitelt added dark class --- src/styles/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/main.css b/src/styles/main.css index cb3d60c..3ed17ab 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -33,7 +33,7 @@ html.light { @import 'tw-animate-css'; */ :root, -html { +html.dark { /* Default (dark) theme */ --color-background: #2d272f; --color-accent: rgb(38, 35, 39); From 8c7b1b41efb2ef165ec776e7d985cdd15357d276 Mon Sep 17 00:00:00 2001 From: Jaz-spec Date: Sun, 15 Jun 2025 22:09:19 +0100 Subject: [PATCH 07/16] simplified css classes --- src/styles/main.css | 17 ++--------------- 1 file changed, 2 insertions(+), 15 deletions(-) diff --git a/src/styles/main.css b/src/styles/main.css index 3ed17ab..329adb1 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -32,8 +32,7 @@ html.light { @import 'tailwindcss'; @import 'tw-animate-css'; */ -:root, -html.dark { +.dark { /* Default (dark) theme */ --color-background: #2d272f; --color-accent: rgb(38, 35, 39); @@ -54,8 +53,7 @@ html.dark { } } -html.light, -:root.light { +.light { --color-background: #e1d2e5; --color-accent: #e1d2e5; --color-text: #2d272f; @@ -63,17 +61,6 @@ html.light, --color-error: rgb(215, 41, 41); } -html, -html *, -:host, -:host * { - --color-background: inherit; - --color-accent: inherit; - --color-text: inherit; - --color-input-bg: inherit; - --color-error: inherit; -} - body { min-height: 100vh; color: var(--color-text); From c856333f1ed581e52b607059dcbfe35bc8857206 Mon Sep 17 00:00:00 2001 From: Jaz-spec Date: Sun, 15 Jun 2025 22:12:34 +0100 Subject: [PATCH 08/16] another tweak --- src/styles/main.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/styles/main.css b/src/styles/main.css index 329adb1..0c802af 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -32,7 +32,7 @@ html.light { @import 'tailwindcss'; @import 'tw-animate-css'; */ -.dark { +html.dark { /* Default (dark) theme */ --color-background: #2d272f; --color-accent: rgb(38, 35, 39); From 444549c225fb6e0c7f928055e8f8739e0ffd7cda Mon Sep 17 00:00:00 2001 From: Jaz-spec Date: Sun, 15 Jun 2025 22:14:37 +0100 Subject: [PATCH 09/16] another tweak --- src/styles/main.css | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) diff --git a/src/styles/main.css b/src/styles/main.css index 0c802af..2d4886c 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -32,25 +32,12 @@ html.light { @import 'tailwindcss'; @import 'tw-animate-css'; */ -html.dark { - /* Default (dark) theme */ +.dark { --color-background: #2d272f; --color-accent: rgb(38, 35, 39); --color-text: #e1d2e5; --color-input-bg: #e1d2e51a; --color-error: rgb(248, 111, 111); - - --animate-fade-in-left: fade-in-left 0.4s; - @keyframes fade-in-left { - from { - opacity: 0; - transform: translateX(-20px); - } - to { - opacity: 1; - transform: translateX(0); - } - } } .light { From 881d7bf25d0a3f2f1938bee4b515dee52fec1df7 Mon Sep 17 00:00:00 2001 From: Jaz-spec Date: Sun, 15 Jun 2025 22:50:19 +0100 Subject: [PATCH 10/16] cleaned up code and added some styling --- src/components/major/events.tsx | 2 +- src/components/major/nav-bar.tsx | 2 +- src/components/major/side-bar/ModeButtons.tsx | 2 +- .../major/side-bar/filters/SearchFilter.tsx | 4 +-- src/components/major/side-bar/index.tsx | 2 +- src/styles/main.css | 33 +------------------ 6 files changed, 7 insertions(+), 38 deletions(-) diff --git a/src/components/major/events.tsx b/src/components/major/events.tsx index b9b7660..638852c 100644 --- a/src/components/major/events.tsx +++ b/src/components/major/events.tsx @@ -36,7 +36,7 @@ export default function Events(props: Props) { return (
diff --git a/src/components/major/nav-bar.tsx b/src/components/major/nav-bar.tsx index ebf5d6c..dfa9464 100644 --- a/src/components/major/nav-bar.tsx +++ b/src/components/major/nav-bar.tsx @@ -29,7 +29,7 @@ export default function NavBar() { }; return ( -
+
{/* Desktop navbar */}
diff --git a/src/components/major/side-bar/ModeButtons.tsx b/src/components/major/side-bar/ModeButtons.tsx index 74b8f18..8db7c6e 100644 --- a/src/components/major/side-bar/ModeButtons.tsx +++ b/src/components/major/side-bar/ModeButtons.tsx @@ -15,7 +15,7 @@ export const ModeButtons = ({ key={id} onClick={() => toggleModeSelect(id)} title={!open ? label : undefined} - className={`flex items-center justify-center gap-2 p-2 w-full rounded-md + className={`flex items-center justify-center gap-2 p-2 w-full rounded-md ${isSelected ? 'outline-2 outline-primary' : ''} hover:bg-input-bg`} > diff --git a/src/components/major/side-bar/filters/SearchFilter.tsx b/src/components/major/side-bar/filters/SearchFilter.tsx index 7333127..abd30f1 100644 --- a/src/components/major/side-bar/filters/SearchFilter.tsx +++ b/src/components/major/side-bar/filters/SearchFilter.tsx @@ -6,13 +6,13 @@ export const SearchFilter: React.FC = ({ onChange, }) => { return ( -
+
onChange(e.target.value)} - className=" flex-1 bg-transparent outline-none text-sm px-2 py-1 rounded" + className=" flex-1 bg-transparent outline-none text-(-color-text) text-sm px-2 py-1 rounded" />
); diff --git a/src/components/major/side-bar/index.tsx b/src/components/major/side-bar/index.tsx index f2f7fce..b19d748 100644 --- a/src/components/major/side-bar/index.tsx +++ b/src/components/major/side-bar/index.tsx @@ -46,7 +46,7 @@ const SideBar = ({ filters, updateFilters }: FiltersProps) => { return (
diff --git a/src/styles/main.css b/src/styles/main.css index 2d4886c..0f88962 100644 --- a/src/styles/main.css +++ b/src/styles/main.css @@ -1,37 +1,6 @@ @import 'tailwindcss'; @import 'tw-animate-css'; -/* :root { - --color-background: #2d272f; - --color-accent: rgb(38, 35, 39); - --color-text: #e1d2e5; - --color-input-bg: #e1d2e51a; - --color-error: rgb(248, 111, 111); - - --animate-fade-in-left: fade-in-left 0.4s; - @keyframes fade-in-left { - from { - opacity: 0; - transform: translateX(-20px); - } - to { - opacity: 1; - transform: translateX(0); - } - } -} - -html.light { - --color-background: #e1d2e5; - --color-accent: #e1d2e5; - --color-text: #2d272f; - --color-input-bg: rgba(255, 0, 0, 0.05); - --color-error: rgb(215, 41, 41); -} - -@import 'tailwindcss'; -@import 'tw-animate-css'; */ - .dark { --color-background: #2d272f; --color-accent: rgb(38, 35, 39); @@ -44,7 +13,7 @@ html.light { --color-background: #e1d2e5; --color-accent: #e1d2e5; --color-text: #2d272f; - --color-input-bg: rgba(255, 0, 0, 0.05); + --color-input-bg: rgba(38, 35, 39, 0.2); --color-error: rgb(215, 41, 41); } From 726a4216ba0a2f9cfd7b0cc29279b38863ddbcc4 Mon Sep 17 00:00:00 2001 From: David Ogden Date: Mon, 16 Jun 2025 12:04:27 +0100 Subject: [PATCH 11/16] Changed to todays date filter --- src/utils/filterEvents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/filterEvents.ts b/src/utils/filterEvents.ts index f913aa1..8190dd3 100644 --- a/src/utils/filterEvents.ts +++ b/src/utils/filterEvents.ts @@ -26,7 +26,7 @@ export const filterEvents = (events: Event[], filters: FiltersState) => { const filterDate = new Date(dateOnly); if (filters.date === 'today') { - filterDate.setDate(filterDate.getDate() + 1); + filterDate.setDate(filterDate.setHours(23, 59, 59, 999)); } else if (filters.date === 'this week') { filterDate.setDate(filterDate.getDate() + 7); } else if (filters.date === 'this month') { From 46b4e068e2bef2c681556c74b60951c587131abf Mon Sep 17 00:00:00 2001 From: David Ogden Date: Mon, 16 Jun 2025 12:08:04 +0100 Subject: [PATCH 12/16] Fixed error --- src/utils/filterEvents.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/utils/filterEvents.ts b/src/utils/filterEvents.ts index 0fc817a..c599023 100644 --- a/src/utils/filterEvents.ts +++ b/src/utils/filterEvents.ts @@ -26,7 +26,7 @@ export const filterEvents = (events: FullEvent[], filters: FiltersState) => { const filterDate = new Date(dateOnly); if (filters.date === 'today') { - filterDate.setDate(filterDate.setHours(23, 59, 59, 999)); + filterDate.setHours(23, 59, 59, 999); } else if (filters.date === 'this week') { filterDate.setDate(filterDate.getDate() + 7); } else if (filters.date === 'this month') { From 6003b15f8e3b7f7ad3e421a8c2119264090fc79a Mon Sep 17 00:00:00 2001 From: David Ogden Date: Mon, 16 Jun 2025 12:28:49 +0100 Subject: [PATCH 13/16] Quick test, might be reverted --- src/utils/filterEvents.ts | 33 +++++++++++++++++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/src/utils/filterEvents.ts b/src/utils/filterEvents.ts index c599023..9d7de8c 100644 --- a/src/utils/filterEvents.ts +++ b/src/utils/filterEvents.ts @@ -20,13 +20,41 @@ export const filterEvents = (events: FullEvent[], filters: FiltersState) => { eventDate.getDate(), ); + const eventDate = new Date(event.date); // full date with time + const now = new Date(); + + // Create date range filters + const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate()); + const endOfToday = new Date(startOfToday); + endOfToday.setHours(23, 59, 59, 999); + + let dateMatch = true; + + if (filters.date === 'today') { + // Match if event is today + dateMatch = eventDate >= startOfToday && eventDate <= endOfToday; + } else if (filters.date === 'this week') { + const endOfWeek = new Date(startOfToday); + endOfWeek.setDate(endOfWeek.getDate() + 7); + dateMatch = eventDate >= startOfToday && eventDate <= endOfWeek; + } else if (filters.date === 'this month') { + const endOfMonth = new Date(startOfToday); + endOfMonth.setMonth(endOfMonth.getMonth() + 1); + dateMatch = eventDate >= startOfToday && eventDate <= endOfMonth; + } else if (filters.date === 'this year') { + const endOfYear = new Date(startOfToday); + endOfYear.setFullYear(endOfYear.getFullYear() + 1); + dateMatch = eventDate >= startOfToday && eventDate <= endOfYear; + } + + return priceMatch && distanceMatch && searchMatch && dateMatch; + /* const now = new Date(); const dateOnly = new Date(now.getFullYear(), now.getMonth(), now.getDate()); const filterDate = new Date(dateOnly); - if (filters.date === 'today') { - filterDate.setHours(23, 59, 59, 999); + filterDate.setDate(filters.date() + 1); } else if (filters.date === 'this week') { filterDate.setDate(filterDate.getDate() + 7); } else if (filters.date === 'this month') { @@ -43,6 +71,7 @@ export const filterEvents = (events: FullEvent[], filters: FiltersState) => { return priceMatch && distanceMatch && searchMatch && dateMatch; }); }; +*/ /* search: '', price: 50, distance: 20, From 3492b8b6559a462a3442591975aaf0ade6b8f4f9 Mon Sep 17 00:00:00 2001 From: David Ogden Date: Mon, 16 Jun 2025 12:30:00 +0100 Subject: [PATCH 14/16] Updated --- src/utils/filterEvents.ts | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/utils/filterEvents.ts b/src/utils/filterEvents.ts index 9d7de8c..43411f8 100644 --- a/src/utils/filterEvents.ts +++ b/src/utils/filterEvents.ts @@ -14,13 +14,12 @@ export const filterEvents = (events: FullEvent[], filters: FiltersState) => { const distanceMatch = event.distance <= filters.distance; const eventDate = new Date(event.date); - const eventDateOnly = new Date( + /*const eventDateOnly = new Date( eventDate.getFullYear(), eventDate.getMonth(), eventDate.getDate(), - ); + );*/ - const eventDate = new Date(event.date); // full date with time const now = new Date(); // Create date range filters From 9423772c2de5c474c0c2b72abb45e2208b906587 Mon Sep 17 00:00:00 2001 From: David Ogden Date: Mon, 16 Jun 2025 12:32:32 +0100 Subject: [PATCH 15/16] Reverted --- src/utils/filterEvents.ts | 36 ++++-------------------------------- 1 file changed, 4 insertions(+), 32 deletions(-) diff --git a/src/utils/filterEvents.ts b/src/utils/filterEvents.ts index 43411f8..9c2cf73 100644 --- a/src/utils/filterEvents.ts +++ b/src/utils/filterEvents.ts @@ -14,46 +14,18 @@ export const filterEvents = (events: FullEvent[], filters: FiltersState) => { const distanceMatch = event.distance <= filters.distance; const eventDate = new Date(event.date); - /*const eventDateOnly = new Date( + const eventDateOnly = new Date( eventDate.getFullYear(), eventDate.getMonth(), eventDate.getDate(), - );*/ + ); - const now = new Date(); - - // Create date range filters - const startOfToday = new Date(now.getFullYear(), now.getMonth(), now.getDate()); - const endOfToday = new Date(startOfToday); - endOfToday.setHours(23, 59, 59, 999); - - let dateMatch = true; - - if (filters.date === 'today') { - // Match if event is today - dateMatch = eventDate >= startOfToday && eventDate <= endOfToday; - } else if (filters.date === 'this week') { - const endOfWeek = new Date(startOfToday); - endOfWeek.setDate(endOfWeek.getDate() + 7); - dateMatch = eventDate >= startOfToday && eventDate <= endOfWeek; - } else if (filters.date === 'this month') { - const endOfMonth = new Date(startOfToday); - endOfMonth.setMonth(endOfMonth.getMonth() + 1); - dateMatch = eventDate >= startOfToday && eventDate <= endOfMonth; - } else if (filters.date === 'this year') { - const endOfYear = new Date(startOfToday); - endOfYear.setFullYear(endOfYear.getFullYear() + 1); - dateMatch = eventDate >= startOfToday && eventDate <= endOfYear; - } - - return priceMatch && distanceMatch && searchMatch && dateMatch; - /* const now = new Date(); const dateOnly = new Date(now.getFullYear(), now.getMonth(), now.getDate()); const filterDate = new Date(dateOnly); if (filters.date === 'today') { - filterDate.setDate(filters.date() + 1); + filterDate.setDate(filterDate.getDate() + 1); } else if (filters.date === 'this week') { filterDate.setDate(filterDate.getDate() + 7); } else if (filters.date === 'this month') { @@ -70,7 +42,7 @@ export const filterEvents = (events: FullEvent[], filters: FiltersState) => { return priceMatch && distanceMatch && searchMatch && dateMatch; }); }; -*/ + /* search: '', price: 50, distance: 20, From 414b85997bad8b9c23bcffb96ea5c670865665ff Mon Sep 17 00:00:00 2001 From: David Ogden Date: Mon, 16 Jun 2025 14:18:10 +0100 Subject: [PATCH 16/16] Adding docs frontend. --- public/_redirects | 1 + 1 file changed, 1 insertion(+) create mode 100644 public/_redirects diff --git a/public/_redirects b/public/_redirects new file mode 100644 index 0000000..f9ba95e --- /dev/null +++ b/public/_redirects @@ -0,0 +1 @@ +/docs https://deepwiki.com/fac-31/Pro0428-LocalEventBackend/1-overview 302 \ No newline at end of file