Skip to content

Commit

Permalink
feat: fixed links to help articles, mark external links in header/foo…
Browse files Browse the repository at this point in the history
…ter, cleanup
  • Loading branch information
Lillebo committed Aug 13, 2024
1 parent 43ca394 commit c9bee59
Show file tree
Hide file tree
Showing 9 changed files with 33 additions and 25 deletions.
7 changes: 0 additions & 7 deletions .old-env.local

This file was deleted.

2 changes: 1 addition & 1 deletion apps/frontpage/src/app/[lang]/layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import RootLayout, { RootLayoutProps, generateStaticParams } from '@fdk-frontend

const metadata = {
title: 'data.norge.no - Forside',
description: 'data.norge.no er Norges offisielle portal for deling av data. Her kan du søke etter og laste ned datasett fra offentlige virksomheter, og bruke dem til å utvikle tjenester, apper, eller drive forskning.'
description: ' data.norge.no er det offentlige nettstedet som gir oversikt over beskrivelser av datasett, begrep, api-er og informasjonsmodeller. Innholdet blir levert av ulike virksomheter, offentlige og private. Det er Digitaliseringsdirektoratet som er ansvarlig for drift og utvikling av nettstedet.'
};

const FrontpageLayout = (props: RootLayoutProps) => (
Expand Down
3 changes: 2 additions & 1 deletion libs/dictionaries/src/lib/dictionaries/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"help": {
"heading": "Help and guidance",
"links": {
"getStarted": "Get started",
"findingData": "How to find data",
"sharingData": "How to share data",
"documentation": "Documentation",
"community": "Community"
}
Expand Down
3 changes: 2 additions & 1 deletion libs/dictionaries/src/lib/dictionaries/nb/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"help": {
"heading": "Hjelp og veiledning",
"links": {
"getStarted": "Kom i gang",
"findingData": "Hvordan finne data",
"sharingData": "Hvordan dele data",
"documentation": "Dokumentasjon",
"community": "Datalandsbyen"
}
Expand Down
3 changes: 2 additions & 1 deletion libs/dictionaries/src/lib/dictionaries/nn/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"help": {
"heading": "Hjelp og rettleiing",
"links": {
"getStarted": "Kom i gang",
"findingData": "Korleis finne data",
"sharingData": "Korleis dele data",
"documentation": "Dokumentasjon",
"community": "Datafellesskapet"
}
Expand Down
9 changes: 6 additions & 3 deletions libs/ui/src/lib/footer/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,18 @@ const getFooterData = (dictionary: Dictionary) => ({
policies: [
{
title: dictionary.footer.policies.a11yStatement,
href: `https://uustatus.no/nb/erklaringer/publisert/8020b962-b706-4cdf-ab8b-cdb5f480a696`
href: `https://uustatus.no/nb/erklaringer/publisert/8020b962-b706-4cdf-ab8b-cdb5f480a696`,
external: true
},
{
title: dictionary.footer.policies.privacyPolicy,
href: `https://www.digdir.no/digdir/personvernerklaering/706`
href: `https://www.digdir.no/digdir/personvernerklaering/706`,
external: true
},
{
title: dictionary.footer.policies.cookiePolicy,
href: `https://www.digdir.no/digdir/informasjonskapsler/707`
href: `https://www.digdir.no/digdir/informasjonskapsler/707`,
external: true
}
],
githubUri: `https://github.com/Informasjonsforvaltning`,
Expand Down
6 changes: 4 additions & 2 deletions libs/ui/src/lib/footer/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { Link, Heading } from '@digdir/designsystemet-react';
import { ExternalLinkIcon } from '@navikt/aksel-icons';
import { Dictionary } from '@fdk-frontend/dictionaries';
import { CatalogTypes } from '@fdk-frontend/types';

Expand Down Expand Up @@ -51,7 +52,7 @@ const Footer = ({ dictionary, baseUri }: FooterProps) => {
<ul>
{
mainMenuData.help.map(item => (
<li key={item.href}><Link href={item.href}>{item.title}</Link></li>
<li key={item.href}><Link href={item.href}>{item.title}{item.external && <ExternalLinkIcon fontSize="1em" />}</Link></li>
))
}
</ul>
Expand Down Expand Up @@ -80,13 +81,14 @@ const Footer = ({ dictionary, baseUri }: FooterProps) => {
}
{
footerData.policies.map(item => (
<li key={item.href}><Link href={item.href}>{item.title}</Link></li>
<li key={item.href}><Link href={item.href}>{item.title}{item.external && <ExternalLinkIcon fontSize="1em" />}</Link></li>
))
}
<li>
<Link className={styles.iconLink} href={footerData.githubUri}>
<GithubLogo fontSize='1.25em' />
{dictionary.footer.githubFollow}
<ExternalLinkIcon fontSize="1em" />
</Link>
</li>
</ul>
Expand Down
22 changes: 14 additions & 8 deletions libs/ui/src/lib/main-menu/data/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,25 +6,25 @@ const getMainMenuData = (dictionary: Dictionary, baseUri: string) => ({
key: 'datasets',
title: dictionary.mainMenu.catalogs.datasets.title,
description: dictionary.mainMenu.catalogs.datasets.description,
href: `${baseUri}/om-datasettkatalogen`
href: `${baseUri}/datasets`
},
{
key: 'apis',
title: dictionary.mainMenu.catalogs.apis.title,
description: dictionary.mainMenu.catalogs.apis.description,
href: `${baseUri}/om-api-katalogen`
href: `${baseUri}/data-services`
},
{
key: 'terms',
title: dictionary.mainMenu.catalogs.terms.title,
description: dictionary.mainMenu.catalogs.terms.description,
href: `${baseUri}/om-begrepskatalogen`
href: `${baseUri}/concepts`
},
{
key: 'information-models',
title: dictionary.mainMenu.catalogs.informationModels.title,
description: dictionary.mainMenu.catalogs.informationModels.description,
href: `${baseUri}/om-informasjonskatalogen`
href: `${baseUri}/information-models`
},
{
key: 'services-events',
Expand All @@ -41,16 +41,22 @@ const getMainMenuData = (dictionary: Dictionary, baseUri: string) => ({
],
help: [
{
title: dictionary.mainMenu.help.links.getStarted,
href: `${baseUri}/veiledning`
title: dictionary.mainMenu.help.links.findingData,
href: `${baseUri}/getting-started/finding-data`
},
{
title: dictionary.mainMenu.help.links.sharingData,
href: `${baseUri}/getting-started/publishing-intro`
},
{
title: dictionary.mainMenu.help.links.documentation,
href: `https://informasjonsforvaltning.github.io/`
href: `https://informasjonsforvaltning.github.io/`,
external: true
},
{
title: dictionary.mainMenu.help.links.community,
href: `https://datalandsbyen.norge.no/`
href: `https://datalandsbyen.norge.no/`,
external: true
}
],
tools: [
Expand Down
3 changes: 2 additions & 1 deletion libs/ui/src/lib/main-menu/index.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { motion } from 'framer-motion';
import { Link, Heading } from '@digdir/designsystemet-react';
import { ExternalLinkIcon } from '@navikt/aksel-icons';

import { Dictionary } from '@fdk-frontend/dictionaries';

Expand Down Expand Up @@ -53,7 +54,7 @@ const MainMenu = ({ dictionary, baseUri }: MainMenuProps) => {
<ul>
{
data.help.map(item => (
<li key={item.href}><Link href={item.href}>{item.title}</Link></li>
<li key={item.href}><Link href={item.href}>{item.title}{item.external && <>&nbsp;<ExternalLinkIcon fontSize="1em" /></>}</Link></li>
))
}
</ul>
Expand Down

0 comments on commit c9bee59

Please sign in to comment.