Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions src/app/confidentialite/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
} from "lucide-react";
import Link from "next/link";

import { SiteFooter } from "@/components/site-footer";
import { SiteHeader } from "@/components/site-header";
import { getAssociationSettings } from "@/lib/services/association-settings";

Expand Down Expand Up @@ -143,6 +144,8 @@ export default async function PrivacyPage() {
← Retour à l'accueil
</Link>
</main>

<SiteFooter />
</div>
);
}
3 changes: 3 additions & 0 deletions src/app/inscription/[token]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import Link from "next/link";

import { FormattedText } from "@/components/formatted-text";
import { SiteFooter } from "@/components/site-footer";
import { SiteHeader } from "@/components/site-header";
import {
VolunteerSignupForm,
Expand Down Expand Up @@ -199,6 +200,8 @@ export default async function InscriptionPage({
</section>
</div>
</main>

<SiteFooter />
</div>
);
}
18 changes: 2 additions & 16 deletions src/app/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import {
import Link from "next/link";

import { FormattedText } from "@/components/formatted-text";
import { SiteFooter } from "@/components/site-footer";
import { SiteHeader } from "@/components/site-header";
import { getUpcomingPublishedEvents } from "@/lib/data";
import { formatDateTime } from "@/lib/dates";
Expand Down Expand Up @@ -336,22 +337,7 @@ export default async function HomePage() {
</section>
</main>

<footer className="bg-brand-950 py-8 text-sm text-brand-200">
<div className="mx-auto flex max-w-7xl flex-col items-center justify-between gap-4 px-4 text-center sm:flex-row sm:px-6 sm:text-left">
<div className="flex items-center gap-3">
<span className="h-3 w-3 rounded-full bg-sea-500" />
<p className="font-semibold">
{settings.associationName} — ensemble, pour nos enfants.
</p>
</div>
<Link
href="/confidentialite"
className="rounded-md font-bold text-white transition-colors hover:text-sea-200 focus:outline-none focus-visible:ring-4 focus-visible:ring-brand-700"
>
Politique de confidentialité
</Link>
</div>
</footer>
<SiteFooter />
</div>
);
}
3 changes: 3 additions & 0 deletions src/app/rejoindre/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import type { Metadata } from "next";
import Link from "next/link";

import { JoinForm } from "@/components/join-form";
import { SiteFooter } from "@/components/site-footer";
import { SiteHeader } from "@/components/site-header";
import { getAssociationSettings } from "@/lib/services/association-settings";

Expand Down Expand Up @@ -185,6 +186,8 @@ export default async function RejoindrePage() {
</div>
</section>
</main>

<SiteFooter />
</div>
);
}
40 changes: 40 additions & 0 deletions src/components/site-footer.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { Github } from "lucide-react";
import Link from "next/link";

import { PROJECT_REPOSITORY_URL } from "@/lib/app-config";
import { getAssociationSettings } from "@/lib/services/association-settings";

/** Pied de page commun aux écrans publics. */
export async function SiteFooter() {
const settings = await getAssociationSettings();

return (
<footer className="bg-brand-950 py-8 text-sm text-brand-200">
<div className="mx-auto flex max-w-7xl flex-col items-center justify-between gap-4 px-4 text-center sm:flex-row sm:px-6 sm:text-left">
<div className="flex items-center gap-3">
<span className="h-3 w-3 rounded-full bg-sea-500" aria-hidden="true" />
<p className="font-semibold">
{settings.associationName} — ensemble, pour nos enfants.
</p>
</div>
<div className="flex flex-wrap items-center justify-center gap-x-6 gap-y-2">
<Link
href="/confidentialite"
className="rounded-md font-bold text-white transition-colors hover:text-sea-200 focus:outline-none focus-visible:ring-4 focus-visible:ring-brand-700"
>
Politique de confidentialité
</Link>
<a
href={PROJECT_REPOSITORY_URL}
target="_blank"
rel="noreferrer"
className="inline-flex items-center gap-2 rounded-md font-bold text-white transition-colors hover:text-sea-200 focus:outline-none focus-visible:ring-4 focus-visible:ring-brand-700"
>
<Github className="h-4 w-4" aria-hidden="true" />
Code source du site
</a>
</div>
</div>
</footer>
);
}
10 changes: 10 additions & 0 deletions src/lib/app-config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,13 @@ export const CONTACT_EMAIL =
*/
export const ASSOCIATION_RNA =
process.env.NEXT_PUBLIC_ASSOCIATION_RNA?.trim() || "";

/**
* Dépôt du projet, au format `organisation/dépôt`. Même valeur que celle
* surveillée par l'indicateur de version : une instance dérivée renvoie ainsi
* vers son propre code, pas vers celui d'origine.
*/
export const PROJECT_REPOSITORY =
process.env.UPDATE_REPOSITORY?.trim() || "flocom/APEL-manager";

export const PROJECT_REPOSITORY_URL = `https://github.com/${PROJECT_REPOSITORY}`;
Loading