@onsvisual/svelte-components 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +5 -0
- package/dist/@types/actions/cssVariables/index.d.ts +4 -0
- package/dist/@types/actions/resizeObserver/index.d.ts +4 -0
- package/dist/@types/components/layout/Accordion/Accordion.svelte.d.ts +27 -0
- package/dist/@types/components/layout/Accordion/AccordionItem.svelte.d.ts +31 -0
- package/dist/@types/components/layout/Container/Container.svelte.d.ts +39 -0
- package/dist/@types/components/layout/Footer/Footer.svelte.d.ts +31 -0
- package/dist/@types/components/layout/Footer/ONSLogo.svelte.d.ts +29 -0
- package/dist/@types/components/layout/Header/Header.svelte.d.ts +35 -0
- package/dist/@types/components/layout/Header/ONSLogo.svelte.d.ts +29 -0
- package/dist/@types/components/layout/Theme/Theme.svelte.d.ts +33 -0
- package/dist/@types/components/layout/Theme/themes.d.ts +29 -0
- package/dist/@types/components/layout/Twisty/Twisty.svelte.d.ts +29 -0
- package/dist/@types/components/ui/Button/Button.svelte.d.ts +43 -0
- package/dist/@types/components/ui/Button/Icon.svelte.d.ts +27 -0
- package/dist/@types/components/ui/Dropdown/Dropdown.svelte.d.ts +37 -0
- package/dist/@types/components/ui/Em/Em.svelte.d.ts +29 -0
- package/dist/@types/components/ui/Input/Input.svelte.d.ts +51 -0
- package/dist/@types/components/ui/Select/Select.svelte.d.ts +67 -0
- package/dist/@types/components/ui/Textarea/Textarea.svelte.d.ts +37 -0
- package/dist/@types/index.d.ts +13 -0
- package/dist/@types/js/utils.d.ts +10 -0
- package/dist/actions/cssVariables/index.js +20 -0
- package/dist/actions/resizeObserver/index.js +25 -0
- package/dist/components/layout/Accordion/Accordion.svelte +37 -0
- package/dist/components/layout/Accordion/AccordionItem.svelte +81 -0
- package/dist/components/layout/Container/Container.svelte +99 -0
- package/dist/components/layout/Footer/Footer.svelte +266 -0
- package/dist/components/layout/Footer/ONSLogo.svelte +150 -0
- package/dist/components/layout/Header/Header.svelte +513 -0
- package/dist/components/layout/Header/ONSLogo.svelte +150 -0
- package/dist/components/layout/Theme/Theme.svelte +91 -0
- package/dist/components/layout/Theme/themes.js +24 -0
- package/dist/components/layout/Twisty/Twisty.svelte +48 -0
- package/dist/components/ui/Button/Button.svelte +87 -0
- package/dist/components/ui/Button/Icon.svelte +50 -0
- package/dist/components/ui/Dropdown/Dropdown.svelte +62 -0
- package/dist/components/ui/Em/Em.svelte +44 -0
- package/dist/components/ui/Input/Input.svelte +163 -0
- package/dist/components/ui/Select/Select.svelte +257 -0
- package/dist/components/ui/Textarea/Textarea.svelte +99 -0
- package/dist/css/main.css +55 -0
- package/dist/globals.d.ts +23 -0
- package/dist/index.js +16 -0
- package/dist/js/utils.js +41 -0
- package/package.json +144 -0
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
// Shamelessly stolen from: https://github.com/kaisermann/svelte-css-vars
|
|
2
|
+
export default (node, props) => {
|
|
3
|
+
Object.entries(props).forEach(([key, value]) => {
|
|
4
|
+
node.style.setProperty(`--${key}`, value);
|
|
5
|
+
});
|
|
6
|
+
|
|
7
|
+
return {
|
|
8
|
+
update(newProps) {
|
|
9
|
+
Object.entries(newProps).forEach(([key, value]) => {
|
|
10
|
+
node.style.setProperty(`--${key}`, value);
|
|
11
|
+
delete props[key];
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
Object.keys(props).forEach((name) => {
|
|
15
|
+
node.style.removeProperty(`--${name}`);
|
|
16
|
+
});
|
|
17
|
+
props = newProps;
|
|
18
|
+
},
|
|
19
|
+
};
|
|
20
|
+
};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
// Shamelessly stolen from https://github.com/sveltejs/svelte/issues/7583#issue-1260717165
|
|
2
|
+
let observer;
|
|
3
|
+
let callbacks;
|
|
4
|
+
|
|
5
|
+
export default (element, onResize) => {
|
|
6
|
+
if (!observer) {
|
|
7
|
+
callbacks = new WeakMap();
|
|
8
|
+
observer = new ResizeObserver(entries => {
|
|
9
|
+
for (const entry of entries) {
|
|
10
|
+
const onResize = callbacks.get(entry.target);
|
|
11
|
+
if (onResize) onResize(entry.target);
|
|
12
|
+
}
|
|
13
|
+
});
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
callbacks.set(element, onResize);
|
|
17
|
+
observer.observe(element);
|
|
18
|
+
|
|
19
|
+
return {
|
|
20
|
+
destroy: () => {
|
|
21
|
+
callbacks.delete(element);
|
|
22
|
+
observer.unobserve(element);
|
|
23
|
+
},
|
|
24
|
+
};
|
|
25
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { setContext } from "svelte";
|
|
3
|
+
import { writable } from "svelte/store";
|
|
4
|
+
|
|
5
|
+
const elements = writable(new Set());
|
|
6
|
+
setContext("elements", elements);
|
|
7
|
+
|
|
8
|
+
const allOpen = writable(false);
|
|
9
|
+
setContext("allOpen", allOpen);
|
|
10
|
+
|
|
11
|
+
function toggleAll() {
|
|
12
|
+
$elements.forEach((el) => {
|
|
13
|
+
el.open = !$allOpen;
|
|
14
|
+
});
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/**
|
|
18
|
+
* Option to include a "show all" toggle above the accordion
|
|
19
|
+
* @type {boolean}
|
|
20
|
+
*/
|
|
21
|
+
export let showToggle = false;
|
|
22
|
+
</script>
|
|
23
|
+
|
|
24
|
+
<div id="accordion" class="ons-accordion">
|
|
25
|
+
{#if showToggle}
|
|
26
|
+
<button
|
|
27
|
+
type="button"
|
|
28
|
+
class="ons-btn ons-js-accordion-all ons-u-mb-s ons-btn--secondary ons-btn--small"
|
|
29
|
+
on:click="{() => toggleAll()}"
|
|
30
|
+
>
|
|
31
|
+
<span class="ons-btn__inner ons-js-accordion-all-inner"
|
|
32
|
+
><span class="ons-btn__text">{$allOpen ? "Hide all" : "Show all"}</span>
|
|
33
|
+
</span>
|
|
34
|
+
</button>
|
|
35
|
+
{/if}
|
|
36
|
+
<slot />
|
|
37
|
+
</div>
|
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { onMount, getContext } from "svelte";
|
|
3
|
+
import { slugify } from "../../../js/utils";
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* A title for the element
|
|
7
|
+
* @type {string}
|
|
8
|
+
*/
|
|
9
|
+
export let title = "Title";
|
|
10
|
+
/**
|
|
11
|
+
* A unique for the element (optional)
|
|
12
|
+
* @type {string}
|
|
13
|
+
*/
|
|
14
|
+
export let id = slugify(title);
|
|
15
|
+
/**
|
|
16
|
+
* Option for element to be open/expanded by default
|
|
17
|
+
* @type {boolean}
|
|
18
|
+
*/
|
|
19
|
+
export let open = false;
|
|
20
|
+
|
|
21
|
+
let el;
|
|
22
|
+
|
|
23
|
+
const elements = getContext("elements");
|
|
24
|
+
const allOpen = getContext("allOpen");
|
|
25
|
+
|
|
26
|
+
function updateAllOpen(open) {
|
|
27
|
+
if (el && $elements) {
|
|
28
|
+
$allOpen = open ? [...$elements].every((el) => el.open) : false;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
$: updateAllOpen(open);
|
|
32
|
+
|
|
33
|
+
onMount(() => {
|
|
34
|
+
$elements.add(el);
|
|
35
|
+
return () => $elements.delete(el);
|
|
36
|
+
});
|
|
37
|
+
</script>
|
|
38
|
+
|
|
39
|
+
<details
|
|
40
|
+
id="accordion-1"
|
|
41
|
+
class="ons-details ons-js-details ons-details--accordion"
|
|
42
|
+
data-group="accordion"
|
|
43
|
+
bind:this="{el}"
|
|
44
|
+
bind:open="{open}"
|
|
45
|
+
>
|
|
46
|
+
<summary class="ons-details__heading ons-js-details-heading">
|
|
47
|
+
<h2 class="ons-details__title">{title}</h2>
|
|
48
|
+
<span class="ons-details__icon">
|
|
49
|
+
<svg
|
|
50
|
+
class="ons-svg-icon"
|
|
51
|
+
viewBox="0 0 8 13"
|
|
52
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
53
|
+
focusable="false"
|
|
54
|
+
fill="currentColor"
|
|
55
|
+
>
|
|
56
|
+
<path
|
|
57
|
+
d="M5.74,14.28l-.57-.56a.5.5,0,0,1,0-.71h0l5-5-5-5a.5.5,0,0,1,0-.71h0l.57-.56a.5.5,0,0,1,.71,0h0l5.93,5.93a.5.5,0,0,1,0,.7L6.45,14.28a.5.5,0,0,1-.71,0Z"
|
|
58
|
+
transform="translate(-5.02 -1.59)"></path>
|
|
59
|
+
</svg>
|
|
60
|
+
</span>
|
|
61
|
+
</summary>
|
|
62
|
+
<div id="{id}-content" class="ons-details__content ons-js-details-content">
|
|
63
|
+
<slot />
|
|
64
|
+
</div>
|
|
65
|
+
</details>
|
|
66
|
+
|
|
67
|
+
<style>
|
|
68
|
+
.ons-details__heading {
|
|
69
|
+
color: var(--link, --ons-color-text-link);
|
|
70
|
+
}
|
|
71
|
+
.ons-details__heading:hover {
|
|
72
|
+
color: var(--link, --ons-color-text-link-hover);
|
|
73
|
+
}
|
|
74
|
+
.ons-svg-icon {
|
|
75
|
+
color: var(--link, --ons-color-text-link);
|
|
76
|
+
fill: var(--link, --ons-color-text-link);
|
|
77
|
+
}
|
|
78
|
+
.ons-details__heading:hover:not(:focus) .ons-details__title {
|
|
79
|
+
-webkit-text-decoration: underline solid var(--link-hover, --ons-color-text-link-hover) 2px;
|
|
80
|
+
text-decoration: underline solid var(--link-hover, --ons-color-text-link-hover) 2px;
|
|
81
|
+
}</style>
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import Theme from "../Theme/Theme.svelte";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Sets the width of the container
|
|
6
|
+
* @type {"narrow"|"medium"|"wide"|"full"}
|
|
7
|
+
*/
|
|
8
|
+
export let width = "medium";
|
|
9
|
+
/**
|
|
10
|
+
* Sets the minimum height of the container relative to the height of the viewport
|
|
11
|
+
* @type {"auto"|"tall"|"full"}
|
|
12
|
+
*/
|
|
13
|
+
export let height = "auto";
|
|
14
|
+
/**
|
|
15
|
+
* Optional margin above container
|
|
16
|
+
* @type {boolean}
|
|
17
|
+
*/
|
|
18
|
+
export let marginTop = false;
|
|
19
|
+
/**
|
|
20
|
+
* Optional margin below container
|
|
21
|
+
* @type {boolean}
|
|
22
|
+
*/
|
|
23
|
+
export let marginBottom = false;
|
|
24
|
+
/**
|
|
25
|
+
* Sets a predefined theme
|
|
26
|
+
* @type {"light"|"dark"|"lightblue"}
|
|
27
|
+
*/
|
|
28
|
+
export let theme = null;
|
|
29
|
+
/**
|
|
30
|
+
* Define additional props to override the base theme
|
|
31
|
+
* @type {object}
|
|
32
|
+
*/
|
|
33
|
+
export let themeOverrides = null;
|
|
34
|
+
/**
|
|
35
|
+
* Overrides the base theme background (accepts any valid CSS background value)
|
|
36
|
+
* @type {string}
|
|
37
|
+
*/
|
|
38
|
+
export let background = null;
|
|
39
|
+
</script>
|
|
40
|
+
|
|
41
|
+
{#if marginTop}<div class="ons-spacer"></div>{/if}
|
|
42
|
+
{#if width === "narrow"}
|
|
43
|
+
<Theme theme="{theme}" background="{background}" overrides="{themeOverrides}">
|
|
44
|
+
<div
|
|
45
|
+
class="ons-page__container ons-container"
|
|
46
|
+
class:ons-page__container--tall-height="{height === 'tall'}"
|
|
47
|
+
class:ons-page__container--full-height="{height === 'full'}"
|
|
48
|
+
>
|
|
49
|
+
<div class="ons-page__container--narrow">
|
|
50
|
+
<slot />
|
|
51
|
+
</div>
|
|
52
|
+
</div>
|
|
53
|
+
</Theme>
|
|
54
|
+
{:else}
|
|
55
|
+
<Theme theme="{theme}" background="{background}" overrides="{themeOverrides}">
|
|
56
|
+
<div
|
|
57
|
+
class="ons-page__container ons-container"
|
|
58
|
+
class:ons-page__container--wide="{width === 'wide'}"
|
|
59
|
+
class:ons-page__container--full="{width === 'full'}"
|
|
60
|
+
class:ons-page__container--tall-height="{height === 'tall'}"
|
|
61
|
+
class:ons-page__container--full-height="{height === 'full'}"
|
|
62
|
+
>
|
|
63
|
+
<slot />
|
|
64
|
+
</div>
|
|
65
|
+
</Theme>
|
|
66
|
+
{/if}
|
|
67
|
+
{#if marginBottom}<div class="ons-spacer"></div>{/if}
|
|
68
|
+
|
|
69
|
+
<style>
|
|
70
|
+
.ons-page__container {
|
|
71
|
+
background: var(--background, "none");
|
|
72
|
+
}
|
|
73
|
+
.ons-page__container--narrow {
|
|
74
|
+
max-width: 640px;
|
|
75
|
+
margin: 0 auto 0 0;
|
|
76
|
+
}
|
|
77
|
+
.ons-page__container--wide {
|
|
78
|
+
max-width: 1240px;
|
|
79
|
+
}
|
|
80
|
+
.ons-page__container--full {
|
|
81
|
+
width: 100%;
|
|
82
|
+
max-width: 100%;
|
|
83
|
+
margin: 0;
|
|
84
|
+
padding: 0;
|
|
85
|
+
}
|
|
86
|
+
.ons-page__container--tall-height {
|
|
87
|
+
min-height: 80vh;
|
|
88
|
+
display: flex;
|
|
89
|
+
align-items: center;
|
|
90
|
+
}
|
|
91
|
+
.ons-page__container--full-height {
|
|
92
|
+
min-height: 100vh;
|
|
93
|
+
display: flex;
|
|
94
|
+
align-items: center;
|
|
95
|
+
}
|
|
96
|
+
.ons-page__container--vpadding {
|
|
97
|
+
padding-top: 20px;
|
|
98
|
+
padding-bottom: 20px;
|
|
99
|
+
}</style>
|
|
@@ -0,0 +1,266 @@
|
|
|
1
|
+
<script>
|
|
2
|
+
import { onMount, getContext } from "svelte";
|
|
3
|
+
import Theme from "../Theme/Theme.svelte";
|
|
4
|
+
|
|
5
|
+
const page = getContext("page");
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Display compact header without menus
|
|
9
|
+
* @type {boolean}
|
|
10
|
+
*/
|
|
11
|
+
export let compact = false;
|
|
12
|
+
/**
|
|
13
|
+
* Sets a predefined theme
|
|
14
|
+
* @type {"light"|"dark"}
|
|
15
|
+
*/
|
|
16
|
+
export let theme = null;
|
|
17
|
+
/**
|
|
18
|
+
* Define additional props to override the base theme
|
|
19
|
+
* @type {object}
|
|
20
|
+
*/
|
|
21
|
+
export let themeOverrides = null;
|
|
22
|
+
|
|
23
|
+
let lang = "en";
|
|
24
|
+
let baseurl = "//www.ons.gov.uk";
|
|
25
|
+
let path = "";
|
|
26
|
+
let mounted = false;
|
|
27
|
+
|
|
28
|
+
function setPaths(mounted, page) {
|
|
29
|
+
if (mounted) {
|
|
30
|
+
const url = page?.url || document.location;
|
|
31
|
+
lang = url.host.startsWith("cy") ? "cy" : "en";
|
|
32
|
+
baseurl = `//${url.host}`;
|
|
33
|
+
path = url.pathname;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
$: setPaths(mounted, $page);
|
|
37
|
+
onMount(() => (mounted = true));
|
|
38
|
+
|
|
39
|
+
const texts = {
|
|
40
|
+
"Footer links": "",
|
|
41
|
+
Help: "Cymorth",
|
|
42
|
+
Accessibility: "Hygyrchedd",
|
|
43
|
+
Cookies: "Cwcis",
|
|
44
|
+
Privacy: "Preifatrwydd",
|
|
45
|
+
"Terms and conditions": "Telerau ac amodau",
|
|
46
|
+
"About ONS": "Ynglŷn ag SYG",
|
|
47
|
+
"What we do": "Beth rydym yn ei wneud",
|
|
48
|
+
Careers: "Gyrfaoedd",
|
|
49
|
+
"Contact us": "Cysylltu â ni",
|
|
50
|
+
News: "Newyddion",
|
|
51
|
+
"Freedom of Information": "Rhyddid Gwybodaeth",
|
|
52
|
+
"Connect with us": "Cysylltu â ni",
|
|
53
|
+
Consultations: "Ymgynghoriadau",
|
|
54
|
+
"Discussion forums": "Fforymau trafod",
|
|
55
|
+
"Email alerts": "Rhybuddion ebost",
|
|
56
|
+
"All content is available under the": "Mae'r holl gynnwys ar gael o dan delerau'r",
|
|
57
|
+
"Open Government Licence v3.0": "Drwydded Llywodraeth Agored v3.0",
|
|
58
|
+
"except where otherwise stated": "ac eithrio lle y nodir fel arall",
|
|
59
|
+
};
|
|
60
|
+
|
|
61
|
+
const i18n = (text) => (lang == "cy" && texts[text] ? texts[text] : text);
|
|
62
|
+
|
|
63
|
+
onMount(() => {
|
|
64
|
+
if (!path) {
|
|
65
|
+
const url = document.location;
|
|
66
|
+
lang = url.host.startsWith("cy") ? "cy" : "en";
|
|
67
|
+
baseurl = `//${url.host}`;
|
|
68
|
+
path = url.pathname;
|
|
69
|
+
}
|
|
70
|
+
});
|
|
71
|
+
</script>
|
|
72
|
+
|
|
73
|
+
<Theme theme="{theme}" overrides="{themeOverrides}" background="none">
|
|
74
|
+
<footer class="print--hide padding-top--13">
|
|
75
|
+
<section>
|
|
76
|
+
<slot name="before" />
|
|
77
|
+
<h2 class="visuallyhidden">{i18n("Footer links")}</h2>
|
|
78
|
+
<div class="footer">
|
|
79
|
+
<div class="wrapper">
|
|
80
|
+
<nav aria-label="Footer links">
|
|
81
|
+
{#if compact}
|
|
82
|
+
<ul class="ons-list ons-u-mt-m ons-footer--rows ons-list--bare ons-list--inline">
|
|
83
|
+
<li class="ons-list__item">
|
|
84
|
+
<a href="/help/accessibility" class="ons-list__link">{i18n("Accessibility")}</a>
|
|
85
|
+
</li>
|
|
86
|
+
<li class="ons-list__item">
|
|
87
|
+
<a href="/cookies" class="ons-list__link">{i18n("Cookies")}</a>
|
|
88
|
+
</li>
|
|
89
|
+
<li class="ons-list__item">
|
|
90
|
+
<a href="/help/privacynotice" class="ons-list__link">{i18n("Privacy")}</a>
|
|
91
|
+
</li>
|
|
92
|
+
<li class="ons-list__item">
|
|
93
|
+
<a href="/help/termsandconditions" class="ons-list__link"
|
|
94
|
+
>{i18n("Terms and conditions")}</a
|
|
95
|
+
>
|
|
96
|
+
</li>
|
|
97
|
+
</ul>
|
|
98
|
+
{:else}
|
|
99
|
+
<div class="footer-nav col-wrap">
|
|
100
|
+
<div class="col col--lg-one-third col--md-one-third">
|
|
101
|
+
<h2 class="footer-nav__heading">{i18n("Help")}</h2>
|
|
102
|
+
<ul class="footer-nav__list">
|
|
103
|
+
<li class="footer-nav__item">
|
|
104
|
+
<a href="/help/accessibility">{i18n("Accessibility")}</a>
|
|
105
|
+
</li>
|
|
106
|
+
<li class="footer-nav__item">
|
|
107
|
+
<a href="/cookies">{i18n("Cookies")}</a>
|
|
108
|
+
</li>
|
|
109
|
+
<li class="footer-nav__item">
|
|
110
|
+
<a href="/help/privacynotice">{i18n("Privacy")}</a>
|
|
111
|
+
</li>
|
|
112
|
+
<li class="footer-nav__item">
|
|
113
|
+
<a href="/help/termsandconditions">{i18n("Terms and conditions")}</a>
|
|
114
|
+
</li>
|
|
115
|
+
</ul>
|
|
116
|
+
</div>
|
|
117
|
+
<div class="col col--lg-one-third col--md-one-third">
|
|
118
|
+
<h2 class="footer-nav__heading">{i18n("About ONS")}</h2>
|
|
119
|
+
<ul class="footer-nav__list">
|
|
120
|
+
<li class="footer-nav__item">
|
|
121
|
+
<a href="/aboutus/whatwedo">{i18n("What we do")}</a>
|
|
122
|
+
</li>
|
|
123
|
+
<li class="footer-nav__item">
|
|
124
|
+
<a href="/aboutus/careers">{i18n("Careers")}</a>
|
|
125
|
+
</li>
|
|
126
|
+
<li class="footer-nav__item">
|
|
127
|
+
<a href="/aboutus/contactus">{i18n("Contact us")}</a>
|
|
128
|
+
</li>
|
|
129
|
+
<li class="footer-nav__item">
|
|
130
|
+
<a href="/news">{i18n("News")}</a>
|
|
131
|
+
</li>
|
|
132
|
+
<li class="footer-nav__item">
|
|
133
|
+
<a href="/aboutus/transparencyandgovernance/freedomofinformationfoi"
|
|
134
|
+
>{i18n("Freedom of Information")}</a
|
|
135
|
+
>
|
|
136
|
+
</li>
|
|
137
|
+
</ul>
|
|
138
|
+
</div>
|
|
139
|
+
<div class="col col--lg-one-third col--md-one-third">
|
|
140
|
+
<h2 class="footer-nav__heading">{i18n("Connect with us")}</h2>
|
|
141
|
+
<ul class="footer-nav__list">
|
|
142
|
+
<li class="footer-nav__item">
|
|
143
|
+
<a href="https://twitter.com/ONS" class="icon--hide" target="_blank"
|
|
144
|
+
>{i18n("Twitter")}</a
|
|
145
|
+
>
|
|
146
|
+
</li>
|
|
147
|
+
<li class="footer-nav__item">
|
|
148
|
+
<a
|
|
149
|
+
href="https://www.instagram.com/officefornationalstatistics/"
|
|
150
|
+
class="icon--hide"
|
|
151
|
+
target="_blank">{i18n("Instagram")}</a
|
|
152
|
+
>
|
|
153
|
+
</li>
|
|
154
|
+
<li class="footer-nav__item">
|
|
155
|
+
<a href="https://www.facebook.com/ONS" class="icon--hide" target="_blank"
|
|
156
|
+
>{i18n("Facebook")}</a
|
|
157
|
+
>
|
|
158
|
+
</li>
|
|
159
|
+
<li class="footer-nav__item">
|
|
160
|
+
<a
|
|
161
|
+
href="https://www.linkedin.com/company/office-for-national-statistics"
|
|
162
|
+
class="icon--hide"
|
|
163
|
+
target="_blank">{i18n("LinkedIn")}</a
|
|
164
|
+
>
|
|
165
|
+
</li>
|
|
166
|
+
<li class="footer-nav__item">
|
|
167
|
+
<a href="https://consultations.ons.gov.uk/" class="icon--hide" target="_blank"
|
|
168
|
+
>{i18n("Consultations")}</a
|
|
169
|
+
>
|
|
170
|
+
</li>
|
|
171
|
+
<li class="footer-nav__item">
|
|
172
|
+
<a
|
|
173
|
+
href="https://www.statsusernet.org.uk/login"
|
|
174
|
+
class="icon--hide"
|
|
175
|
+
target="_blank">{i18n("Discussion forums")}</a
|
|
176
|
+
>
|
|
177
|
+
</li>
|
|
178
|
+
<li class="footer-nav__item">
|
|
179
|
+
<a
|
|
180
|
+
href="https://public.govdelivery.com/accounts/UKONS/subscribers/new"
|
|
181
|
+
class="icon--hide"
|
|
182
|
+
target="_blank">{i18n("Email alerts")}</a
|
|
183
|
+
>
|
|
184
|
+
</li>
|
|
185
|
+
</ul>
|
|
186
|
+
</div>
|
|
187
|
+
</div>
|
|
188
|
+
<hr class="ons-footer__hr" />
|
|
189
|
+
{/if}
|
|
190
|
+
</nav>
|
|
191
|
+
</div>
|
|
192
|
+
<div class="wrapper">
|
|
193
|
+
<div class="footer-license">
|
|
194
|
+
<svg
|
|
195
|
+
class="ons-footer__ogl-img"
|
|
196
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
197
|
+
width="60px"
|
|
198
|
+
height="24px"
|
|
199
|
+
viewBox="0 0 60 24"
|
|
200
|
+
focusable="false"
|
|
201
|
+
aria-hidden="true"
|
|
202
|
+
>
|
|
203
|
+
<path
|
|
204
|
+
d="M51.7,17.5V0l-6.2,4v19.8h13.8v-6.2H51.7z
|
|
205
|
+
M36.7,16.3c-1,0.9-2.4,1.4-3.8,1.4c-3.2,0-5.8-2.6-5.8-5.8s2.6-5.8,5.8-5.8c2,0,3.9,1.1,4.9,2.7L43,5.6C40.9,2.2,37.1,0,32.9,0c-4.5,0-8.4,2.5-10.4,6.1C20.4,2.5,16.5,0,12,0C5.4,0,0,5.4,0,12s5.4,12,12,12c4.5,0,8.4-2.5,10.4-6.1c2.1,3.6,6,6.1,10.4,6.1c3,0,5.8-1.1,7.9-3l2.4,2.7h0.4V13h-9.8L36.7,16.3zM12,17.8c-3.2,0-5.8-2.6-5.8-5.8S8.8,6.2,12,6.2s5.8,2.6,5.8,5.8S15.2,17.8,12,17.8"
|
|
206
|
+
fill="currentColor"></path>
|
|
207
|
+
</svg>
|
|
208
|
+
<p class="footer-license__text margin-left-sm--0">
|
|
209
|
+
{i18n("All content is available under the")}
|
|
210
|
+
<a
|
|
211
|
+
class="ons-external-link"
|
|
212
|
+
href="http://www.nationalarchives.gov.uk/doc/open-government-licence{lang === 'cy'
|
|
213
|
+
? '-cymraeg'
|
|
214
|
+
: ''}/version/3/"
|
|
215
|
+
target="_blank"
|
|
216
|
+
>{i18n("Open Government Licence v3.0")}<span class="ons-external-link__icon"
|
|
217
|
+
><svg
|
|
218
|
+
class="ons-svg-icon"
|
|
219
|
+
viewBox="0 0 12 12"
|
|
220
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
221
|
+
focusable="false"
|
|
222
|
+
fill="currentColor"
|
|
223
|
+
><path
|
|
224
|
+
d="M13.5,9H13a.5.5,0,0,0-.5.5v3h-9v-9h3A.5.5,0,0,0,7,3V2.5A.5.5,0,0,0,6.5,2h-4a.5.5,0,0,0-.5.5v11a.5.5,0,0,0,.5.5h11a.5.5,0,0,0,.5-.5v-4A.5.5,0,0,0,13.5,9Z"
|
|
225
|
+
transform="translate(-2 -1.99)"></path><path
|
|
226
|
+
d="M8.83,7.88a.51.51,0,0,0,.71,0l2.31-2.32,1.28,1.28A.51.51,0,0,0,14,6.49v-4a.52.52,0,0,0-.5-.5h-4A.51.51,0,0,0,9,2.52a.58.58,0,0,0,.14.33l1.28,1.28L8.12,6.46a.51.51,0,0,0,0,.71Z"
|
|
227
|
+
transform="translate(-2 -1.99)"></path></svg
|
|
228
|
+
></span
|
|
229
|
+
></a
|
|
230
|
+
> , {i18n("except where otherwise stated")}
|
|
231
|
+
</p>
|
|
232
|
+
</div>
|
|
233
|
+
</div>
|
|
234
|
+
</div>
|
|
235
|
+
</section>
|
|
236
|
+
<div id="viewport-sm" class="js-viewport-size"></div>
|
|
237
|
+
<div id="viewport-md" class="js-viewport-size"></div>
|
|
238
|
+
<div id="viewport-lg" class="js-viewport-size"></div>
|
|
239
|
+
</footer>
|
|
240
|
+
</Theme>
|
|
241
|
+
|
|
242
|
+
<style>
|
|
243
|
+
.ons-list__link {
|
|
244
|
+
margin: 0;
|
|
245
|
+
}
|
|
246
|
+
.footer {
|
|
247
|
+
color: var(--text, #222);
|
|
248
|
+
background: var(--pale, rgb(245, 245, 246));
|
|
249
|
+
}
|
|
250
|
+
a {
|
|
251
|
+
color: var(--text, rgb(65, 64, 66)) !important;
|
|
252
|
+
opacity: 90%;
|
|
253
|
+
}
|
|
254
|
+
a:hover {
|
|
255
|
+
color: var(--text, black);
|
|
256
|
+
text-decoration-color: var(--link-hover, black);
|
|
257
|
+
opacity: 100%;
|
|
258
|
+
}
|
|
259
|
+
.ons-footer__ogl-img {
|
|
260
|
+
color: var(--text, #222) !important;
|
|
261
|
+
opacity: 85%;
|
|
262
|
+
}
|
|
263
|
+
.ons-svg-icon {
|
|
264
|
+
fill: var(--text, #222) !important;
|
|
265
|
+
opacity: 85%;
|
|
266
|
+
}</style>
|