Skip to content

Commit

Permalink
Added docs for footer (#836)
Browse files Browse the repository at this point in the history
* added docs for footer

* typos

* fix broken link

* update version notice

* .

---------

Co-authored-by: Eirik Mikkelsen <eirik.mikkelsen@digdir.no>
  • Loading branch information
bjosttveit and altinnadmin authored Mar 16, 2023
1 parent 24e68b2 commit ced5b87
Show file tree
Hide file tree
Showing 2 changed files with 242 additions and 0 deletions.
121 changes: 121 additions & 0 deletions content/app/development/ux/footer/_index.en.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
title: Footer
description: How to configure the footer.
weight: 30
---

{{%notice warning%}}

Footer is only available in version 7.7 and higher.

{{% /notice%}}

In the footer you can put things like contact information, links, and other text. In new applications, the footer contains a link to Altinn 3's accessibility statement by default.

The footer is defined in the `footer .json` file under `App/ui`. This file is similar to other layout files, but is much simpler. The default footer is defined like this:

```json
{
"$schema": "https://altinncdn.no/schemas/json/layout/footer.schema.v1.json",
"footer": [
{
"type": "Link",
"icon": "information",
"title": "general.accessibility",
"target": "https://www.altinn.no/om-altinn/tilgjengelighet/"
}
]
}
```

New components can be added to the `footer` array.

## Components

{{% expandlarge id="email-component" header="Email" %}}

### Properties

| Property | Value |
| -------- | ---------------------------------------------------------------------------------------------------------------- |
| type | `Email` |
| title | The text resource to display. Does **not** support [formatting](/app/development/ux/texts/#formatting-of-texts). |
| target | The email address the link should point to. |

### Example

```json
{
"type": "Email",
"title": "hjelp@etaten.no",
"target": "hjelp@etaten.no"
}
```

{{% /expandlarge %}}

{{% expandlarge id="phone-component" header="Phone" %}}

### Properties

| Property | Value |
| -------- | ---------------------------------------------------------------------------------------------------------------- |
| type | `Phone` |
| title | The text resource to display. Does **not** support [formatting](/app/development/ux/texts/#formatting-of-texts). |
| target | The phone number the link should point to. |

### Example

```json
{
"type": "Phone",
"title": "+47 987 65 432",
"target": "+4798765432"
}
```

{{% /expandlarge %}}

{{% expandlarge id="link-component" header="Link" %}}

### Properties

| Property | Value |
| -------- | ---------------------------------------------------------------------------------------------------------------- |
| type | `Link` |
| title | The text resource to display. Does **not** support [formatting](/app/development/ux/texts/#formatting-of-texts). |
| target | The URL the link should point to. |
| icon | Icon to display next to the link. Either `information`, `email`, or `phone`. |

### Example

```json
{
"type": "Link",
"icon": "information",
"title": "general.accessibility",
"target": "https://www.altinn.no/om-altinn/tilgjengelighet/"
}
```

{{% /expandlarge %}}

{{% expandlarge id="text-component" header="Text" %}}

### Properties

| Property | Value |
| -------- | ---------------------------------------------------------------------------------------------------- |
| type | `Text` |
| title | The text resource to display. Supports [formatting](/app/development/ux/texts/#formatting-of-texts). |

### Example

```json
{
"type": "Text",
"title": "footer.description"
}
```

{{% /expandlarge %}}
121 changes: 121 additions & 0 deletions content/app/development/ux/footer/_index.nb.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,121 @@
---
title: Bunntekst
description: Hvordan konfigurere bunnteksten.
weight: 30
---

{{%notice warning%}}

Bunntekst er kun tilgjengelig i versjon 7.7 og nyere.

{{% /notice%}}

I bunnteksten kan du legge inn ting som kontaktinformasjon, lenker, og annen tekst. I nye applikasjoner inneholder bunnteksten en lenke til Altinn 3 sin tilgjengelighetserklæring.

Bunnteksten defineres i `footer.json` filen under `App/ui`. Denne filen ligner på andre layout filer, men er mye enklere. Standardbunnteksten er definert slik:

```json
{
"$schema": "https://altinncdn.no/schemas/json/layout/footer.schema.v1.json",
"footer": [
{
"type": "Link",
"icon": "information",
"title": "general.accessibility",
"target": "https://www.altinn.no/om-altinn/tilgjengelighet/"
}
]
}
```

Nye komponenter kan legges til i `footer`-listen.

## Komponenter

{{% expandlarge id="email-component" header="E-post" %}}

### Egenskaper

| Egenskap | Verdi |
| -------- | -------------------------------------------------------------------------------------------------------------------- |
| type | `Email` |
| title | Tekstresursen som skal vises. Støtter **ikke** [formattering](/nb/app/development/ux/texts/#formatering-av-tekster). |
| target | E-postadressen som lenkes til. |

### Eksempel

```json
{
"type": "Email",
"title": "hjelp@etaten.no",
"target": "hjelp@etaten.no"
}
```

{{% /expandlarge %}}

{{% expandlarge id="phone-component" header="Telefon" %}}

### Egenskaper

| Egenskap | Verdi |
| -------- | -------------------------------------------------------------------------------------------------------------------- |
| type | `Phone` |
| title | Tekstresursen som skal vises. Støtter **ikke** [formattering](/nb/app/development/ux/texts/#formatering-av-tekster). |
| target | Telefonnummeret som lenkes til. |

### Example

```json
{
"type": "Phone",
"title": "+47 987 65 432",
"target": "+4798765432"
}
```

{{% /expandlarge %}}

{{% expandlarge id="link-component" header="Lenke" %}}

### Egenskaper

| Egenskap | Verdi |
| -------- | -------------------------------------------------------------------------------------------------------------------- |
| type | `Link` |
| title | Tekstresursen som skal vises. Støtter **ikke** [formattering](/nb/app/development/ux/texts/#formatering-av-tekster). |
| target | URLen som lenkes til. |
| icon | Ikon som vises ved siden av lenken. Enten `information`, `email`, eller `phone`. |

### Example

```json
{
"type": "Link",
"icon": "information",
"title": "general.accessibility",
"target": "https://www.altinn.no/om-altinn/tilgjengelighet/"
}
```

{{% /expandlarge %}}

{{% expandlarge id="text-component" header="Tekst" %}}

### Egenskaper

| Egenskap | Verdi |
| -------- | ----------------------------------------------------------------------------------------------------------- |
| type | `Text` |
| title | Tekstresursen som skal vises. Støtter [formattering](/nb/app/development/ux/texts/#formatering-av-tekster). |

### Example

```json
{
"type": "Text",
"title": "footer.description"
}
```

{{% /expandlarge %}}

0 comments on commit ced5b87

Please sign in to comment.