203 lines
8.5 KiB
TypeScript
203 lines
8.5 KiB
TypeScript
/* ============================================================================
|
||||
|
|
Footer - typed defaults
|
|||
|
|
----------------------------------------------------------------------------
|
|||
|
|
Draft copy is taken from docs/SHARPER_Website_Draft_Section_EN_AR.docx and the
|
|||
|
|
communication guideline; the section names are the ten-section IA. Everything
|
|||
|
|
here is a default only - Strapi will supply the same shapes later, so nothing
|
|||
|
|
below may be imported by anything except <Footer />'s own prop defaults.
|
|||
|
|
========================================================================= */
|
|||
|
|
|
|||
|
|
import { ROUTE_SLUGS } from "~/lib/route-slugs";
|
|||
|
|
|
|||
|
|
import type {
|
|||
|
|
FooterCopy,
|
|||
|
|
FooterLinkGroup,
|
|||
|
|
FooterLocale,
|
|||
|
|
FooterPartner,
|
|||
|
|
FooterSocialLink,
|
|||
|
|
} from "./types";
|
|||
|
|
|
|||
|
|
/* ---------------------------------------------------------------------------
|
|||
|
|
Assets - exported from Figma (frames 312:4012, 84:4483, 228:2984) and
|
|||
|
|
committed under apps/web/public/assets/. Two cuts of every piece of baked
|
|||
|
|
ink: the plain one for a light surface, `*-inverse` for a dark one.
|
|||
|
|
------------------------------------------------------------------------ */
|
|||
|
|
export const FOOTER_ASSETS = {
|
|||
|
|
/** SHARP-ER wordmark, designed 334x46 (figma 317:5571 / 317:7812). */
|
|||
|
|
wordmark: "/assets/sharp-er-wordmark.png",
|
|||
|
|
wordmarkInverse: "/assets/sharp-er-wordmark-inverse.png",
|
|||
|
|
/** EU emblem, designed 48x32 (figma 22:5358 / 238:2323). */
|
|||
|
|
euEmblem: "/assets/eu-emblem.png",
|
|||
|
|
euEmblemInverse: "/assets/eu-emblem-inverse.png",
|
|||
|
|
} as const;
|
|||
|
|
|
|||
|
|
/** Designed CSS pixels of the wordmark inside the footer brand column. */
|
|||
|
|
export const FOOTER_WORDMARK_SIZE = { width: 196, height: 27 } as const;
|
|||
|
|
|
|||
|
|
/** Designed CSS pixels of the EU emblem (figma "european union", 48x32). */
|
|||
|
|
export const FOOTER_EU_EMBLEM_SIZE = { width: 48, height: 32 } as const;
|
|||
|
|
|
|||
|
|
/* ---------------------------------------------------------------------------
|
|||
|
|
Route slugs
|
|||
|
|
The footer only ever builds `/{locale}/{slug}`, and the slugs come from the
|
|||
|
|
ONE source of truth the route config itself is built from - redeclaring them
|
|||
|
|
here is how the footer ended up linking at five pages that do not exist.
|
|||
|
|
Re-exported under the old name so the barrel keeps its public surface.
|
|||
|
|
------------------------------------------------------------------------ */
|
|||
|
|
export const FOOTER_ROUTE_SLUGS = ROUTE_SLUGS;
|
|||
|
|
|
|||
|
|
const path = (locale: FooterLocale, slug: string): string => `/${locale}/${slug}`;
|
|||
|
|
|
|||
|
|
/* ---------------------------------------------------------------------------
|
|||
|
|
Copy
|
|||
|
|
------------------------------------------------------------------------ */
|
|||
|
|
export const DEFAULT_FOOTER_COPY: Readonly<Record<FooterLocale, FooterCopy>> = {
|
|||
|
|
en: {
|
|||
|
|
tagline: "Shared Action on Rule of Law Progress – Exit Route",
|
|||
|
|
description:
|
|||
|
|
"A nationwide initiative supporting Libya’s civil society, local institutions and communities in advancing justice, accountability and good governance. Running from December 2025 to December 2027.",
|
|||
|
|
euStatement: "This project is funded by the European Union",
|
|||
|
|
euEmblemAlt: "Emblem of the European Union",
|
|||
|
|
implementedByLabel: "Implemented by",
|
|||
|
|
socialHeading: "Follow SHARP-ER",
|
|||
|
|
homeLabel: "SHARP-ER — home",
|
|||
|
|
navLabel: "Site sections",
|
|||
|
|
},
|
|||
|
|
ar: {
|
|||
|
|
tagline: "العمل المشترك لتعزيز سيادة القانون – مسار الخروج",
|
|||
|
|
description:
|
|||
|
|
"مبادرة وطنية تدعم المجتمع المدني والمؤسسات المحلية والمجتمعات الليبية في تعزيز العدالة والمساءلة والحوكمة الرشيدة. يمتد المشروع من ديسمبر 2025 إلى ديسمبر 2027.",
|
|||
|
|
euStatement: "هذا المشروع ممول من الاتحاد الأوروبي",
|
|||
|
|
euEmblemAlt: "شعار الاتحاد الأوروبي",
|
|||
|
|
implementedByLabel: "الجهات المنفّذة",
|
|||
|
|
socialHeading: "تابعوا SHARP-ER",
|
|||
|
|
homeLabel: "SHARP-ER — الصفحة الرئيسية",
|
|||
|
|
navLabel: "أقسام الموقع",
|
|||
|
|
},
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
/* ---------------------------------------------------------------------------
|
|||
|
|
Sitemap columns - the three IA groups. "Home" is not repeated as a link
|
|||
|
|
because the wordmark above the columns already points at it.
|
|||
|
|
------------------------------------------------------------------------ */
|
|||
|
|
const LINK_GROUPS: Readonly<
|
|||
|
|
Record<FooterLocale, readonly FooterLinkGroup[]>
|
|||
|
|
> = {
|
|||
|
|
en: [
|
|||
|
|
{
|
|||
|
|
id: "about-and-strategy",
|
|||
|
|
heading: "About and Strategy",
|
|||
|
|
links: [
|
|||
|
|
{ label: "About", href: path("en", FOOTER_ROUTE_SLUGS.about) },
|
|||
|
|
{ label: "What We Do", href: path("en", FOOTER_ROUTE_SLUGS.whatWeDo) },
|
|||
|
|
{
|
|||
|
|
label: "Activities and Initiatives",
|
|||
|
|
href: path("en", FOOTER_ROUTE_SLUGS.activities),
|
|||
|
|
},
|
|||
|
|
],
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "engagement-and-opportunities",
|
|||
|
|
heading: "Engagement and Opportunities",
|
|||
|
|
links: [
|
|||
|
|
{ label: "Events Calendar", href: path("en", FOOTER_ROUTE_SLUGS.events) },
|
|||
|
|
{
|
|||
|
|
label: "Applications and Opportunities",
|
|||
|
|
href: path("en", FOOTER_ROUTE_SLUGS.applications),
|
|||
|
|
},
|
|||
|
|
{ label: "News and Updates", href: path("en", FOOTER_ROUTE_SLUGS.news) },
|
|||
|
|
{ label: "Contact", href: path("en", FOOTER_ROUTE_SLUGS.contact) },
|
|||
|
|
],
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "knowledge-and-impact",
|
|||
|
|
heading: "Knowledge and Impact",
|
|||
|
|
links: [
|
|||
|
|
{
|
|||
|
|
label: "Resources and Publications",
|
|||
|
|
href: path("en", FOOTER_ROUTE_SLUGS.resources),
|
|||
|
|
},
|
|||
|
|
{ label: "Knowledge Hub", href: path("en", FOOTER_ROUTE_SLUGS.knowledgeHub) },
|
|||
|
|
],
|
|||
|
|
},
|
|||
|
|
],
|
|||
|
|
ar: [
|
|||
|
|
{
|
|||
|
|
id: "about-and-strategy",
|
|||
|
|
heading: "عن المشروع والاستراتيجية",
|
|||
|
|
links: [
|
|||
|
|
{ label: "عن المشروع", href: path("ar", FOOTER_ROUTE_SLUGS.about) },
|
|||
|
|
{ label: "ماذا نفعل", href: path("ar", FOOTER_ROUTE_SLUGS.whatWeDo) },
|
|||
|
|
{ label: "الأنشطة والمبادرات", href: path("ar", FOOTER_ROUTE_SLUGS.activities) },
|
|||
|
|
],
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "engagement-and-opportunities",
|
|||
|
|
heading: "المشاركة والفرص",
|
|||
|
|
links: [
|
|||
|
|
{ label: "التقويم الزمني للفعاليات", href: path("ar", FOOTER_ROUTE_SLUGS.events) },
|
|||
|
|
{ label: "طلبات وفرص المشاركة", href: path("ar", FOOTER_ROUTE_SLUGS.applications) },
|
|||
|
|
{ label: "الأخبار والمستجدات", href: path("ar", FOOTER_ROUTE_SLUGS.news) },
|
|||
|
|
{ label: "تواصل معنا", href: path("ar", FOOTER_ROUTE_SLUGS.contact) },
|
|||
|
|
],
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "knowledge-and-impact",
|
|||
|
|
heading: "المعرفة والأثر",
|
|||
|
|
links: [
|
|||
|
|
{ label: "الموارد والمنشورات", href: path("ar", FOOTER_ROUTE_SLUGS.resources) },
|
|||
|
|
{ label: "مركز المعرفة", href: path("ar", FOOTER_ROUTE_SLUGS.knowledgeHub) },
|
|||
|
|
],
|
|||
|
|
},
|
|||
|
|
],
|
|||
|
|
};
|
|||
|
|
|
|||
|
|
/** The three IA sitemap columns for a locale. */
|
|||
|
|
export function defaultFooterLinkGroups(
|
|||
|
|
locale: FooterLocale,
|
|||
|
|
): readonly FooterLinkGroup[] {
|
|||
|
|
return LINK_GROUPS[locale];
|
|||
|
|
}
|
|||
|
|
|
|||
|
|
/* ---------------------------------------------------------------------------
|
|||
|
|
Consortium logos - shown together, never standalone (communication guideline).
|
|||
|
|
Sizes are the designed boxes from figma frame 228:2984.
|
|||
|
|
------------------------------------------------------------------------ */
|
|||
|
|
export const DEFAULT_FOOTER_PARTNERS: readonly FooterPartner[] = [
|
|||
|
|
{
|
|||
|
|
id: "acted",
|
|||
|
|
name: "Acted",
|
|||
|
|
src: "/assets/partner-acted.png",
|
|||
|
|
srcInverse: "/assets/partner-acted-inverse.png",
|
|||
|
|
width: 86,
|
|||
|
|
height: 24,
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "uec",
|
|||
|
|
name: "United Efforts Consultancy (UEC)",
|
|||
|
|
src: "/assets/partner-uec.png",
|
|||
|
|
srcInverse: "/assets/partner-uec-inverse.png",
|
|||
|
|
width: 24,
|
|||
|
|
height: 24,
|
|||
|
|
},
|
|||
|
|
{
|
|||
|
|
id: "sbe",
|
|||
|
|
name: "Stichting Bureau Ensemble (SBE)",
|
|||
|
|
src: "/assets/partner-sbe.png",
|
|||
|
|
srcInverse: "/assets/partner-sbe-inverse.png",
|
|||
|
|
width: 43,
|
|||
|
|
height: 24,
|
|||
|
|
},
|
|||
|
|
];
|
|||
|
|
|
|||
|
|
/* ---------------------------------------------------------------------------
|
|||
|
|
Social profiles
|
|||
|
|
DELIBERATELY EMPTY. The draft copy names Facebook as the only confirmed
|
|||
|
|
channel and leaves its URL a placeholder, so there is no handle here that
|
|||
|
|
the project is known to own - and shipping a guessed one from an EU-funded
|
|||
|
|
site would point readers at an account somebody else may control.
|
|||
|
|
Real profiles arrive through the `socialLinks` prop (Strapi); the footer's
|
|||
|
|
`links.length > 0` guard drops the whole row until they do.
|
|||
|
|
------------------------------------------------------------------------ */
|
|||
|
|
export const DEFAULT_FOOTER_SOCIAL_LINKS: readonly FooterSocialLink[] = [];
|