🎨 Format files, Added codeberg to links,lighter colour for linkcards
All checks were successful
Build and deploy website / build (push) Successful in 33s

This commit is contained in:
2025-02-15 14:59:32 +01:00
parent 04f279dab3
commit cb00252364
30 changed files with 151 additions and 103 deletions

View File

@ -7,7 +7,7 @@ interface TranslatedPathnames {
}
export type NavLink =
"/"
| "/"
| "/contact"
| "/projects"
| `/projects/${Project["id"]}`
@ -19,7 +19,7 @@ const paths: Set<NavLink> = new Set([
"/contact",
"/projects",
"/links",
"/uses"
"/uses",
])
/**
@ -33,13 +33,13 @@ const pathnames: Record<AbsolutePathname, TranslatedPathnames> = {}
for (const path of paths) {
pathnames[path] = {
nb: path,
en: `/en${path}`
en: `/en${path}`,
}
}
export function localizePathname(
pathname: NavLink,
locale: AvailableLanguageTag
locale: AvailableLanguageTag,
): string {
const pathnameParts = pathname.split("/")
const firstSegment: AbsolutePathname = `/${pathnameParts[1]}`