mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
Merge pull request #78 from TheRealOwenRees/feature/layout-fix
Fix layout issues
This commit is contained in:
@@ -6,8 +6,5 @@
|
|||||||
],
|
],
|
||||||
"globals": {
|
"globals": {
|
||||||
"React": "readonly"
|
"React": "readonly"
|
||||||
},
|
|
||||||
"rules": {
|
|
||||||
"no-unused-vars": "warn"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+3
@@ -6,10 +6,12 @@
|
|||||||
"defaulticon",
|
"defaulticon",
|
||||||
"Échecs",
|
"Échecs",
|
||||||
"Fédération",
|
"Fédération",
|
||||||
|
"Florifourchette",
|
||||||
"Française",
|
"Française",
|
||||||
"kodingdotninja",
|
"kodingdotninja",
|
||||||
"Lente",
|
"Lente",
|
||||||
"localisation",
|
"localisation",
|
||||||
|
"markercluster",
|
||||||
"moveend",
|
"moveend",
|
||||||
"randomisation",
|
"randomisation",
|
||||||
"Rapide",
|
"Rapide",
|
||||||
@@ -19,6 +21,7 @@
|
|||||||
"Spiderfy",
|
"Spiderfy",
|
||||||
"spiderified",
|
"spiderified",
|
||||||
"tailwindcss",
|
"tailwindcss",
|
||||||
|
"timothyarmes",
|
||||||
"tournois",
|
"tournois",
|
||||||
"unspiderfied",
|
"unspiderfied",
|
||||||
"unspiderfy"
|
"unspiderfy"
|
||||||
|
|||||||
@@ -9,7 +9,6 @@ import Link from "next-intl/link";
|
|||||||
import { useTranslations } from "next-intl";
|
import { useTranslations } from "next-intl";
|
||||||
|
|
||||||
import useHamburgerClose from "@/hooks/useHamburgerClose";
|
import useHamburgerClose from "@/hooks/useHamburgerClose";
|
||||||
import ThemeSwitcher from "./ThemeSwitcher";
|
|
||||||
|
|
||||||
const HamburgerMenu = ({
|
const HamburgerMenu = ({
|
||||||
menuVisible,
|
menuVisible,
|
||||||
@@ -25,7 +24,7 @@ const HamburgerMenu = ({
|
|||||||
timeoutRef.current = setTimeout(() => {
|
timeoutRef.current = setTimeout(() => {
|
||||||
setMenuVisible(false);
|
setMenuVisible(false);
|
||||||
setMouseOverMenu(false);
|
setMouseOverMenu(false);
|
||||||
}, 2000);
|
}, 4000);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleMouseEnterMenu = () => {
|
const handleMouseEnterMenu = () => {
|
||||||
|
|||||||
@@ -16,11 +16,9 @@ const TestableLayout = ({
|
|||||||
}) => {
|
}) => {
|
||||||
return (
|
return (
|
||||||
<NextIntlClientProvider locale={locale} messages={messages}>
|
<NextIntlClientProvider locale={locale} messages={messages}>
|
||||||
<div className="flex min-h-screen flex-col bg-white font-sans leading-normal tracking-normal dark:bg-gray-800">
|
<div className="bg-white font-sans leading-normal tracking-normal dark:bg-gray-800">
|
||||||
<Navbar />
|
<Navbar />
|
||||||
<div className="relative mb-20 flex flex-1 justify-center">
|
<div className="relative h-content overflow-scroll">{children}</div>
|
||||||
{children}
|
|
||||||
</div>
|
|
||||||
<Footer />
|
<Footer />
|
||||||
</div>
|
</div>
|
||||||
</NextIntlClientProvider>
|
</NextIntlClientProvider>
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ export default function Contact() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="grid place-items-center bg-white dark:bg-gray-800">
|
<section className="grid place-items-center bg-white dark:bg-gray-800">
|
||||||
<div className="mx-auto max-w-screen-md px-4 pb-16 pt-8 lg:pt-16">
|
<div className="mx-auto max-w-screen-md px-4 py-8 lg:py-16">
|
||||||
<h2
|
<h2
|
||||||
className="mb-4 text-center text-4xl font-extrabold tracking-tight text-gray-900 dark:text-white"
|
className="mb-4 text-center text-4xl font-extrabold tracking-tight text-gray-900 dark:text-white"
|
||||||
data-test="header2"
|
data-test="header2"
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ export default function Home() {
|
|||||||
const t = useTranslations("Home");
|
const t = useTranslations("Home");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header className="relative flex flex-1 items-center justify-center">
|
<header className="relative flex h-full items-center justify-center">
|
||||||
<div className="absolute h-full w-full brightness-[0.2]">
|
<div className="absolute h-full w-full brightness-[0.2]">
|
||||||
<Image
|
<Image
|
||||||
src={bgImage}
|
src={bgImage}
|
||||||
|
|||||||
@@ -5,8 +5,8 @@ export default function About() {
|
|||||||
const t = useTranslations("About");
|
const t = useTranslations("About");
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<header className="mb-16 grid place-items-center bg-white dark:bg-gray-800">
|
<section className="grid place-items-center bg-white dark:bg-gray-800">
|
||||||
<div className="h-full max-w-5xl bg-white px-4 pt-8 lg:pt-16 dark:bg-gray-800">
|
<div className="max-w-5xl px-4 py-8 lg:py-16">
|
||||||
<h2
|
<h2
|
||||||
className="mb-8 text-center text-4xl font-extrabold tracking-tight text-gray-900 dark:text-white"
|
className="mb-8 text-center text-4xl font-extrabold tracking-tight text-gray-900 dark:text-white"
|
||||||
data-test="header2"
|
data-test="header2"
|
||||||
@@ -117,6 +117,6 @@ export default function About() {
|
|||||||
})}
|
})}
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</section>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -265,7 +265,7 @@ export default function TournamentMap() {
|
|||||||
};
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section id="tournament-map" className="flex h-screen flex-col pb-[144px]">
|
<section id="tournament-map" className="flex h-content flex-col">
|
||||||
<div className="p-3 lg:hidden">
|
<div className="p-3 lg:hidden">
|
||||||
<TimeControlFilters />
|
<TimeControlFilters />
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -46,7 +46,7 @@ export default function TournamentTable() {
|
|||||||
|
|
||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
className="tournament-table grid w-full auto-rows-max pb-20 lg:col-start-2 lg:col-end-3 lg:h-screen lg:overflow-y-scroll lg:pb-[144px]"
|
className="tournament-table grid w-full auto-rows-max pb-20 lg:col-start-2 lg:col-end-3 lg:h-content lg:overflow-y-scroll lg:pb-0"
|
||||||
id="tournament-table"
|
id="tournament-table"
|
||||||
data-test="tournament-table-div"
|
data-test="tournament-table-div"
|
||||||
>
|
>
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ import TournamentTable from "./TournamentTable";
|
|||||||
const LoadingMap = () => {
|
const LoadingMap = () => {
|
||||||
const t = useTranslations("Tournaments");
|
const t = useTranslations("Tournaments");
|
||||||
return (
|
return (
|
||||||
<div className="grid h-screen place-items-center bg-white text-gray-900 dark:bg-gray-800 dark:text-white">
|
<div className="grid h-content place-items-center bg-white text-gray-900 dark:bg-gray-800 dark:text-white">
|
||||||
<p>{t("loading")}</p>
|
<p>{t("loading")}</p>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
|||||||
+2
-1
@@ -10,7 +10,8 @@ module.exports = {
|
|||||||
extend: {
|
extend: {
|
||||||
height: {
|
height: {
|
||||||
// We use 100svh, falling back to vh for old browsers
|
// We use 100svh, falling back to vh for old browsers
|
||||||
screen: ['100vh', '100svh'],
|
// The 144px is for the header and footer
|
||||||
|
content: ['calc(100vh - 144px)', 'calc(100svh - 144px)'],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user