From 254d4603aa1b5253431ca05b1d6718dc1a7dcdbc Mon Sep 17 00:00:00 2001 From: Owen Rees Date: Mon, 12 Jun 2023 15:41:09 +0200 Subject: [PATCH] themes and dimensions --- TODO | 6 +-- app/contactez-nous/page.tsx | 69 ++++++++++++++++++++++++++++--- app/page.tsx | 2 +- app/qui-sommes-nous/page.tsx | 11 +++-- app/tournois/page.tsx | 4 +- components/Footer.tsx | 9 ++-- components/Hamburger.tsx | 22 ++++++++++ components/HamburgerMenu.tsx | 25 +++++++++++ components/Layout.tsx | 2 +- components/Navbar.tsx | 25 +++++++---- components/SearchBar.tsx | 2 +- components/ThemeSwitcher.tsx | 23 +++++++++++ components/TournamentMap.tsx | 2 +- components/TournamentTable.tsx | 6 +-- cypress/component/mounting.cy.tsx | 4 +- hooks/useDarkMode.ts | 23 +++++++++++ hooks/useTournamentFilter.tsx | 2 +- tailwind.config.js | 1 + 18 files changed, 204 insertions(+), 34 deletions(-) create mode 100644 components/Hamburger.tsx create mode 100644 components/HamburgerMenu.tsx create mode 100644 components/ThemeSwitcher.tsx create mode 100644 hooks/useDarkMode.ts diff --git a/TODO b/TODO index 29e85fb..eb9070c 100644 --- a/TODO +++ b/TODO @@ -1,14 +1,14 @@ need a 'return to top' arrow button on smaller screens -muti-language i18n support +muti-language i18n support- https://nextjs.org/docs/app/building-your-application/routing/internationalization -light/dark theme +light/dark theme in all components tests for tournois, testing the loading of map and table, then counting the markers logo for navbar and favicon -hover on table needs fixing - this only seemed to happen once I moved the logic into its own hook +hover on table needs fixing - this only seemed to happen once I moved the logic into its own hook <- error is occuring on all hovers at the moment. Client/SSR issue? document my new hook diff --git a/app/contactez-nous/page.tsx b/app/contactez-nous/page.tsx index d83a8c4..6902a99 100644 --- a/app/contactez-nous/page.tsx +++ b/app/contactez-nous/page.tsx @@ -1,14 +1,73 @@ import Layout from "@/components/Layout"; +// TODO fix page sizing export default function Contact() { return ( -
-
-
-

Contactez-Nous

+
+
+

+ Contactez-Nous +

+

+ Vous souhaitez ajouter les tournois de votre fédération sur ce site? + Vous avez un problème technique? Vous aimeriez participer à ce + projet? Contactez-nous. +

+
+
+ + +
+
+ + +
+
+ + +
+ +
-
+
); } diff --git a/app/page.tsx b/app/page.tsx index f34ff90..b2d56db 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -4,7 +4,7 @@ import Layout from "@/components/Layout"; export default function Home() { return ( -
+

Echecs France

diff --git a/app/qui-sommes-nous/page.tsx b/app/qui-sommes-nous/page.tsx index 59afbe4..df40855 100644 --- a/app/qui-sommes-nous/page.tsx +++ b/app/qui-sommes-nous/page.tsx @@ -3,10 +3,15 @@ import Layout from "@/components/Layout"; export default function About() { return ( -
-
+
+
-

Qui Sommes-Nous

+

+ Qui Sommes-Nous? +

+

+ Prochainement +

diff --git a/app/tournois/page.tsx b/app/tournois/page.tsx index d8da1a0..078125c 100644 --- a/app/tournois/page.tsx +++ b/app/tournois/page.tsx @@ -13,7 +13,7 @@ import getTournaments from "@/utils/getTournamentData"; const TournamentMap = dynamic(() => import("@/components/TournamentMap"), { ssr: false, loading: () => ( -
+

Loading map...

), @@ -28,7 +28,7 @@ export default async function Tournaments() {
-
+
diff --git a/components/Footer.tsx b/components/Footer.tsx index 19aa1b5..e2cb709 100644 --- a/components/Footer.tsx +++ b/components/Footer.tsx @@ -1,19 +1,22 @@ import Link from "next/link"; -import { FaGithub } from "react-icons/fa"; +import { FaGithub, FaRegEnvelope } from "react-icons/fa"; export default function Footer() { return ( -