@ndla/ui 50.10.2 → 50.10.3
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/es/AudioPlayer/SpeechControl.js +4 -3
- package/es/Footer/Footer.js +35 -71
- package/es/Footer/FooterLinks.js +65 -52
- package/es/Footer/FooterText.js +2 -4
- package/es/Gloss/Gloss.js +10 -9
- package/es/LanguageSelector/LanguageSelector.js +6 -6
- package/es/SearchTypeResult/SearchTypeHeader.js +10 -9
- package/es/locale/messages-en.js +7 -3
- package/es/locale/messages-nb.js +7 -3
- package/es/locale/messages-nn.js +7 -3
- package/es/locale/messages-se.js +6 -2
- package/es/locale/messages-sma.js +7 -3
- package/lib/AudioPlayer/SpeechControl.d.ts +2 -1
- package/lib/AudioPlayer/SpeechControl.js +4 -3
- package/lib/Footer/Footer.d.ts +1 -2
- package/lib/Footer/Footer.js +32 -68
- package/lib/Footer/FooterLinks.d.ts +5 -1
- package/lib/Footer/FooterLinks.js +65 -50
- package/lib/Footer/FooterText.js +2 -4
- package/lib/Gloss/Gloss.js +10 -9
- package/lib/LanguageSelector/LanguageSelector.js +5 -5
- package/lib/SearchTypeResult/SearchTypeHeader.js +10 -9
- package/lib/locale/messages-en.d.ts +4 -0
- package/lib/locale/messages-en.js +7 -3
- package/lib/locale/messages-nb.d.ts +4 -0
- package/lib/locale/messages-nb.js +7 -3
- package/lib/locale/messages-nn.d.ts +4 -0
- package/lib/locale/messages-nn.js +7 -3
- package/lib/locale/messages-se.d.ts +4 -0
- package/lib/locale/messages-se.js +6 -2
- package/lib/locale/messages-sma.d.ts +4 -0
- package/lib/locale/messages-sma.js +7 -3
- package/package.json +11 -11
- package/src/AudioPlayer/SpeechControl.tsx +4 -3
- package/src/Footer/Footer.stories.tsx +4 -13
- package/src/Footer/Footer.tsx +46 -117
- package/src/Footer/FooterLinks.tsx +73 -65
- package/src/Footer/FooterText.tsx +5 -9
- package/src/Gloss/Gloss.tsx +7 -6
- package/src/LanguageSelector/LanguageSelector.tsx +2 -1
- package/src/SearchTypeResult/SearchTypeHeader.tsx +8 -1
- package/src/locale/messages-en.ts +7 -3
- package/src/locale/messages-nb.ts +7 -3
- package/src/locale/messages-nn.ts +7 -3
- package/src/locale/messages-se.ts +6 -2
- package/src/locale/messages-sma.ts +7 -3
- package/es/Footer/FooterPrivacy.js +0 -60
- package/lib/Footer/FooterPrivacy.d.ts +0 -15
- package/lib/Footer/FooterPrivacy.js +0 -64
- package/src/Footer/FooterPrivacy.tsx +0 -70
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "50.10.
|
|
3
|
+
"version": "50.10.3",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -31,19 +31,19 @@
|
|
|
31
31
|
"types"
|
|
32
32
|
],
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@ndla/accordion": "^3.0.
|
|
35
|
-
"@ndla/button": "^12.0.
|
|
36
|
-
"@ndla/carousel": "^4.0.
|
|
34
|
+
"@ndla/accordion": "^3.0.33",
|
|
35
|
+
"@ndla/button": "^12.0.36",
|
|
36
|
+
"@ndla/carousel": "^4.0.34",
|
|
37
37
|
"@ndla/core": "^4.4.2",
|
|
38
38
|
"@ndla/dropdown-menu": "^1.0.30",
|
|
39
|
-
"@ndla/forms": "^7.0.
|
|
39
|
+
"@ndla/forms": "^7.0.5",
|
|
40
40
|
"@ndla/hooks": "^2.1.5",
|
|
41
|
-
"@ndla/icons": "^5.0
|
|
41
|
+
"@ndla/icons": "^5.1.0",
|
|
42
42
|
"@ndla/licenses": "^7.2.5",
|
|
43
|
-
"@ndla/modal": "^5.0.
|
|
44
|
-
"@ndla/notion": "^6.0.
|
|
45
|
-
"@ndla/safelink": "^4.1.
|
|
46
|
-
"@ndla/select": "^3.3.
|
|
43
|
+
"@ndla/modal": "^5.0.33",
|
|
44
|
+
"@ndla/notion": "^6.0.34",
|
|
45
|
+
"@ndla/safelink": "^4.1.61",
|
|
46
|
+
"@ndla/select": "^3.3.8",
|
|
47
47
|
"@ndla/switch": "^1.1.36",
|
|
48
48
|
"@ndla/tabs": "^3.2.16",
|
|
49
49
|
"@ndla/tooltip": "^6.0.19",
|
|
@@ -81,5 +81,5 @@
|
|
|
81
81
|
"publishConfig": {
|
|
82
82
|
"access": "public"
|
|
83
83
|
},
|
|
84
|
-
"gitHead": "
|
|
84
|
+
"gitHead": "f18e2cd060436b8cc28f4c6368ea7647e93c9ec6"
|
|
85
85
|
}
|
|
@@ -15,9 +15,10 @@ import Tooltip from "@ndla/tooltip";
|
|
|
15
15
|
type Props = {
|
|
16
16
|
src: string;
|
|
17
17
|
title: string;
|
|
18
|
+
type?: "gloss" | "audio";
|
|
18
19
|
};
|
|
19
20
|
|
|
20
|
-
const SpeechControl = ({ src, title }: Props) => {
|
|
21
|
+
const SpeechControl = ({ src, title, type = "audio" }: Props) => {
|
|
21
22
|
const { t } = useTranslation();
|
|
22
23
|
const audioRef = useRef<HTMLAudioElement>(null);
|
|
23
24
|
|
|
@@ -35,8 +36,8 @@ const SpeechControl = ({ src, title }: Props) => {
|
|
|
35
36
|
<div>
|
|
36
37
|
{/* eslint-disable-next-line jsx-a11y/media-has-caption */}
|
|
37
38
|
<audio ref={audioRef} src={src} title={title} preload="metadata" />
|
|
38
|
-
<Tooltip tooltip={t(
|
|
39
|
-
<IconButtonV2 type="button" onClick={togglePlay} aria-label={t(
|
|
39
|
+
<Tooltip tooltip={t(`${type}.play`)}>
|
|
40
|
+
<IconButtonV2 type="button" onClick={togglePlay} aria-label={t(`${type}.play`)} variant="ghost">
|
|
40
41
|
<VolumeUp />
|
|
41
42
|
</IconButtonV2>
|
|
42
43
|
</Tooltip>
|
|
@@ -12,7 +12,6 @@ import { EditorName } from "./EditorName";
|
|
|
12
12
|
import Footer from "./Footer";
|
|
13
13
|
import { FooterText } from "./FooterText";
|
|
14
14
|
import { defaultParameters } from "../../../../stories/defaults";
|
|
15
|
-
import { LanguageSelector } from "../LanguageSelector";
|
|
16
15
|
|
|
17
16
|
const mockCommonLinks = [
|
|
18
17
|
{
|
|
@@ -74,6 +73,10 @@ const privacyLinks = [
|
|
|
74
73
|
label: "Erklæring om informasjonskapsler",
|
|
75
74
|
url: "https://ndla.no/article/erklaering-for-informasjonskapsler",
|
|
76
75
|
},
|
|
76
|
+
{
|
|
77
|
+
label: "Tilgjengelighetserklæring",
|
|
78
|
+
url: "https://uustatus.no/nn/erklaringer/publisert/8cefdf3d-3272-402a-907b-689ddfc9bba7",
|
|
79
|
+
},
|
|
77
80
|
];
|
|
78
81
|
|
|
79
82
|
export default {
|
|
@@ -122,23 +125,11 @@ export const WithoutContent: StoryObj<typeof Footer> = {
|
|
|
122
125
|
},
|
|
123
126
|
};
|
|
124
127
|
|
|
125
|
-
export const WithLanguageSelector: StoryObj<typeof Footer> = {
|
|
126
|
-
args: {
|
|
127
|
-
privacyLinks: privacyLinks,
|
|
128
|
-
commonLinks: mockCommonLinks,
|
|
129
|
-
links: mockFooterLinks,
|
|
130
|
-
// eslint-disable-next-line no-console
|
|
131
|
-
languageSelector: <LanguageSelector inverted locales={["nn", "nb"]} onSelect={console.log} />,
|
|
132
|
-
},
|
|
133
|
-
};
|
|
134
|
-
|
|
135
128
|
export const WithAuthBlock: StoryObj<typeof Footer> = {
|
|
136
129
|
args: {
|
|
137
130
|
privacyLinks: privacyLinks,
|
|
138
131
|
commonLinks: mockCommonLinks,
|
|
139
132
|
links: mockFooterLinks,
|
|
140
|
-
// eslint-disable-next-line no-console
|
|
141
|
-
languageSelector: <LanguageSelector inverted locales={["nn", "nb"]} onSelect={console.log} />,
|
|
142
133
|
auth: <div>Auth info can be placed down here</div>,
|
|
143
134
|
},
|
|
144
135
|
};
|
package/src/Footer/Footer.tsx
CHANGED
|
@@ -9,106 +9,12 @@
|
|
|
9
9
|
import { ReactNode } from "react";
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import styled from "@emotion/styled";
|
|
12
|
-
import { colors, spacing,
|
|
13
|
-
import {
|
|
14
|
-
import { Text } from "@ndla/typography";
|
|
12
|
+
import { colors, spacing, stackOrder } from "@ndla/core";
|
|
13
|
+
import { Heading } from "@ndla/typography";
|
|
15
14
|
import FooterLinks from "./FooterLinks";
|
|
16
|
-
import FooterPrivacy from "./FooterPrivacy";
|
|
17
15
|
import { OneColumn } from "../Layout";
|
|
18
16
|
import { Locale } from "../types";
|
|
19
17
|
|
|
20
|
-
const StyledBackground = styled.div`
|
|
21
|
-
display: block;
|
|
22
|
-
position: absolute;
|
|
23
|
-
top: 0;
|
|
24
|
-
bottom: 0;
|
|
25
|
-
left: 0;
|
|
26
|
-
right: 0;
|
|
27
|
-
background: linear-gradient(96deg, rgba(0, 117, 160, 1) 0%, rgba(32, 88, 143, 0) 100%);
|
|
28
|
-
`;
|
|
29
|
-
|
|
30
|
-
const StyledDiv = styled.div`
|
|
31
|
-
color: #fff;
|
|
32
|
-
position: relative;
|
|
33
|
-
background: ${colors.brand.dark};
|
|
34
|
-
overflow: hidden;
|
|
35
|
-
z-index: ${stackOrder.base};
|
|
36
|
-
&[data-margin="true"] {
|
|
37
|
-
margin-top: ${spacing.xxlarge};
|
|
38
|
-
}
|
|
39
|
-
`;
|
|
40
|
-
|
|
41
|
-
const StyledOneColumn = styled(OneColumn)`
|
|
42
|
-
z-index: ${stackOrder.offsetSingle};
|
|
43
|
-
position: relative;
|
|
44
|
-
`;
|
|
45
|
-
|
|
46
|
-
const StyledText = styled(Text)`
|
|
47
|
-
${fonts.sizes(20, 1.5)};
|
|
48
|
-
margin: 0;
|
|
49
|
-
font-weight: ${fonts.weight.semibold};
|
|
50
|
-
text-align: center;
|
|
51
|
-
${mq.range({ from: breakpoints.tabletWide })} {
|
|
52
|
-
${fonts.sizes(24, 1.5)};
|
|
53
|
-
margin: ${spacing.normal} ${spacing.normal} ${spacing.large} 0;
|
|
54
|
-
text-align: left;
|
|
55
|
-
}
|
|
56
|
-
`;
|
|
57
|
-
|
|
58
|
-
const StyledFooterHeaderIcon = styled(FooterHeaderIcon)`
|
|
59
|
-
color: #fff;
|
|
60
|
-
width: ${spacing.large};
|
|
61
|
-
height: ${spacing.large};
|
|
62
|
-
${mq.range({ from: breakpoints.tabletWide })} {
|
|
63
|
-
width: ${spacing.xlarge};
|
|
64
|
-
height: ${spacing.xlarge};
|
|
65
|
-
}
|
|
66
|
-
`;
|
|
67
|
-
|
|
68
|
-
const StyledColumns = styled.div`
|
|
69
|
-
display: flex;
|
|
70
|
-
flex-direction: column;
|
|
71
|
-
align-items: center;
|
|
72
|
-
padding: ${spacing.large} ${spacing.large} 0 0;
|
|
73
|
-
> div:first-of-type {
|
|
74
|
-
padding: ${spacing.normal};
|
|
75
|
-
}
|
|
76
|
-
${mq.range({ from: breakpoints.tabletWide })} {
|
|
77
|
-
flex-direction: row;
|
|
78
|
-
align-items: flex-start;
|
|
79
|
-
> div:first-of-type {
|
|
80
|
-
padding: ${spacing.normal} ${spacingUnit * 1.75}px ${spacing.normal} ${spacing.large};
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
${mq.range({ from: breakpoints.desktop })} {
|
|
84
|
-
padding: ${spacing.large} 0;
|
|
85
|
-
}
|
|
86
|
-
${mq.range({ until: breakpoints.tabletWide })} {
|
|
87
|
-
padding: ${spacing.normal} ${spacing.normal} ${spacing.small};
|
|
88
|
-
}
|
|
89
|
-
`;
|
|
90
|
-
|
|
91
|
-
const StyledHr = styled.hr`
|
|
92
|
-
height: 1px;
|
|
93
|
-
margin: ${spacing.normal};
|
|
94
|
-
${mq.range({ from: breakpoints.tabletWide })} {
|
|
95
|
-
margin: ${spacing.large};
|
|
96
|
-
}
|
|
97
|
-
background: rgba(255, 255, 255, 0.1);
|
|
98
|
-
&:before {
|
|
99
|
-
content: none;
|
|
100
|
-
}
|
|
101
|
-
`;
|
|
102
|
-
|
|
103
|
-
const StyledLanguageWrapper = styled.div`
|
|
104
|
-
position: relative;
|
|
105
|
-
z-index: ${stackOrder.offsetSingle};
|
|
106
|
-
margin-top: ${spacing.normal};
|
|
107
|
-
display: flex;
|
|
108
|
-
align-items: center;
|
|
109
|
-
justify-content: center;
|
|
110
|
-
`;
|
|
111
|
-
|
|
112
18
|
type Props = {
|
|
113
19
|
children: ReactNode;
|
|
114
20
|
lang: Locale;
|
|
@@ -126,35 +32,59 @@ type Props = {
|
|
|
126
32
|
url: string;
|
|
127
33
|
label: string;
|
|
128
34
|
}[];
|
|
129
|
-
languageSelector?: ReactNode;
|
|
130
35
|
auth?: ReactNode;
|
|
131
36
|
};
|
|
132
37
|
|
|
133
|
-
const
|
|
38
|
+
const StyledColumns = styled.div`
|
|
39
|
+
display: flex;
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
align-items: center;
|
|
42
|
+
gap: ${spacing.normal};
|
|
43
|
+
`;
|
|
44
|
+
|
|
45
|
+
const StyledHeading = styled(Heading)`
|
|
46
|
+
text-align: center;
|
|
47
|
+
`;
|
|
48
|
+
|
|
49
|
+
const StyledDiv = styled.div`
|
|
50
|
+
color: ${colors.white};
|
|
51
|
+
position: relative;
|
|
52
|
+
background: ${colors.brand.dark};
|
|
53
|
+
overflow: hidden;
|
|
54
|
+
z-index: ${stackOrder.base};
|
|
55
|
+
`;
|
|
56
|
+
|
|
57
|
+
const StyledOneColumn = styled(OneColumn)`
|
|
58
|
+
z-index: ${stackOrder.offsetSingle};
|
|
59
|
+
position: relative;
|
|
60
|
+
padding: ${spacing.large} ${spacing.large} ${spacing.xlarge};
|
|
61
|
+
max-width: 1196px;
|
|
62
|
+
`;
|
|
63
|
+
|
|
64
|
+
const StyledBackground = styled.div`
|
|
65
|
+
display: block;
|
|
66
|
+
position: absolute;
|
|
67
|
+
top: 0;
|
|
68
|
+
bottom: 0;
|
|
69
|
+
left: 0;
|
|
70
|
+
right: 0;
|
|
71
|
+
background: ${colors.brand.dark};
|
|
72
|
+
`;
|
|
73
|
+
|
|
74
|
+
const Footer = ({ children, commonLinks, links, auth, privacyLinks }: Props) => {
|
|
134
75
|
const { t } = useTranslation();
|
|
135
76
|
|
|
136
|
-
const mainContent =
|
|
137
|
-
<>
|
|
138
|
-
{children}
|
|
139
|
-
{privacyLinks && <FooterPrivacy privacyLinks={privacyLinks} />}
|
|
140
|
-
</>
|
|
141
|
-
);
|
|
77
|
+
const mainContent = <>{children}</>;
|
|
142
78
|
|
|
143
79
|
const footerContent =
|
|
144
80
|
links || commonLinks ? (
|
|
145
81
|
<>
|
|
146
82
|
<StyledColumns>
|
|
147
|
-
<
|
|
148
|
-
|
|
149
|
-
</
|
|
150
|
-
<
|
|
151
|
-
<StyledText element="div" textStyle="content-alt" margin="none">
|
|
152
|
-
{t("footer.vision")}
|
|
153
|
-
</StyledText>
|
|
154
|
-
<FooterLinks commonLinks={commonLinks} links={links} />
|
|
155
|
-
</div>
|
|
83
|
+
<StyledHeading element="span" headingStyle="h2" margin="none">
|
|
84
|
+
{t("footer.vision")}
|
|
85
|
+
</StyledHeading>
|
|
86
|
+
<FooterLinks commonLinks={commonLinks} links={links} privacyLinks={privacyLinks} />
|
|
156
87
|
</StyledColumns>
|
|
157
|
-
<StyledHr />
|
|
158
88
|
{mainContent}
|
|
159
89
|
</>
|
|
160
90
|
) : (
|
|
@@ -164,9 +94,8 @@ const Footer = ({ children, commonLinks, links, languageSelector, auth, privacyL
|
|
|
164
94
|
return (
|
|
165
95
|
<>
|
|
166
96
|
<footer>
|
|
167
|
-
<StyledDiv
|
|
168
|
-
|
|
169
|
-
<StyledOneColumn cssModifier="large">{footerContent}</StyledOneColumn>
|
|
97
|
+
<StyledDiv>
|
|
98
|
+
<StyledOneColumn>{footerContent}</StyledOneColumn>
|
|
170
99
|
<StyledBackground />
|
|
171
100
|
</StyledDiv>
|
|
172
101
|
{auth}
|
|
@@ -10,29 +10,9 @@ import { ReactNode } from "react";
|
|
|
10
10
|
import { useTranslation } from "react-i18next";
|
|
11
11
|
import styled from "@emotion/styled";
|
|
12
12
|
import { spacing, fonts, colors, mq, breakpoints } from "@ndla/core";
|
|
13
|
-
import {
|
|
13
|
+
import { Launch } from "@ndla/icons/common";
|
|
14
14
|
import SafeLink from "@ndla/safelink";
|
|
15
|
-
import {
|
|
16
|
-
|
|
17
|
-
const StyledLinksWrapper = styled.div`
|
|
18
|
-
display: flex;
|
|
19
|
-
align-items: flex-start;
|
|
20
|
-
gap: ${spacing.normal};
|
|
21
|
-
div:first-of-type {
|
|
22
|
-
margin-right: ${spacing.large};
|
|
23
|
-
}
|
|
24
|
-
${mq.range({ from: breakpoints.desktop })} {
|
|
25
|
-
div:first-of-type {
|
|
26
|
-
margin-right: ${spacing.xxlarge};
|
|
27
|
-
}
|
|
28
|
-
}
|
|
29
|
-
${mq.range({ until: breakpoints.tabletWide })} {
|
|
30
|
-
flex-direction: column;
|
|
31
|
-
> div {
|
|
32
|
-
margin-top: ${spacing.large};
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
`;
|
|
15
|
+
import { Heading } from "@ndla/typography";
|
|
36
16
|
|
|
37
17
|
type FooterLinksProps = {
|
|
38
18
|
commonLinks?: {
|
|
@@ -45,62 +25,88 @@ type FooterLinksProps = {
|
|
|
45
25
|
text: string;
|
|
46
26
|
icon: ReactNode;
|
|
47
27
|
}[];
|
|
28
|
+
privacyLinks?: {
|
|
29
|
+
url: string;
|
|
30
|
+
label: string;
|
|
31
|
+
}[];
|
|
48
32
|
};
|
|
49
33
|
|
|
34
|
+
const FooterLinkContainer = styled.div`
|
|
35
|
+
display: flex;
|
|
36
|
+
flex-wrap: wrap;
|
|
37
|
+
align-items: flex-start;
|
|
38
|
+
justify-content: space-between;
|
|
39
|
+
${mq.range({ until: breakpoints.tabletWide })} {
|
|
40
|
+
flex-direction: column;
|
|
41
|
+
flex-wrap: nowrap;
|
|
42
|
+
align-self: flex-start;
|
|
43
|
+
}
|
|
44
|
+
width: 100%;
|
|
45
|
+
`;
|
|
46
|
+
|
|
47
|
+
const LinkColumnWrapper = styled.div`
|
|
48
|
+
padding-right: ${spacing.large};
|
|
49
|
+
padding-top: ${spacing.normal};
|
|
50
|
+
`;
|
|
51
|
+
|
|
52
|
+
const LastLinkColumnWrapper = styled.div`
|
|
53
|
+
padding-top: ${spacing.normal};
|
|
54
|
+
`;
|
|
55
|
+
|
|
50
56
|
const StyledNav = styled.nav`
|
|
51
57
|
display: flex;
|
|
52
58
|
flex-direction: column;
|
|
53
|
-
color:
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
59
|
+
color: ${colors.white};
|
|
60
|
+
gap: ${spacing.xsmall};
|
|
61
|
+
padding-top: ${spacing.small};
|
|
57
62
|
`;
|
|
58
63
|
|
|
59
64
|
const StyledSafeLink = styled(SafeLink)`
|
|
60
|
-
color:
|
|
61
|
-
${fonts.
|
|
65
|
+
color: ${colors.white};
|
|
66
|
+
${fonts.size.text.content};
|
|
62
67
|
svg {
|
|
63
|
-
transform: translateY(-2px);
|
|
64
68
|
margin-left: ${spacing.xsmall};
|
|
65
69
|
}
|
|
66
70
|
`;
|
|
67
71
|
|
|
68
72
|
const StyledSocialMediaIcon = styled.span`
|
|
69
|
-
background: ${colors.white};
|
|
70
|
-
color: ${colors.brand.primary};
|
|
71
|
-
border-radius: 100%;
|
|
72
|
-
display: flex;
|
|
73
|
-
align-items: center;
|
|
74
|
-
justify-content: center;
|
|
75
|
-
width: ${spacing.large};
|
|
76
|
-
height: ${spacing.large};
|
|
77
73
|
margin-right: ${spacing.small};
|
|
78
74
|
svg {
|
|
79
75
|
width: 20px;
|
|
80
76
|
height: 20px;
|
|
77
|
+
color: ${colors.white};
|
|
81
78
|
}
|
|
82
79
|
`;
|
|
83
80
|
|
|
84
|
-
const
|
|
85
|
-
|
|
86
|
-
align-items: center;
|
|
87
|
-
`;
|
|
88
|
-
|
|
89
|
-
const StyledTextLinks = styled(Text)`
|
|
90
|
-
${fonts.sizes(16, 1.5)};
|
|
91
|
-
font-weight: ${fonts.weight.semibold};
|
|
81
|
+
const StyledLaunch = styled(Launch)`
|
|
82
|
+
margin-left: ${spacing.xsmall};
|
|
92
83
|
`;
|
|
93
84
|
|
|
94
|
-
const FooterLinks = ({ links, commonLinks }: FooterLinksProps) => {
|
|
85
|
+
const FooterLinks = ({ links, commonLinks, privacyLinks }: FooterLinksProps) => {
|
|
95
86
|
const { t } = useTranslation();
|
|
96
87
|
return (
|
|
97
88
|
<>
|
|
98
|
-
<
|
|
99
|
-
<
|
|
100
|
-
<
|
|
89
|
+
<FooterLinkContainer>
|
|
90
|
+
<LinkColumnWrapper>
|
|
91
|
+
<Heading element="span" headingStyle="list-title">
|
|
92
|
+
{t("footer.followUs")}
|
|
93
|
+
</Heading>
|
|
94
|
+
<StyledNav aria-label={t("footer.socialMedia")}>
|
|
95
|
+
{links?.map((link) => (
|
|
96
|
+
<div key={link.to}>
|
|
97
|
+
<StyledSocialMediaIcon>{link.icon}</StyledSocialMediaIcon>
|
|
98
|
+
<StyledSafeLink key={link.to} to={link.to}>
|
|
99
|
+
{link.text}
|
|
100
|
+
</StyledSafeLink>
|
|
101
|
+
</div>
|
|
102
|
+
))}
|
|
103
|
+
</StyledNav>
|
|
104
|
+
</LinkColumnWrapper>
|
|
105
|
+
<LinkColumnWrapper>
|
|
106
|
+
<Heading element="span" headingStyle="list-title">
|
|
101
107
|
{t("footer.linksHeader")}
|
|
102
|
-
</
|
|
103
|
-
<StyledNav aria-
|
|
108
|
+
</Heading>
|
|
109
|
+
<StyledNav aria-label={t("footer.linksHeader")}>
|
|
104
110
|
{commonLinks?.map((link) => (
|
|
105
111
|
<div key={link.to}>
|
|
106
112
|
<StyledSafeLink
|
|
@@ -111,24 +117,26 @@ const FooterLinks = ({ links, commonLinks }: FooterLinksProps) => {
|
|
|
111
117
|
rel="noopener noreferrer"
|
|
112
118
|
>
|
|
113
119
|
{link.text}
|
|
114
|
-
{link.external && <Launch />}
|
|
115
120
|
</StyledSafeLink>
|
|
121
|
+
{link.external && <StyledLaunch />}
|
|
116
122
|
</div>
|
|
117
123
|
))}
|
|
118
124
|
</StyledNav>
|
|
119
|
-
</
|
|
120
|
-
<
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
125
|
+
</LinkColumnWrapper>
|
|
126
|
+
<LastLinkColumnWrapper>
|
|
127
|
+
<Heading element="span" headingStyle="list-title">
|
|
128
|
+
{t("footer.aboutWebsite")}
|
|
129
|
+
</Heading>
|
|
130
|
+
<StyledNav aria-label={t("footer.aboutWebsite")}>
|
|
131
|
+
{privacyLinks &&
|
|
132
|
+
privacyLinks.map((link) => (
|
|
133
|
+
<div key={link.label}>
|
|
134
|
+
<StyledSafeLink to={link.url}>{link.label}</StyledSafeLink>
|
|
135
|
+
</div>
|
|
136
|
+
))}
|
|
137
|
+
</StyledNav>
|
|
138
|
+
</LastLinkColumnWrapper>
|
|
139
|
+
</FooterLinkContainer>
|
|
132
140
|
</>
|
|
133
141
|
);
|
|
134
142
|
};
|
|
@@ -13,22 +13,18 @@ import { spacing, fonts, mq, breakpoints } from "@ndla/core";
|
|
|
13
13
|
const StyledFooterText = styled.p`
|
|
14
14
|
display: flex;
|
|
15
15
|
flex-direction: column;
|
|
16
|
-
align-items:
|
|
16
|
+
align-items: end;
|
|
17
|
+
gap: ${spacing.xsmall};
|
|
17
18
|
> span {
|
|
18
|
-
padding: ${spacing.xsmall} 0;
|
|
19
|
+
padding: ${spacing.xsmall} 0 0;
|
|
19
20
|
text-align: center;
|
|
20
21
|
}
|
|
21
22
|
${mq.range({ until: breakpoints.tabletWide })} {
|
|
22
|
-
${fonts.
|
|
23
|
+
${fonts.size.text.content};
|
|
23
24
|
> span {
|
|
24
25
|
padding: 0;
|
|
25
26
|
}
|
|
26
|
-
|
|
27
|
-
${mq.range({ until: breakpoints.mobileWide })} {
|
|
28
|
-
${fonts.sizes(14, 1.3)};
|
|
29
|
-
> span {
|
|
30
|
-
padding-bottom: ${spacing.xsmall};
|
|
31
|
-
}
|
|
27
|
+
align-items: start;
|
|
32
28
|
}
|
|
33
29
|
`;
|
|
34
30
|
|
package/src/Gloss/Gloss.tsx
CHANGED
|
@@ -33,7 +33,12 @@ export interface Props {
|
|
|
33
33
|
|
|
34
34
|
const StyledAccordionItem = styled(AccordionItem)`
|
|
35
35
|
background-color: ${colors.background.lightBlue};
|
|
36
|
-
border: 1px solid ${colors.brand.
|
|
36
|
+
border: 1px solid ${colors.brand.light};
|
|
37
|
+
border-radius: ${misc.borderRadius};
|
|
38
|
+
span {
|
|
39
|
+
${fonts.size.text.content}
|
|
40
|
+
font-family: ${fonts.sans};
|
|
41
|
+
}
|
|
37
42
|
`;
|
|
38
43
|
|
|
39
44
|
const Wrapper = styled.div`
|
|
@@ -41,10 +46,6 @@ const Wrapper = styled.div`
|
|
|
41
46
|
flex-wrap: wrap;
|
|
42
47
|
justify-content: space-between;
|
|
43
48
|
padding: ${spacing.nsmall} ${spacing.normal} 0 ${spacing.normal};
|
|
44
|
-
span {
|
|
45
|
-
${fonts.size.text.content}
|
|
46
|
-
font-family: ${fonts.sans};
|
|
47
|
-
}
|
|
48
49
|
`;
|
|
49
50
|
|
|
50
51
|
const GlossContainer = styled.div`
|
|
@@ -163,7 +164,7 @@ const Gloss = ({ title, glossData, audio, exampleIds, exampleLangs }: Props) =>
|
|
|
163
164
|
<span aria-label={t("gloss.wordClass")}>{t(`wordClass.${glossData.wordClass}`).toLowerCase()}</span>
|
|
164
165
|
)}
|
|
165
166
|
</GlossContainer>
|
|
166
|
-
{audio?.src && <SpeechControl src={audio.src} title={audio.title}
|
|
167
|
+
{audio?.src && <SpeechControl src={audio.src} title={audio.title} type="gloss" />}
|
|
167
168
|
</Wrapper>
|
|
168
169
|
{filteredExamples.length > 0 ? (
|
|
169
170
|
<>
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import { useTranslation } from "react-i18next";
|
|
10
10
|
import styled from "@emotion/styled";
|
|
11
11
|
import { ButtonV2 } from "@ndla/button";
|
|
12
|
-
import { colors, fonts, spacing } from "@ndla/core";
|
|
12
|
+
import { colors, fonts, spacing, stackOrder } from "@ndla/core";
|
|
13
13
|
import { DropdownMenu, DropdownTrigger, DropdownContent, DropdownItem } from "@ndla/dropdown-menu";
|
|
14
14
|
import { ChevronDown } from "@ndla/icons/common";
|
|
15
15
|
|
|
@@ -26,6 +26,7 @@ const StyledDropdownContent = styled(DropdownContent)`
|
|
|
26
26
|
[data-arrow] {
|
|
27
27
|
fill: ${colors.brand.tertiary};
|
|
28
28
|
}
|
|
29
|
+
z-index: ${stackOrder.modal};
|
|
29
30
|
`;
|
|
30
31
|
|
|
31
32
|
const LanguageChoice = styled(ButtonV2)`
|
|
@@ -96,7 +96,14 @@ const SearchTypeHeader = ({ filters = [], onFilterClick, totalCount, type }: Pro
|
|
|
96
96
|
<TypeWrapper>
|
|
97
97
|
{type && (
|
|
98
98
|
<BadgeWrapper>
|
|
99
|
-
<ContentTypeBadge
|
|
99
|
+
<ContentTypeBadge
|
|
100
|
+
aria-hidden
|
|
101
|
+
type={type}
|
|
102
|
+
title={t(`contentTypes.${type}`)}
|
|
103
|
+
background
|
|
104
|
+
border={false}
|
|
105
|
+
size="large"
|
|
106
|
+
/>
|
|
100
107
|
</BadgeWrapper>
|
|
101
108
|
)}
|
|
102
109
|
<SubjectName>
|
|
@@ -509,13 +509,15 @@ const messages = {
|
|
|
509
509
|
aboutNDLA: "About NDLA",
|
|
510
510
|
socialMedia: "Social media",
|
|
511
511
|
selectLanguage: "Choose language (språk): ",
|
|
512
|
-
info: "This webapplication is developed
|
|
512
|
+
info: "This webapplication is developed as Open Source code.",
|
|
513
513
|
editorInChief: "Editor in chief:",
|
|
514
|
-
linksHeader: "
|
|
514
|
+
linksHeader: "Contact",
|
|
515
515
|
availabilityLink: "Availability statement",
|
|
516
516
|
privacyLink: "Privacy statement",
|
|
517
517
|
cookiesLink: "Statement about cookies",
|
|
518
|
+
aboutWebsite: "About",
|
|
518
519
|
vision: "We create the learning of the future together",
|
|
520
|
+
followUs: "Follow us",
|
|
519
521
|
socialMediaLinks: {
|
|
520
522
|
facebook: "NDLA on Facebook",
|
|
521
523
|
facebookAria: "Visit NDLA on Facebook",
|
|
@@ -1062,7 +1064,8 @@ const messages = {
|
|
|
1062
1064
|
maxLength: "The maximum length for the text field is reached",
|
|
1063
1065
|
error: "The field is required",
|
|
1064
1066
|
},
|
|
1065
|
-
bottomText: "Are you missing a category? Let our moderator know at
|
|
1067
|
+
bottomText: "Are you missing a category? Let our moderator know at ",
|
|
1068
|
+
moderatorEmail: "moderator@ndla.no",
|
|
1066
1069
|
notification: {
|
|
1067
1070
|
title: "Notifications",
|
|
1068
1071
|
showAll: "View all notifications",
|
|
@@ -1358,6 +1361,7 @@ const messages = {
|
|
|
1358
1361
|
gloss: {
|
|
1359
1362
|
examples: "Examples",
|
|
1360
1363
|
wordClass: "Word class",
|
|
1364
|
+
play: "Play gloss",
|
|
1361
1365
|
transcriptions: {
|
|
1362
1366
|
traditional: "Traditional spelling",
|
|
1363
1367
|
pinyin: "Pinyin",
|
|
@@ -510,12 +510,14 @@ const messages = {
|
|
|
510
510
|
socialMedia: "Sosiale medier",
|
|
511
511
|
selectLanguage: "Velg språk (language): ",
|
|
512
512
|
vision: "Sammen skaper vi framtidas læring",
|
|
513
|
-
linksHeader: "
|
|
514
|
-
info: "Nettstedet er utarbeidet
|
|
513
|
+
linksHeader: "Kontakt",
|
|
514
|
+
info: "Nettstedet er utarbeidet som åpen kildekode.",
|
|
515
515
|
editorInChief: "Ansvarlig redaktør:",
|
|
516
516
|
availabilityLink: "Tilgjengelighetserklæring",
|
|
517
517
|
privacyLink: "Personvernerklæring",
|
|
518
518
|
cookiesLink: "Erklæring for informasjonskapsler",
|
|
519
|
+
aboutWebsite: "Om nettstedet",
|
|
520
|
+
followUs: "Følg oss",
|
|
519
521
|
socialMediaLinks: {
|
|
520
522
|
facebook: "NDLA på Facebook",
|
|
521
523
|
facebookAria: "Besøk NDLA på Facebook",
|
|
@@ -1062,7 +1064,8 @@ const messages = {
|
|
|
1062
1064
|
maxLength: "Maksimal lengde for tekstfeltet er nådd",
|
|
1063
1065
|
error: "Feltet er påkrevd",
|
|
1064
1066
|
},
|
|
1065
|
-
bottomText: "Savner du en kategori? Gi vår moderator beskjed på
|
|
1067
|
+
bottomText: "Savner du en kategori? Gi vår moderator beskjed på ",
|
|
1068
|
+
moderatorEmail: "moderator@ndla.no",
|
|
1066
1069
|
notification: {
|
|
1067
1070
|
title: "Varslinger",
|
|
1068
1071
|
showAll: "Se alle varslinger",
|
|
@@ -1357,6 +1360,7 @@ const messages = {
|
|
|
1357
1360
|
gloss: {
|
|
1358
1361
|
examples: "Eksempler",
|
|
1359
1362
|
wordClass: "Ordklasse",
|
|
1363
|
+
play: "Spill av glose",
|
|
1360
1364
|
transcriptions: {
|
|
1361
1365
|
traditional: "Tradisjonell skrivemåte",
|
|
1362
1366
|
pinyin: "Pinyin",
|