mirror of
https://github.com/TheRealOwenRees/echecsfrance.git
synced 2026-07-23 04:26:57 +00:00
french translations
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
footer
|
|
||||||
|
|
||||||
need a 'return to top' arrow button on smaller screens
|
need a 'return to top' arrow button on smaller screens
|
||||||
|
|
||||||
|
muti-language i18n support
|
||||||
|
|
||||||
light/dark theme
|
light/dark theme
|
||||||
|
|
||||||
tests for tournois, testing the loading of map and table, then counting the markers
|
tests for tournois, testing the loading of map and table, then counting the markers
|
||||||
@@ -17,8 +17,6 @@ error handling
|
|||||||
e2e tests for tournament page:
|
e2e tests for tournament page:
|
||||||
- make sure number of markers = tournamentData.length
|
- make sure number of markers = tournamentData.length
|
||||||
|
|
||||||
home page
|
|
||||||
|
|
||||||
about page
|
about page
|
||||||
|
|
||||||
contact page
|
contact page
|
||||||
|
|||||||
@@ -15,6 +15,7 @@ export async function GET() {
|
|||||||
/**
|
/**
|
||||||
* Converts date from string into a date to allow ordering
|
* Converts date from string into a date to allow ordering
|
||||||
*/
|
*/
|
||||||
|
// TODO add into a middleware?
|
||||||
const data = await db
|
const data = await db
|
||||||
.collection("tournaments")
|
.collection("tournaments")
|
||||||
.aggregate([
|
.aggregate([
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ import Layout from "@/components/Layout";
|
|||||||
export default function Contact() {
|
export default function Contact() {
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<header className="grid h-[calc(100%-176px)] md:h-[calc(100%-132px)] place-items-center">
|
<header className="grid h-[calc(100%-216px)] md:h-[calc(100%-172px)] place-items-center">
|
||||||
<div className="relative h-full w-full bg-amber-200"></div>
|
<div className="relative h-full w-full bg-amber-200"></div>
|
||||||
<div className="absolute">
|
<div className="absolute">
|
||||||
<h1>Contact Page</h1>
|
<h1>Contactez-Nous</h1>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</Layout>
|
</Layout>
|
||||||
+6
-6
@@ -4,16 +4,16 @@ import Layout from "@/components/Layout";
|
|||||||
export default function Home() {
|
export default function Home() {
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<header className="grid h-[calc(100%-176px)] md:h-[calc(100%-132px)] place-items-center">
|
<header className="grid h-[calc(100%-216px)] md:h-[calc(100%-172px)] place-items-center">
|
||||||
<div className="relative h-full w-full bg-[url('/images/map-bg.jpg')] bg-cover bg-center brightness-[0.2]"></div>
|
<div className="relative h-full w-full bg-[url('/images/map-bg.jpg')] bg-cover bg-center brightness-[0.2]"></div>
|
||||||
<div className="absolute text-center">
|
<div className="absolute text-center">
|
||||||
<h1 className="text-5xl p-5">Echecs France</h1>
|
<h1 className="text-5xl p-5">Echecs France</h1>
|
||||||
<h2 className="text-3xl p-5 capitalize">
|
<h2 className="text-3xl p-5">
|
||||||
Find chess tournaments in France on a map
|
Trouvez Vos Tournois d'Echecs en France Sur Une Carte
|
||||||
</h2>
|
</h2>
|
||||||
<h3 className="text-xl p-5 mb-5">
|
<h3 className="text-xl p-5 mb-5">
|
||||||
A visual representation of all the chess tournaments published by
|
Une représentation visuelle de tous les tournois d'échecs publiés
|
||||||
the{" "}
|
par la{" "}
|
||||||
<Link href="http://www.echecs.asso.fr/" target="_blank">
|
<Link href="http://www.echecs.asso.fr/" target="_blank">
|
||||||
<abbr title="Fédération Française des Échecs">FFE</abbr>
|
<abbr title="Fédération Française des Échecs">FFE</abbr>
|
||||||
</Link>
|
</Link>
|
||||||
@@ -22,7 +22,7 @@ export default function Home() {
|
|||||||
href="/tournois"
|
href="/tournois"
|
||||||
className="text-white bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-teal-300 dark:focus:ring-teal-800 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2"
|
className="text-white bg-gradient-to-r from-teal-400 via-teal-500 to-teal-600 hover:bg-gradient-to-br focus:ring-4 focus:outline-none focus:ring-teal-300 dark:focus:ring-teal-800 font-medium rounded-lg text-sm px-5 py-2.5 text-center mr-2 mb-2"
|
||||||
>
|
>
|
||||||
Get Started
|
Voir La Carte
|
||||||
</Link>
|
</Link>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ import Layout from "@/components/Layout";
|
|||||||
export default function About() {
|
export default function About() {
|
||||||
return (
|
return (
|
||||||
<Layout>
|
<Layout>
|
||||||
<header className="grid h-[calc(100%-176px)] md:h-[calc(100%-132px)] place-items-center">
|
<header className="grid h-[calc(100%-216px)] md:h-[calc(100%-172px)] place-items-center">
|
||||||
<div className="relative h-full w-full bg-amber-200"></div>
|
<div className="relative h-full w-full bg-amber-200"></div>
|
||||||
<div className="absolute">
|
<div className="absolute">
|
||||||
<h1>About Page</h1>
|
<h1>Qui Sommes-Nous</h1>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
</Layout>
|
</Layout>
|
||||||
@@ -3,11 +3,11 @@ import { FaGithub } from "react-icons/fa";
|
|||||||
|
|
||||||
export default function Footer() {
|
export default function Footer() {
|
||||||
return (
|
return (
|
||||||
<footer className="grid grid-cols-2 bg-gray-800 text-white p-3">
|
<footer className="grid justify-items-center bg-gray-800 text-white py-2 px-5">
|
||||||
<div>
|
<div className="p-2">
|
||||||
<p>© {new Date().getFullYear()} - Owen Rees</p>
|
<p>© {new Date().getFullYear()} - Owen Rees</p>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div className="p-2">
|
||||||
<Link
|
<Link
|
||||||
href="https://github.com/TheRealOwenRees/echecsfrance"
|
href="https://github.com/TheRealOwenRees/echecsfrance"
|
||||||
target="_blank"
|
target="_blank"
|
||||||
|
|||||||
@@ -25,17 +25,17 @@ export default function Navbar() {
|
|||||||
<li className="mr-10">
|
<li className="mr-10">
|
||||||
<Link
|
<Link
|
||||||
className="inline-block border-b-4 py-5 border-transparent hover:border-teal-600 transition-all ease-in-out duration-300"
|
className="inline-block border-b-4 py-5 border-transparent hover:border-teal-600 transition-all ease-in-out duration-300"
|
||||||
href="/about"
|
href="/qui-sommes-nous"
|
||||||
>
|
>
|
||||||
About
|
Qui Sommes-Nous
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
<li className="">
|
<li className="">
|
||||||
<Link
|
<Link
|
||||||
className="inline-block border-b-4 py-5 border-transparent hover:border-teal-600 transition-all ease-in-out duration-300"
|
className="inline-block border-b-4 py-5 border-transparent hover:border-teal-600 transition-all ease-in-out duration-300"
|
||||||
href="/contact"
|
href="/contactez-nous"
|
||||||
>
|
>
|
||||||
Contact
|
Contactez-Nous
|
||||||
</Link>
|
</Link>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ export default function TournamentMap({ tournamentData }: TournamentDataProps) {
|
|||||||
return (
|
return (
|
||||||
<section
|
<section
|
||||||
id="tournament-map"
|
id="tournament-map"
|
||||||
className="grid h-[calc(100vh-128px)] md:h-[calc(100vh-82px)] lg:h-[calc(100vh-132px)]"
|
className="grid h-[calc(100vh-128px)] md:h-[calc(100vh-82px)] lg:h-[calc(100vh-172px)]"
|
||||||
>
|
>
|
||||||
<MapContainer
|
<MapContainer
|
||||||
center={center}
|
center={center}
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ export default function TournamentTable({
|
|||||||
const stickyHeader = "sticky top-0 p-3 bg-gray-600";
|
const stickyHeader = "sticky top-0 p-3 bg-gray-600";
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="w-full grid auto-rows-max h-[calc(100vh-176px)] md:h-[calc(100vh-82px)] lg:h-[calc(100vh-132px)] lg:col-start-2 lg:col-end-3">
|
<section className="w-full grid auto-rows-max lg:h-[calc(100vh-172px)] lg:col-start-2 lg:col-end-3">
|
||||||
<SearchBar
|
<SearchBar
|
||||||
tournamentFilter={tournamentFilter}
|
tournamentFilter={tournamentFilter}
|
||||||
setTournamentFilter={setTournamentFilter}
|
setTournamentFilter={setTournamentFilter}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
import Home from "@/app/page";
|
import Home from "@/app/page";
|
||||||
import About from "@/app/about/page";
|
import About from "@/app/qui-sommes-nous/page";
|
||||||
import Contact from "@/app/contact/page";
|
import Contact from "@/app/contactez-nous/page";
|
||||||
|
|
||||||
const navbarFooterCheck = () => {
|
const navbarFooterCheck = () => {
|
||||||
it("includes navbar", () => {
|
it("includes navbar", () => {
|
||||||
@@ -31,7 +31,7 @@ describe("Verify component mount", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("correct h1 tags with page title included", () => {
|
it("correct h1 tags with page title included", () => {
|
||||||
cy.get("h1").contains("about", { matchCase: false });
|
cy.get("h1").contains("qui sommes-nous", { matchCase: false });
|
||||||
});
|
});
|
||||||
|
|
||||||
navbarFooterCheck();
|
navbarFooterCheck();
|
||||||
@@ -43,7 +43,7 @@ describe("Verify component mount", () => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
it("correct h1 tags with page title included", () => {
|
it("correct h1 tags with page title included", () => {
|
||||||
cy.get("h1").contains("contact", { matchCase: false });
|
cy.get("h1").contains("contactez-nous", { matchCase: false });
|
||||||
});
|
});
|
||||||
|
|
||||||
navbarFooterCheck();
|
navbarFooterCheck();
|
||||||
|
|||||||
@@ -1,18 +1,22 @@
|
|||||||
describe("Test all links", () => {
|
describe("Test all links", () => {
|
||||||
const pages = ["tournois", "about", "contact"];
|
const pages = ["tournois", "qui sommes-nous", "contactez-nous"];
|
||||||
|
|
||||||
it("Check navbar links point to correct pathname", () => {
|
const navLinkToSlug = (navLink: string) => {
|
||||||
|
return navLink.replace(/\s+/g, "-");
|
||||||
|
};
|
||||||
|
|
||||||
|
it("Check navbar links point to correct pathname as a slug", () => {
|
||||||
cy.visit("/");
|
cy.visit("/");
|
||||||
pages.forEach((page) => {
|
pages.forEach((page) => {
|
||||||
cy.contains(page, { matchCase: false }).click();
|
cy.contains(page, { matchCase: false }).click();
|
||||||
cy.location("pathname").should("eq", `/${page}`); // url path matches link name
|
cy.location("pathname").should("eq", `/${navLinkToSlug(page)}`); // url path matches link name, replacing whitespace with hyphens
|
||||||
cy.go("back");
|
cy.go("back");
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
it("Check dead links", () => {
|
it("Check dead links", () => {
|
||||||
pages.forEach((page) => {
|
pages.forEach((page) => {
|
||||||
cy.visit(`/${page}`);
|
cy.visit(`/${navLinkToSlug(page)}`);
|
||||||
cy.get("a:not([href*='mailto:']").each((link) => {
|
cy.get("a:not([href*='mailto:']").each((link) => {
|
||||||
if (
|
if (
|
||||||
!link
|
!link
|
||||||
|
|||||||
BIN
Binary file not shown.
|
After Width: | Height: | Size: 418 KiB |
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user