@ndla/ui 35.0.2 → 35.0.4
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/Article/ArticleSideBar.js +7 -56
- package/es/AudioPlayer/Controls.js +34 -32
- package/es/Frontpage/FrontpageMultidisciplinarySubject.js +8 -12
- package/es/Frontpage/FrontpageProgramMenu.js +7 -89
- package/es/Frontpage/FrontpageToolbox.js +5 -9
- package/es/locale/messages-en.js +15 -2
- package/es/locale/messages-nb.js +21 -8
- package/es/locale/messages-nn.js +15 -2
- package/es/locale/messages-se.js +14 -1
- package/es/locale/messages-sma.js +14 -1
- package/lib/Article/ArticleSideBar.d.ts +4 -7
- package/lib/Article/ArticleSideBar.js +7 -56
- package/lib/AudioPlayer/Controls.js +33 -31
- package/lib/Embed/conceptComponents.d.ts +1 -1
- package/lib/Frontpage/FrontpageMultidisciplinarySubject.js +8 -12
- package/lib/Frontpage/FrontpageProgramMenu.d.ts +1 -1
- package/lib/Frontpage/FrontpageProgramMenu.js +7 -89
- package/lib/Frontpage/FrontpageToolbox.js +5 -9
- package/lib/MyNdla/Resource/FolderInput.d.ts +1 -1
- package/lib/Resource/resourceComponents.d.ts +1 -1
- package/lib/locale/messages-en.d.ts +13 -0
- package/lib/locale/messages-en.js +15 -2
- package/lib/locale/messages-nb.d.ts +13 -0
- package/lib/locale/messages-nb.js +21 -8
- package/lib/locale/messages-nn.d.ts +13 -0
- package/lib/locale/messages-nn.js +15 -2
- package/lib/locale/messages-se.d.ts +13 -0
- package/lib/locale/messages-se.js +14 -1
- package/lib/locale/messages-sma.d.ts +13 -0
- package/lib/locale/messages-sma.js +14 -1
- package/package.json +21 -21
- package/src/Article/ArticleSideBar.tsx +5 -65
- package/src/AudioPlayer/Controls.tsx +23 -8
- package/src/Frontpage/FrontpageMultidisciplinarySubject.tsx +0 -2
- package/src/Frontpage/FrontpageProgramMenu.tsx +1 -66
- package/src/Frontpage/FrontpageToolbox.tsx +0 -2
- package/src/locale/messages-en.ts +18 -2
- package/src/locale/messages-nb.ts +24 -8
- package/src/locale/messages-nn.ts +18 -2
- package/src/locale/messages-se.ts +17 -1
- package/src/locale/messages-sma.ts +17 -1
- package/es/ComponentCursor/ComponentCursor.js +0 -100
- package/es/ComponentCursor/index.js +0 -2
- package/lib/ComponentCursor/ComponentCursor.d.ts +0 -6
- package/lib/ComponentCursor/ComponentCursor.js +0 -110
- package/lib/ComponentCursor/index.d.ts +0 -2
- package/lib/ComponentCursor/index.js +0 -10
- package/src/ComponentCursor/ComponentCursor.tsx +0 -101
- package/src/ComponentCursor/index.tsx +0 -2
|
@@ -1,8 +1,6 @@
|
|
|
1
|
-
import React, {
|
|
1
|
+
import React, { ReactNode } from 'react';
|
|
2
2
|
import { CopyButton, ButtonV2 } from '@ndla/button';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
|
-
import SafeLink from '@ndla/safelink';
|
|
5
|
-
import { fonts } from '@ndla/core';
|
|
6
4
|
import Modal, { ModalHeader, ModalBody, ModalCloseButton } from '@ndla/modal';
|
|
7
5
|
import { copyTextToClipboard } from '@ndla/util';
|
|
8
6
|
import { useTranslation } from 'react-i18next';
|
|
@@ -20,44 +18,12 @@ const ButtonWrapper = styled.div`
|
|
|
20
18
|
width: 100%;
|
|
21
19
|
`;
|
|
22
20
|
|
|
23
|
-
|
|
24
|
-
hide: boolean;
|
|
25
|
-
};
|
|
26
|
-
const CursorWrapper = styled.div<CursorWrapperProps>`
|
|
27
|
-
font-family: 'Shadows Into Light Two';
|
|
28
|
-
font-display: swap;
|
|
29
|
-
width: 120px;
|
|
30
|
-
font-family: 'Shadows Into Light Two', cursive;
|
|
31
|
-
margin-top: 40px;
|
|
32
|
-
background-image: url("data:image/svg+xml,%3Csvg width='10' height='46' viewBox='0 0 10 46' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M4.7626 0.887965L4.52762 0.446621L3.64494 0.91658L3.87992 1.35792L4.7626 0.887965ZM8.03372 45.2321L8.46374 39.4747L3.26262 41.981L8.03372 45.2321ZM4.32126 1.12294C3.87992 1.35792 3.8798 1.3577 3.87969 1.3575C3.87968 1.35748 3.87959 1.35731 3.87956 1.35726C3.87951 1.35716 3.87952 1.35717 3.87959 1.35731C3.87973 1.35758 3.88012 1.35832 3.88076 1.35954C3.88203 1.36199 3.88428 1.36633 3.88747 1.3726C3.89384 1.38513 3.90397 1.40533 3.91755 1.43329C3.9447 1.48921 3.98562 1.57616 4.0378 1.69484C4.14215 1.9322 4.29157 2.29653 4.46596 2.79343C4.8147 3.78714 5.2635 5.31159 5.65136 7.41155C6.42699 11.611 6.95965 18.1161 5.95809 27.2851L6.95217 27.3937C7.96354 18.1349 7.42926 11.5317 6.63473 7.22992C6.2375 5.07924 5.77541 3.5048 5.40953 2.46228C5.22661 1.94106 5.06779 1.55294 4.95323 1.29237C4.89595 1.16209 4.84974 1.06371 4.81713 0.996535C4.80082 0.96295 4.78791 0.937167 4.77872 0.9191C4.77413 0.910067 4.77046 0.902963 4.76776 0.897778C4.76641 0.895185 4.7653 0.893072 4.76444 0.891437C4.76401 0.890619 4.76364 0.889921 4.76333 0.889343C4.76318 0.889054 4.763 0.888709 4.76292 0.888565C4.76276 0.88825 4.7626 0.887965 4.32126 1.12294ZM5.95809 27.2851C5.19358 34.284 5.23105 38.5891 5.58488 41.2448L6.57612 41.1128C6.23761 38.5721 6.19146 34.3579 6.95217 27.3937L5.95809 27.2851Z' fill='%2320588F'/%3E%3C/svg%3E%0A");
|
|
33
|
-
background-position: bottom center;
|
|
34
|
-
background-repeat: no-repeat;
|
|
35
|
-
${(p) => p.hide && 'opacity:0;'}
|
|
36
|
-
transition-duration: 0.5s;
|
|
37
|
-
padding-bottom: 60px;
|
|
38
|
-
`;
|
|
39
|
-
|
|
40
|
-
const LinkText = styled.div`
|
|
41
|
-
transform: rotate(-4.15deg);
|
|
42
|
-
text-align: center;
|
|
43
|
-
|
|
44
|
-
${fonts.sizes('18px', '26px')};
|
|
45
|
-
`;
|
|
46
|
-
|
|
47
|
-
type Props = {
|
|
48
|
-
linkToResources?: string;
|
|
49
|
-
onLinkToResourcesClick?: (e: MouseEvent<HTMLElement>) => void;
|
|
21
|
+
interface Props {
|
|
50
22
|
copyPageUrlLink?: string;
|
|
51
23
|
licenseBox?: ReactNode;
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
const ArticleSideBar = ({
|
|
55
|
-
linkToResources,
|
|
56
|
-
onLinkToResourcesClick,
|
|
57
|
-
copyPageUrlLink,
|
|
58
|
-
licenseBox,
|
|
59
|
-
resourcesRef,
|
|
60
|
-
}: Props) => {
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
const ArticleSideBar = ({ copyPageUrlLink, licenseBox }: Props) => {
|
|
61
27
|
const { t } = useTranslation();
|
|
62
28
|
const copyLinkHandler = () => {
|
|
63
29
|
if (copyPageUrlLink) {
|
|
@@ -65,21 +31,6 @@ const ArticleSideBar = ({
|
|
|
65
31
|
}
|
|
66
32
|
};
|
|
67
33
|
|
|
68
|
-
const [hide, setHide] = useState(Boolean(false));
|
|
69
|
-
useEffect(() => {
|
|
70
|
-
window.onscroll = function () {
|
|
71
|
-
if (!resourcesRef?.current) {
|
|
72
|
-
return;
|
|
73
|
-
}
|
|
74
|
-
//TOP
|
|
75
|
-
if (resourcesRef.current.getBoundingClientRect().top <= 0) {
|
|
76
|
-
setHide(true);
|
|
77
|
-
} else if (resourcesRef.current.getBoundingClientRect().top >= 0) {
|
|
78
|
-
setHide(false);
|
|
79
|
-
}
|
|
80
|
-
};
|
|
81
|
-
});
|
|
82
|
-
|
|
83
34
|
return (
|
|
84
35
|
<Wrapper>
|
|
85
36
|
{copyPageUrlLink && (
|
|
@@ -113,17 +64,6 @@ const ArticleSideBar = ({
|
|
|
113
64
|
)}
|
|
114
65
|
</Modal>
|
|
115
66
|
)}
|
|
116
|
-
{linkToResources && (
|
|
117
|
-
<CursorWrapper hide={hide}>
|
|
118
|
-
<LinkText>
|
|
119
|
-
<SafeLink
|
|
120
|
-
to={linkToResources}
|
|
121
|
-
onClick={(e: MouseEvent<HTMLElement>) => onLinkToResourcesClick && onLinkToResourcesClick(e)}>
|
|
122
|
-
Hopp til fagressursene
|
|
123
|
-
</SafeLink>
|
|
124
|
-
</LinkText>
|
|
125
|
-
</CursorWrapper>
|
|
126
|
-
)}
|
|
127
67
|
</Wrapper>
|
|
128
68
|
);
|
|
129
69
|
};
|
|
@@ -10,9 +10,10 @@ import React, { useEffect, useRef, useState } from 'react';
|
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { Menu, MenuButton, MenuItem, MenuPopover, MenuItems, MenuItemProps } from '@reach/menu-button';
|
|
12
12
|
import { SliderInput, SliderTrack, SliderRange, SliderHandle, SliderOrientation } from '@reach/slider';
|
|
13
|
-
import { Play, Pause } from '@ndla/icons/common';
|
|
13
|
+
import { Play, Pause, VolumeUp } from '@ndla/icons/common';
|
|
14
14
|
import { breakpoints, colors, fonts, misc, mq, spacing } from '@ndla/core';
|
|
15
15
|
import { useTranslation } from 'react-i18next';
|
|
16
|
+
import { Back15, Forward15 } from '@ndla/icons/action';
|
|
16
17
|
|
|
17
18
|
const ControlsWrapper = styled.div`
|
|
18
19
|
border: 1px solid ${colors.brand.lighter};
|
|
@@ -84,13 +85,21 @@ const ForwardRewindButton = styled.button`
|
|
|
84
85
|
`;
|
|
85
86
|
|
|
86
87
|
const Forward15SecButton = styled(ForwardRewindButton)`
|
|
87
|
-
|
|
88
|
+
svg {
|
|
89
|
+
fill: ${colors.brand.primary};
|
|
90
|
+
width: 24px;
|
|
91
|
+
height: 24px;
|
|
92
|
+
}
|
|
88
93
|
${mq.range({ until: breakpoints.tabletWide })} {
|
|
89
94
|
order: 3;
|
|
90
95
|
}
|
|
91
96
|
`;
|
|
92
97
|
const Back15SecButton = styled(ForwardRewindButton)`
|
|
93
|
-
|
|
98
|
+
svg {
|
|
99
|
+
fill: ${colors.brand.primary};
|
|
100
|
+
width: 24px;
|
|
101
|
+
height: 24px;
|
|
102
|
+
}
|
|
94
103
|
${mq.range({ until: breakpoints.tabletWide })} {
|
|
95
104
|
order: 5;
|
|
96
105
|
}
|
|
@@ -249,7 +258,6 @@ const WardButtonWrapper = styled.div<{ order: number }>`
|
|
|
249
258
|
|
|
250
259
|
const VolumeButton = styled(MenuButton)`
|
|
251
260
|
background-color: inherit;
|
|
252
|
-
background-image: url("data:image/svg+xml,%3Csvg width='32' height='32' viewBox='0 0 32 32' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M20 10.6667C20.828 11.2877 21.5 12.0929 21.9628 13.0186C22.4257 13.9443 22.6667 14.9651 22.6667 16C22.6667 17.035 22.4257 18.0557 21.9628 18.9814C21.5 19.9071 20.828 20.7124 20 21.3334' stroke='%23184673' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M23.5999 6.66669C24.9918 7.79155 26.1145 9.21352 26.8858 10.8284C27.6571 12.4434 28.0574 14.2104 28.0574 16C28.0574 17.7897 27.6571 19.5567 26.8858 21.1716C26.1145 22.7865 24.9918 24.2085 23.5999 25.3334' stroke='%23184673' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3Cpath d='M8 20H5.33333C4.97971 20 4.64057 19.8595 4.39052 19.6095C4.14048 19.3594 4 19.0203 4 18.6666V13.3333C4 12.9797 4.14048 12.6406 4.39052 12.3905C4.64057 12.1405 4.97971 12 5.33333 12H8L12.6667 5.99998C12.7832 5.77362 12.9769 5.59641 13.2127 5.50037C13.4484 5.40433 13.7108 5.3958 13.9523 5.47631C14.1939 5.55682 14.3986 5.72107 14.5296 5.93937C14.6607 6.15768 14.7093 6.41564 14.6667 6.66665V25.3333C14.7093 25.5843 14.6607 25.8423 14.5296 26.0606C14.3986 26.2789 14.1939 26.4431 13.9523 26.5237C13.7108 26.6042 13.4484 26.5956 13.2127 26.4996C12.9769 26.4036 12.7832 26.2263 12.6667 26L8 20Z' stroke='%23184673' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E%0A");
|
|
253
261
|
width: 48px;
|
|
254
262
|
height: 48px;
|
|
255
263
|
border-radius: 50%;
|
|
@@ -258,6 +266,12 @@ const VolumeButton = styled(MenuButton)`
|
|
|
258
266
|
background-repeat: no-repeat;
|
|
259
267
|
cursor: pointer;
|
|
260
268
|
|
|
269
|
+
svg {
|
|
270
|
+
fill: ${colors.brand.primary};
|
|
271
|
+
width: 32px;
|
|
272
|
+
height: 32px;
|
|
273
|
+
}
|
|
274
|
+
|
|
261
275
|
&:hover,
|
|
262
276
|
&:active,
|
|
263
277
|
&:focus,
|
|
@@ -431,7 +445,7 @@ const Controls = ({ src, title }: Props) => {
|
|
|
431
445
|
onClick={() => {
|
|
432
446
|
onSeekSeconds(-15);
|
|
433
447
|
}}>
|
|
434
|
-
|
|
448
|
+
<Back15 />
|
|
435
449
|
</Back15SecButton>
|
|
436
450
|
</WardButtonWrapper>
|
|
437
451
|
|
|
@@ -473,7 +487,7 @@ const Controls = ({ src, title }: Props) => {
|
|
|
473
487
|
onClick={() => {
|
|
474
488
|
onSeekSeconds(15);
|
|
475
489
|
}}>
|
|
476
|
-
|
|
490
|
+
<Forward15 />
|
|
477
491
|
</Forward15SecButton>
|
|
478
492
|
</WardButtonWrapper>
|
|
479
493
|
<ProgressWrapper>
|
|
@@ -495,8 +509,9 @@ const Controls = ({ src, title }: Props) => {
|
|
|
495
509
|
type="button"
|
|
496
510
|
as="button"
|
|
497
511
|
title={t('audio.controls.adjustVolume')}
|
|
498
|
-
aria-label={t('audio.controls.adjustVolume')}
|
|
499
|
-
|
|
512
|
+
aria-label={t('audio.controls.adjustVolume')}>
|
|
513
|
+
<VolumeUp />
|
|
514
|
+
</VolumeButton>
|
|
500
515
|
<VolumeMenu as="div" portal={false}>
|
|
501
516
|
<VolumeList>
|
|
502
517
|
<VolumeSliderWrapper>
|
|
@@ -4,7 +4,6 @@ import styled from '@emotion/styled';
|
|
|
4
4
|
import { spacing, breakpoints, mq } from '@ndla/core';
|
|
5
5
|
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import SectionHeading from '../SectionHeading';
|
|
7
|
-
import ComponentCursor from '../ComponentCursor';
|
|
8
7
|
import { MultidisciplinarySubjectIllustration as Illustration } from './illustrations/FrontpageIllustrations';
|
|
9
8
|
import { HeadingLevel } from '../types';
|
|
10
9
|
|
|
@@ -80,7 +79,6 @@ const FrontpageMultidisciplinarySubject = ({ url, topics, headingLevel }: Props)
|
|
|
80
79
|
const { t } = useTranslation();
|
|
81
80
|
return (
|
|
82
81
|
<StyledSection>
|
|
83
|
-
<ComponentCursor variant="left" text={t('frontpageMultidisciplinarySubject.cursorText')} />
|
|
84
82
|
<Wrapper>
|
|
85
83
|
<Content>
|
|
86
84
|
<SectionHeading headingLevel={headingLevel} large>
|
|
@@ -29,68 +29,13 @@ const StyledMenuItem = styled.span`
|
|
|
29
29
|
font-weight: ${fonts.weight.semibold};
|
|
30
30
|
`;
|
|
31
31
|
|
|
32
|
-
const CursorPlaceholder = styled.div`
|
|
33
|
-
position: relative;
|
|
34
|
-
display: inline-block;
|
|
35
|
-
`;
|
|
36
|
-
|
|
37
|
-
const CursorWrapper = styled.div`
|
|
38
|
-
font-family: 'Shadows Into Light Two';
|
|
39
|
-
font-display: swap;
|
|
40
|
-
position: absolute;
|
|
41
|
-
top: -55px;
|
|
42
|
-
left: 38px;
|
|
43
|
-
display: none;
|
|
44
|
-
${mq.range({ from: breakpoints.tabletWide })} {
|
|
45
|
-
display: flex;
|
|
46
|
-
}
|
|
47
|
-
`;
|
|
48
|
-
|
|
49
|
-
const CursorTextWrapper = styled.div`
|
|
50
|
-
display: flex;
|
|
51
|
-
flex-direction: column;
|
|
52
|
-
align-items: flex-end;
|
|
53
|
-
`;
|
|
54
|
-
|
|
55
|
-
const CursorText = styled.span`
|
|
56
|
-
display: inline-block;
|
|
57
|
-
padding-bottom: 10px;
|
|
58
|
-
font-family: 'Shadows Into Light Two', cursive;
|
|
59
|
-
width: 286px;
|
|
60
|
-
text-align: center;
|
|
61
|
-
`;
|
|
62
|
-
|
|
63
|
-
type CursorProps = { hide?: boolean };
|
|
64
|
-
|
|
65
|
-
const Cursor = styled.div<CursorProps>`
|
|
66
|
-
color: #757575;
|
|
67
|
-
${(props) =>
|
|
68
|
-
props.hide &&
|
|
69
|
-
`
|
|
70
|
-
`}
|
|
71
|
-
`;
|
|
72
|
-
|
|
73
|
-
const LeftCursor = styled(Cursor)`
|
|
74
|
-
width: 37px;
|
|
75
|
-
height: 39px;
|
|
76
|
-
margin-top: 26px;
|
|
77
|
-
background-image: url("data:image/svg+xml,%3Csvg width='37' height='39' viewBox='0 0 37 39' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M35.468 12.6697L35.836 12.3311L36.5131 13.0669L36.1452 13.4055L35.468 12.6697ZM1.00002 25.2236L6.37298 23.1107L5.51639 28.8203L1.00002 25.2236ZM35.8066 13.0376C36.1452 13.4055 36.1451 13.4056 36.145 13.4057C36.1449 13.4058 36.1448 13.4059 36.1446 13.4061C36.1442 13.4065 36.1437 13.4069 36.143 13.4076C36.1416 13.4088 36.1397 13.4106 36.1371 13.413C36.132 13.4177 36.1244 13.4245 36.1146 13.4336C36.0948 13.4516 36.0655 13.4782 36.0272 13.5128C35.9506 13.582 35.8376 13.6834 35.691 13.8131C35.3979 14.0724 34.9705 14.4449 34.4315 14.8994C33.3537 15.8082 31.828 17.046 30.0356 18.3628C26.4632 20.9874 21.784 23.9617 17.4626 25.2388L17.1791 24.2798C21.3265 23.0541 25.8902 20.1675 29.4435 17.5569C31.214 16.2562 32.7218 15.0329 33.7869 14.1349C34.3192 13.686 34.7406 13.3187 35.0284 13.0641C35.1723 12.9368 35.2827 12.8377 35.3569 12.7707C35.3941 12.7372 35.4221 12.7117 35.4407 12.6947C35.4501 12.6862 35.457 12.6798 35.4616 12.6756C35.4639 12.6735 35.4656 12.672 35.4666 12.671C35.4672 12.6705 35.4676 12.6701 35.4678 12.6699C35.4679 12.6698 35.468 12.6698 35.468 12.6697C35.4681 12.6697 35.468 12.6697 35.8066 13.0376ZM17.4626 25.2388C12.8958 26.5885 8.51384 26.6382 5.41026 26.3897L5.49009 25.3929C8.51637 25.6352 12.7668 25.5839 17.1791 24.2798L17.4626 25.2388Z' fill='%23757575'/%3E%3C/svg%3E%0A");
|
|
78
|
-
`;
|
|
79
|
-
|
|
80
|
-
/* const BottomCursor = styled(Cursor)`
|
|
81
|
-
width: 48px;
|
|
82
|
-
height: 44px;
|
|
83
|
-
margin-right: 90px;
|
|
84
|
-
background-image: url("data:image/svg+xml,%3Csvg width='48' height='44' viewBox='0 0 48 44' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M16.4851 0.879004L16.3641 0.393865L15.3939 0.635857L15.5149 1.121L16.4851 0.879004ZM33.5 42L32.1883 36.3775L27.9749 40.3247L33.5 42ZM16 1C15.5149 1.121 15.5149 1.12107 15.5149 1.12121C15.5149 1.12133 15.515 1.12152 15.5151 1.12175C15.5152 1.12223 15.5153 1.12292 15.5156 1.12384C15.516 1.12567 15.5167 1.12839 15.5176 1.13197C15.5194 1.13915 15.5221 1.14981 15.5256 1.1639C15.5327 1.19207 15.5432 1.23393 15.5571 1.28894C15.5849 1.39894 15.6262 1.56153 15.6802 1.7723C15.7883 2.19384 15.9474 2.80818 16.1518 3.58026C16.5604 5.12435 17.1501 7.29976 17.8743 9.82602C19.3221 14.8761 21.3106 21.3381 23.4684 26.963L24.4021 26.6049C22.2595 21.0198 20.2803 14.5899 18.8356 9.55043C18.1136 7.03195 17.5258 4.86325 17.1185 3.32441C16.9149 2.55503 16.7564 1.9432 16.6489 1.52394C16.5952 1.31431 16.5542 1.15283 16.5266 1.04388C16.5129 0.989408 16.5025 0.948065 16.4955 0.920403C16.492 0.906572 16.4894 0.896161 16.4877 0.889238C16.4868 0.885777 16.4862 0.883187 16.4858 0.881479C16.4855 0.880625 16.4854 0.879991 16.4853 0.879578C16.4852 0.879371 16.4852 0.879228 16.4852 0.879125C16.4851 0.879037 16.4851 0.879004 16 1ZM23.4684 26.963C25.6729 32.7094 28.1331 36.5898 30.0294 39.0236L30.8182 38.409C28.9819 36.0522 26.5707 32.2579 24.4021 26.6049L23.4684 26.963Z' fill='%23757575'/%3E%3C/svg%3E%0A");
|
|
85
|
-
`;
|
|
86
|
-
*/
|
|
87
32
|
type Props = {
|
|
88
33
|
programItems: ItemProps[];
|
|
89
34
|
subjectCategories: subjectsProps['categories'];
|
|
90
35
|
showBetaCursor?: boolean;
|
|
91
36
|
};
|
|
92
37
|
|
|
93
|
-
const FrontpageProgramMenu = ({ programItems, subjectCategories
|
|
38
|
+
const FrontpageProgramMenu = ({ programItems, subjectCategories }: Props) => {
|
|
94
39
|
const { t } = useTranslation();
|
|
95
40
|
const [showSubjects, setShowSubjects] = useState(false);
|
|
96
41
|
const isWindowContext = typeof window !== 'undefined';
|
|
@@ -126,16 +71,6 @@ const FrontpageProgramMenu = ({ programItems, subjectCategories, showBetaCursor
|
|
|
126
71
|
shape="pill">
|
|
127
72
|
<StyledMenuItem>{t('frontpageMenu.allsubjects')}</StyledMenuItem>
|
|
128
73
|
</ButtonV2>
|
|
129
|
-
{showBetaCursor && (
|
|
130
|
-
<CursorPlaceholder aria-hidden="true">
|
|
131
|
-
<CursorWrapper>
|
|
132
|
-
<LeftCursor hide={showSubjects} />
|
|
133
|
-
<CursorTextWrapper>
|
|
134
|
-
<CursorText>{t('frontpageMenu.cursorText')}</CursorText>
|
|
135
|
-
</CursorTextWrapper>
|
|
136
|
-
</CursorWrapper>
|
|
137
|
-
</CursorPlaceholder>
|
|
138
|
-
)}
|
|
139
74
|
</StyledMenu>
|
|
140
75
|
{showSubjects ? (
|
|
141
76
|
<FrontpageAllSubjects categories={subjectCategories} />
|
|
@@ -4,7 +4,6 @@ import { useTranslation } from 'react-i18next';
|
|
|
4
4
|
import { spacing, breakpoints, mq } from '@ndla/core';
|
|
5
5
|
import { SafeLinkButton } from '@ndla/safelink';
|
|
6
6
|
import SectionHeading from '../SectionHeading';
|
|
7
|
-
import ComponentCursor from '../ComponentCursor';
|
|
8
7
|
import { ToolboxIllustration as Illustration } from './illustrations/FrontpageIllustrations';
|
|
9
8
|
import { HeadingLevel } from '../types';
|
|
10
9
|
|
|
@@ -52,7 +51,6 @@ const FrontpageToolbox = ({ urlStudents, urlTeachers, headingLevel }: Props) =>
|
|
|
52
51
|
const { t } = useTranslation();
|
|
53
52
|
return (
|
|
54
53
|
<StyledSection>
|
|
55
|
-
<ComponentCursor variant="left" text={t('frontPageToolbox.cursorText')} />
|
|
56
54
|
<SectionHeading headingLevel={headingLevel} large>
|
|
57
55
|
{t('frontPageToolbox.heading')}
|
|
58
56
|
</SectionHeading>
|
|
@@ -1118,7 +1118,7 @@ const messages = {
|
|
|
1118
1118
|
sharing: {
|
|
1119
1119
|
share: 'Share folder',
|
|
1120
1120
|
shared: 'Shared',
|
|
1121
|
-
unShare: 'Sharing
|
|
1121
|
+
unShare: 'Sharing stopped. The folder is no longer shared',
|
|
1122
1122
|
link: 'Link is copied',
|
|
1123
1123
|
header: {
|
|
1124
1124
|
private: 'Do you want to share this folder?',
|
|
@@ -1169,7 +1169,19 @@ const messages = {
|
|
|
1169
1169
|
detailView: 'Detailed listview',
|
|
1170
1170
|
shortView: 'Card view',
|
|
1171
1171
|
sharedFolder: {
|
|
1172
|
-
info: 'This folder contains learning resources and tasks from NDLA,
|
|
1172
|
+
info: 'This folder contains learning resources and tasks from NDLA, gathered by a teacher.',
|
|
1173
|
+
firstShared: 'The folder was shared for the first time {{date}}',
|
|
1174
|
+
learningpathUnsupported:
|
|
1175
|
+
'Learning paths cannot be shown directly in a shared folder. You can open the learning path in a new tab by clicking the link in the navigation menu to the left.',
|
|
1176
|
+
drawerButton: 'Show folders and resources',
|
|
1177
|
+
drawerTitle: 'Folders and resources',
|
|
1178
|
+
description: {
|
|
1179
|
+
info1:
|
|
1180
|
+
'In this folder you find articles and tasks from NDLA. The articles have been collected and placed in order by a teacher.',
|
|
1181
|
+
info2: 'You can use the menu to navigate through the articles.',
|
|
1182
|
+
info3:
|
|
1183
|
+
'If you want to come back to the folder later, you can use the link the teacher gave you, or you can bookmark the page.',
|
|
1184
|
+
},
|
|
1173
1185
|
},
|
|
1174
1186
|
myPage: {
|
|
1175
1187
|
noRecents: "You haven't added any resources yet. This is how you get started:",
|
|
@@ -1208,6 +1220,10 @@ const messages = {
|
|
|
1208
1220
|
title: 'How to save your favourite resources from NDLA',
|
|
1209
1221
|
text: 'When you wish to save a resource, you can do so by clicking the heart button. You will then get an option to store the resource in a folder',
|
|
1210
1222
|
},
|
|
1223
|
+
sharing: {
|
|
1224
|
+
title: 'How you share your folders with others',
|
|
1225
|
+
text: 'Click on the share-button in the folder to share. You will get a link you can share with others.',
|
|
1226
|
+
},
|
|
1211
1227
|
folderInfo: {
|
|
1212
1228
|
title: 'How to organise your favourite resources in folders',
|
|
1213
1229
|
text: 'You can get to the folder overview by clicking on <strong>My folders</strong> on the menu to the left. Here you can create new folders and subfolder. You can also create a new folder in the dialogue window that is activated when you click on the heart in a resource',
|
|
@@ -1120,18 +1120,18 @@ const messages = {
|
|
|
1120
1120
|
unShare: 'Delingen er avsluttet. Mappen er ikke lenger delt.',
|
|
1121
1121
|
link: 'Lenken er kopiert',
|
|
1122
1122
|
header: {
|
|
1123
|
-
private: 'Vil du dele denne
|
|
1124
|
-
shared: 'Denne
|
|
1125
|
-
unShare: 'Vil du avslutte deling av denne
|
|
1123
|
+
private: 'Vil du dele denne mappa?',
|
|
1124
|
+
shared: 'Denne mappa er delt.',
|
|
1125
|
+
unShare: 'Vil du avslutte deling av denne mappa?',
|
|
1126
1126
|
},
|
|
1127
1127
|
description: {
|
|
1128
|
-
copy: 'Kopier og del denne
|
|
1128
|
+
copy: 'Kopier og del denne lenka:',
|
|
1129
1129
|
private:
|
|
1130
|
-
'Når du deler
|
|
1130
|
+
'Når du deler ei mappe, lager du ei lenke som er åpen for alle som har lenka. Du kan endre innholdet eller avslutte delinga når du ønsker det. ',
|
|
1131
1131
|
shared:
|
|
1132
|
-
'Nå kan du dele denne
|
|
1132
|
+
'Nå kan du dele denne lenka med elever eller andre lærere. Hvis du gjør endringer i mappa, blir de synlige for alle du har delt lenka med.',
|
|
1133
1133
|
unShare:
|
|
1134
|
-
'Når du avslutter deling vil
|
|
1134
|
+
'Når du avslutter deling, vil lenka til den delte mappa slutte å virke. Dersom du har delt lenka med noen, kan de ikke lenger se innholdet i mappa.',
|
|
1135
1135
|
},
|
|
1136
1136
|
button: {
|
|
1137
1137
|
share: 'Del mappen',
|
|
@@ -1167,7 +1167,19 @@ const messages = {
|
|
|
1167
1167
|
detailView: 'Detaljert listevisning',
|
|
1168
1168
|
shortView: 'Kort visning',
|
|
1169
1169
|
sharedFolder: {
|
|
1170
|
-
info: 'Denne
|
|
1170
|
+
info: 'Denne mappa inneholder fagstoff og oppgaver fra NDLA, samlet av en lærer. ',
|
|
1171
|
+
firstShared: 'Mappa ble delt første gang {{date}}',
|
|
1172
|
+
learningpathUnsupported:
|
|
1173
|
+
'Læringsstier kan ikke vises direkte i delte mapper. Dersom du trykker på lenka i navigasjonsmenyen til venstre, vil stien åpnes i en ny fane.',
|
|
1174
|
+
drawerButton: 'Vis mapper og ressurser',
|
|
1175
|
+
drawerTitle: 'Mapper og ressurser',
|
|
1176
|
+
description: {
|
|
1177
|
+
info1:
|
|
1178
|
+
'I denne delte mappa finner du fagstoff og oppgaver fra NDLA. Artiklene er samlet inn og satt i rekkefølge av en lærer.',
|
|
1179
|
+
info2: 'Du kan bla i artiklene ved å bruke menyen.',
|
|
1180
|
+
info3:
|
|
1181
|
+
'Hvis du vil finne igjen mappa seinere, kan du bruke lenka du fikk av læreren din, eller du kan bokmerke sida.',
|
|
1182
|
+
},
|
|
1171
1183
|
},
|
|
1172
1184
|
myPage: {
|
|
1173
1185
|
noRecents: 'Du har ikke lagt til noen ressurser ennå. Slik kommer du i gang:',
|
|
@@ -1205,6 +1217,10 @@ const messages = {
|
|
|
1205
1217
|
title: 'Slik lagrer du favorittressursene dine fra NDLA',
|
|
1206
1218
|
text: 'Klikk på hjerteknappen for å lagre en ressurs. Du vil da få mulighet til å lagre ressursen i ei mappe.',
|
|
1207
1219
|
},
|
|
1220
|
+
sharing: {
|
|
1221
|
+
title: 'Slik deler du mappene dine med andre',
|
|
1222
|
+
text: 'Klikk på dele-knappen i mappa for å dele. Du vil da få ei lenke som du kan dele med andre.',
|
|
1223
|
+
},
|
|
1208
1224
|
folderInfo: {
|
|
1209
1225
|
title: 'Slik organiserer du favorittressursene dine i mapper',
|
|
1210
1226
|
text: 'Klikk på <strong>Mine mapper</strong> i menyen til venstre for å komme til mappeoversikten. Her kan du opprette nye mapper og undermapper. Du kan også opprette ei ny mappe i dialogvinduet som kommer når du klikker på et hjerte i en ressurs.',
|
|
@@ -1122,7 +1122,7 @@ const messages = {
|
|
|
1122
1122
|
header: {
|
|
1123
1123
|
private: 'Vil du dele denne mappa?',
|
|
1124
1124
|
shared: 'Denne mappa er delt',
|
|
1125
|
-
unShare: 'Vil du
|
|
1125
|
+
unShare: 'Vil du avslutte deling av denne mappa?',
|
|
1126
1126
|
},
|
|
1127
1127
|
description: {
|
|
1128
1128
|
copy: 'Kopier og del denne lenka:',
|
|
@@ -1167,7 +1167,19 @@ const messages = {
|
|
|
1167
1167
|
detailView: 'Detaljert listevisning',
|
|
1168
1168
|
shortView: 'Kortvisning',
|
|
1169
1169
|
sharedFolder: {
|
|
1170
|
-
info: 'Denne mappa inneheld fagstoff og
|
|
1170
|
+
info: 'Denne mappa inneheld fagstoff og oppgåver frå NDLA, samla av ein lærar.',
|
|
1171
|
+
firstShared: 'Mappa vart delt første gong {{date}}',
|
|
1172
|
+
drawerButton: 'Vis mapper og ressursar',
|
|
1173
|
+
drawerTitle: 'Mapper og ressursar',
|
|
1174
|
+
learningpathUnsupported:
|
|
1175
|
+
'Læringsstiar kan ikkje visast direkte i delte mapper. Dersom du trykker på lenka i navigasjonsmenyen til venstre, blir stien opna i ei ny fane.',
|
|
1176
|
+
description: {
|
|
1177
|
+
info1:
|
|
1178
|
+
'I denne delte mappa finn du fagstoff og oppgåver frå NDLA. Artiklane er samla inn og sette i rekkefølge av ein lærar.',
|
|
1179
|
+
info2: 'Du kan bla i artiklane ved å bruke menyen.',
|
|
1180
|
+
info3:
|
|
1181
|
+
'Dersom du vil finne igjen mappa seinare, kan du bruke lenka du fekk av læraren din, eller du kan bokmerke sida.',
|
|
1182
|
+
},
|
|
1171
1183
|
},
|
|
1172
1184
|
myPage: {
|
|
1173
1185
|
noRecents: 'Du har ikkje lagt til nokon ressurar enno. Slik kjem du i gang:',
|
|
@@ -1205,6 +1217,10 @@ const messages = {
|
|
|
1205
1217
|
title: 'Slik lagrar du favorittressursane dine frå NDLA',
|
|
1206
1218
|
text: 'Klikk på hjarteknappen for å lagre ein ressurs. Du vil då få høve til å lagre ressursen i ei mappe.',
|
|
1207
1219
|
},
|
|
1220
|
+
sharing: {
|
|
1221
|
+
title: 'Slik deler du mappene dine med andre',
|
|
1222
|
+
text: 'Klikk på dele-knappen i mappa for å dele. Du vil då få ei lenke som du kan dele med andre.',
|
|
1223
|
+
},
|
|
1208
1224
|
folderInfo: {
|
|
1209
1225
|
title: 'Slik organiserer du favorittressursene dine i mapper',
|
|
1210
1226
|
text: 'Klikk på <strong>Mine mapper</strong> i menyen til venstre for å komme til mappeoversikta. Her kan du opprette nye mapper og undermapper. Du kan også opprette ny mappe i vindauget som kjem opp når du klikkar på eit hjarte i ein ressurs.',
|
|
@@ -1168,7 +1168,19 @@ const messages = {
|
|
|
1168
1168
|
detailView: 'Bienalaš oppalašlistu',
|
|
1169
1169
|
shortView: 'Oanehis listu',
|
|
1170
1170
|
sharedFolder: {
|
|
1171
|
-
info: 'Denne
|
|
1171
|
+
info: 'Denne mappa inneheld fagstoff og oppgåver frå NDLA, samla av ein lærar.',
|
|
1172
|
+
firstShared: 'Mappa vart delt første gong {{date}}',
|
|
1173
|
+
drawerButton: 'Vis mapper og ressursar',
|
|
1174
|
+
drawerTitle: 'Mapper og ressursar',
|
|
1175
|
+
learningpathUnsupported:
|
|
1176
|
+
'Læringsstiar kan ikke visast direkte i delte mapper. Dersom du trykker på lenka i navigasjonsmenyen til venstre, blir stien opna i ei ny fane.',
|
|
1177
|
+
description: {
|
|
1178
|
+
info1:
|
|
1179
|
+
'I denne delte mappa finn du fagstoff og oppgåver frå NDLA. Artiklane er samla inn og sette i rekkefølge av ein lærar.',
|
|
1180
|
+
info2: 'Du kan bla i artiklane ved å bruke menyen.',
|
|
1181
|
+
info3:
|
|
1182
|
+
'Dersom du vil finne igjen mappa seinare, kan du bruke lenka du fekk av læraren din, eller du kan bokmerke sida.',
|
|
1183
|
+
},
|
|
1172
1184
|
},
|
|
1173
1185
|
myPage: {
|
|
1174
1186
|
noRecents: 'Don it leat lasihan makkárge resurssa vel. Ná boađát johtui:',
|
|
@@ -1206,6 +1218,10 @@ const messages = {
|
|
|
1206
1218
|
title: 'Ná vurket iežat oiddotresurssaid NDLA:s',
|
|
1207
1219
|
text: 'Deaddil váibmoboalu vurken dihtii resurssa.',
|
|
1208
1220
|
},
|
|
1221
|
+
sharing: {
|
|
1222
|
+
title: 'Slik deler du mappene dine med andre',
|
|
1223
|
+
text: 'Klikk på dele-knappen i mappa for å dele. Du vil då få ei lenke som du kan dele med andre.',
|
|
1224
|
+
},
|
|
1209
1225
|
folderInfo: {
|
|
1210
1226
|
title: 'Ná ordnet iežat oiddotresurssaid máhpaide',
|
|
1211
1227
|
text: 'Deaddil mu máhpaid gurut bealde fálus beassan dihtii máhpa visogovvii. Doppe sáhtát ráhkadit ođđa máhpaid ja vuollemáhpaid. Sáhtát maid ráhkadit ođđa máhpa gulahallanláses mii ihtá go deaddilat váimmu muhtin resurssas.',
|
|
@@ -1172,7 +1172,19 @@ const messages = {
|
|
|
1172
1172
|
detailView: 'Detaljert listevisning',
|
|
1173
1173
|
shortView: 'Kort visning',
|
|
1174
1174
|
sharedFolder: {
|
|
1175
|
-
info: 'Denne
|
|
1175
|
+
info: 'Denne mappa inneheld fagstoff og oppgåver frå NDLA, samla av ein lærar.',
|
|
1176
|
+
firstShared: 'Mappa vart delt første gong {{date}}',
|
|
1177
|
+
drawerButton: 'Vis mapper og ressursar',
|
|
1178
|
+
drawerTitle: 'Mapper og ressursar',
|
|
1179
|
+
learningpathUnsupported:
|
|
1180
|
+
'Læringsstiar kan ikke visast direkte i delte mapper. Dersom du trykker på lenka i navigasjonsmenyen til venstre, blir stien opna i ei ny fane.',
|
|
1181
|
+
description: {
|
|
1182
|
+
info1:
|
|
1183
|
+
'I denne delte mappa finn du fagstoff og oppgåver frå NDLA. Artiklane er samla inn og sette i rekkefølge av ein lærar.',
|
|
1184
|
+
info2: 'Du kan bla i artiklane ved å bruke menyen.',
|
|
1185
|
+
info3:
|
|
1186
|
+
'Dersom du vil finne igjen mappa seinare, kan du bruke lenka du fekk av læraren din, eller du kan bokmerke sida.',
|
|
1187
|
+
},
|
|
1176
1188
|
},
|
|
1177
1189
|
myPage: {
|
|
1178
1190
|
noRecents: 'Du har ikkje lagt til nokon ressurar enno. Slik kjem du i gang:',
|
|
@@ -1210,6 +1222,10 @@ const messages = {
|
|
|
1210
1222
|
title: 'Slik lagrer du favorittressursene dine fra NDLA',
|
|
1211
1223
|
text: 'Klikk på hjerteknappen for å lagre en ressurs. Du vil da få mulighet til å lagre ressursen i ei mappe.',
|
|
1212
1224
|
},
|
|
1225
|
+
sharing: {
|
|
1226
|
+
title: 'Slik deler du mappene dine med andre',
|
|
1227
|
+
text: 'Klikk på dele-knappen i mappa for å dele. Du vil då få ei lenke som du kan dele med andre.',
|
|
1228
|
+
},
|
|
1213
1229
|
folderInfo: {
|
|
1214
1230
|
title: 'Slik organiserer du favorittressursene dine i mapper',
|
|
1215
1231
|
text: 'Klikk på <strong>Mine mapper</strong> i menyen til venstre for å komme til mappeoversikten. Her kan du opprette nye mapper og undermapper. Du kan også opprette ei ny mappe i dialogvinduet som kommer når du klikker på et hjerte i en ressurs.',
|