🎨 Format files, Added codeberg to links,lighter colour for linkcards
All checks were successful
Build and deploy website / build (push) Successful in 33s
All checks were successful
Build and deploy website / build (push) Successful in 33s
This commit is contained in:
@ -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]}`
|
||||
|
Reference in New Issue
Block a user