Skip to content

Commit f3b393d

Browse files
committed
Add footer docs
1 parent 379a646 commit f3b393d

File tree

5 files changed

+136
-11
lines changed

5 files changed

+136
-11
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ Documentation is generated by running `npm run generate`. This generates static
2727
| Exit this page | | |
2828
| Fieldset | Yes | |
2929
| File upload | Yes | |
30-
| Footer | | |
30+
| Footer | Yes | |
3131
| Header | Yes | |
3232
| Inset text | Yes | |
3333
| Notification banner | Yes | |

components/GvdPageWrapper.vue

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
</main>
1111
</div>
1212
</slot>
13-
<gv-footer copyright="Copyright © Matt Eason" copyright-href="http://github.com/matteason" :include-coat-of-arms="false" container-class="gvd-width-container">
13+
<gv-footer container-class="gvd-width-container">
1414
<template #meta>
1515
<gv-footer-meta>
16-
<template #items>
17-
<gv-footer-meta-item text="GOV.UK Vue on GitHub" href="https://github.com/govuk-vue/govuk-vue"/>
18-
</template>
16+
<gv-footer-meta-item text="GOV.UK Vue on GitHub" href="https://github.com/govuk-vue/govuk-vue"/>
1917
</gv-footer-meta>
2018
</template>
21-
<template #licence-logo/>
2219
<template #content-licence>
2320
Released under the <a href="https://opensource.org/license/mit/" class="govuk-footer__link">MIT License</a>.
2421
</template>
22+
<template #copyright>
23+
<a href="https://github.com/matteason" class="govuk-footer__link">Copyright © Matt Eason</a>
24+
</template>
2525
</gv-footer>
2626
</template>
2727

content/2.components/footer.md

Lines changed: 125 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,125 @@
1+
---
2+
layout: component
3+
---
4+
5+
# Footer
6+
7+
The footer provides copyright, licensing and other information about your service.
8+
9+
See the [GOV.UK Design System documentation on the footer](https://design-system.service.gov.uk/components/footer/)
10+
for more information on when to use this component.
11+
12+
```vue
13+
<gv-footer />
14+
```
15+
16+
## Meta links
17+
18+
To add meta links to the footer, use the `meta` slot and pass one or more `GvFooterMeta`s, each with one or more
19+
`GvFooterMetaItem`s. If you pass multiple `GvFooterMeta`s, they will be shown on top of each other.
20+
21+
Use meta links to add links to your:
22+
23+
- privacy notice
24+
- accessibility statement
25+
- cookies page
26+
- terms and conditions
27+
- other language options
28+
29+
You can [use router-link or nuxt-link](/get-started/using-router-link-or-nuxt-link) for your meta links if needed.
30+
31+
```vue
32+
<gv-footer>
33+
<template #meta>
34+
<gv-footer-meta>
35+
<gv-footer-meta-item href="#">Item 1</gv-footer-meta-item>
36+
<gv-footer-meta-item href="#">Item 2</gv-footer-meta-item>
37+
<gv-footer-meta-item href="#">Item 3</gv-footer-meta-item>
38+
</gv-footer-meta>
39+
</template>
40+
</gv-footer>
41+
```
42+
43+
## Secondary navigation
44+
45+
To add secondary navigation links footer, use the `navigation` slot and pass one or more `GvFooterNavigation`s, each
46+
with one or more `GvFooterNavigationItem`s.
47+
48+
Each group of navigation links can be split into multiple columns by passing a number to the `columns` prop, and
49+
groups can be shown side-by-side on larger screens by using the `width` prop. You can pass any GOV.UK Design System
50+
grid width here, for example, `one-third`; `two-thirds`; `one-half`.
51+
52+
You can [use router-link or nuxt-link](/get-started/using-router-link-or-nuxt-link) for your navigation links if needed.
53+
54+
```vue
55+
<gv-footer>
56+
<template #navigation>
57+
<gv-footer-navigation
58+
title="Two column list"
59+
width="two-thirds"
60+
:columns="2"
61+
>
62+
<gv-footer-navigation-item v-for="index in 6" :key="index" href="#">
63+
Navigation item {{ index }}
64+
</gv-footer-navigation-item>
65+
</gv-footer-navigation>
66+
<gv-footer-navigation
67+
title="Single column list"
68+
width="one-third"
69+
>
70+
<gv-footer-navigation-item v-for="index in 3" :key="index" href="#">
71+
Navigation item {{ index }}
72+
</gv-footer-navigation-item>
73+
</gv-footer-navigation>
74+
</template>
75+
</gv-footer>
76+
```
77+
78+
## Licence and copyright information.
79+
80+
By default, the footer will show that your content is Crown Copyright and licenced under the Open Government Licence.
81+
If either of these do not apply to your service, you can override them with the `content-licence` and `copyright` slots
82+
and props. For example, your content may use the MIT licence but still be under Crown Copyright.
83+
84+
```vue
85+
<gv-footer>
86+
<template #content-licence>
87+
Released under the <a href="https://opensource.org/license/mit/" class="govuk-footer__link">MIT License</a>.
88+
</template>
89+
</gv-footer>
90+
```
91+
92+
You can exclude the content licence or copyright by passing empty content to the slot.
93+
94+
```vue
95+
<gv-footer>
96+
<template #content-licence />
97+
<template #copyright>
98+
Copyright © Organisation Name
99+
</template>
100+
</gv-footer>
101+
```
102+
103+
```vue
104+
<gv-footer>
105+
<template #content-licence>
106+
All content freely available under <a href="https://creativecommons.org/publicdomain/zero/1.0/" class="govuk-footer__link">CC0</a>.
107+
</template>
108+
<template #copyright/>
109+
</gv-footer>
110+
```
111+
112+
::gvd-options{component="Footer" :showName=true}
113+
::
114+
115+
::gvd-options{component="FooterMeta" :showName=true}
116+
::
117+
118+
::gvd-options{component="FooterMetaItem" :showName=true}
119+
::
120+
121+
::gvd-options{component="FooterNavigation" :showName=true}
122+
::
123+
124+
::gvd-options{component="FooterNavigationItem" :showName=true}
125+
::

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@
1414
"vite-plugin-static-copy": "^0.16.0"
1515
},
1616
"dependencies": {
17-
"govuk-vue": "1.0.0-alpha.18"
17+
"govuk-vue": "1.0.0-alpha.20"
1818
}
1919
}

0 commit comments

Comments
 (0)