@ndla/ui 30.1.0 → 30.2.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/es/Article/ArticleHeaderWrapper.js +75 -112
- package/es/Footer/FooterLinks.js +13 -10
- package/es/Frontpage/FrontpageFilm.js +11 -8
- package/es/Frontpage/FrontpageMultidisciplinarySubject.js +13 -10
- package/es/Frontpage/FrontpageToolbox.js +11 -8
- package/es/LearningPaths/LearningPathLastStepNavigation.js +11 -8
- package/es/LearningPaths/LearningPathMenuAside.js +13 -10
- package/es/LearningPaths/LearningPathMobileHeader.js +8 -6
- package/es/LearningPaths/LearningPathMobileStepInfo.js +8 -5
- package/es/Masthead/MastheadSearchModal.js +10 -7
- package/es/Messages/MessageBox.js +11 -12
- package/es/MyNdla/Resource/Folder.js +118 -57
- package/es/NDLAFilm/CategorySelect.js +106 -146
- package/es/Resource/BlockResource.js +45 -30
- package/es/Resource/ListResource.js +46 -41
- package/es/Resource/resourceComponents.js +29 -34
- package/es/SearchTypeResult/ActiveFilterContent.js +9 -6
- package/es/SearchTypeResult/SearchHeader.js +14 -12
- package/es/SearchTypeResult/SearchNotionsResult.js +5 -6
- package/es/SearchTypeResult/SearchTypeHeader.js +17 -15
- package/es/Subject/SubjectCarousel.js +11 -8
- package/es/ToolboxPage/ToolboxInfo.js +9 -6
- package/es/User/UserInfo.js +23 -2
- package/es/User/parseUserObject.js +22 -12
- package/es/locale/messages-en.js +5 -1
- package/es/locale/messages-nb.js +5 -1
- package/es/locale/messages-nn.js +5 -1
- package/es/locale/messages-se.js +33 -29
- package/es/locale/messages-sma.js +5 -1
- package/es/utils/createUniversalPortal.js +1 -1
- package/lib/Animation/DisplayOnPageYOffset.d.ts +2 -2
- package/lib/Animation/Fade.d.ts +2 -2
- package/lib/Article/Article.d.ts +3 -3
- package/lib/Article/ArticleAccessMessage.d.ts +1 -1
- package/lib/Article/ArticleByline.d.ts +1 -1
- package/lib/Article/ArticleContent.d.ts +1 -1
- package/lib/Article/ArticleFootNotes.d.ts +1 -1
- package/lib/Article/ArticleHeaderWrapper.d.ts +4 -5
- package/lib/Article/ArticleHeaderWrapper.js +73 -108
- package/lib/Article/ArticleNotions.d.ts +1 -1
- package/lib/Article/ArticleSideBar.d.ts +1 -1
- package/lib/Aside/Aside.d.ts +1 -1
- package/lib/AudioPlayer/AudioPlayer.d.ts +1 -1
- package/lib/AudioPlayer/Controls.d.ts +1 -1
- package/lib/AudioPlayer/SpeechControl.d.ts +1 -1
- package/lib/AuthorInfo/AuthorInfo.d.ts +1 -1
- package/lib/BannerCard/BannerCard.d.ts +1 -1
- package/lib/BlogPosts/BlogPost.d.ts +1 -1
- package/lib/BlogPosts/BlogPostWrapper.d.ts +1 -1
- package/lib/Breadcrumb/ActionBreadcrumb.d.ts +1 -1
- package/lib/Breadcrumb/Breadcrumb.d.ts +1 -1
- package/lib/Breadcrumb/HeaderBreadcrumb.d.ts +1 -1
- package/lib/Breadcrumb/HomeBreadcrumb.d.ts +1 -1
- package/lib/Breadcrumblist/Breadcrumblist.d.ts +1 -1
- package/lib/CompetenceGoalTab/CompetenceGoalItem.d.ts +1 -1
- package/lib/CompetenceGoalTab/CompetenceGoalTab.d.ts +1 -1
- package/lib/CompetenceGoalTab/CompetenceItem.d.ts +1 -1
- package/lib/CompetenceGoalTab/SearchButton.d.ts +1 -1
- package/lib/CompetenceGoals/CompetenceGoalsDialog.d.ts +1 -1
- package/lib/ComponentCursor/ComponentCursor.d.ts +1 -1
- package/lib/ContentCard/ContentCard.d.ts +1 -1
- package/lib/ContentLoader/index.d.ts +1 -1
- package/lib/ContentPlaceholder/ContentPlaceholder.d.ts +1 -1
- package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +9 -9
- package/lib/CopyParagraphButton/CopyParagraphButton.d.ts +1 -1
- package/lib/CreatedBy/CreatedBy.d.ts +1 -1
- package/lib/Dialog/Dialog.d.ts +1 -1
- package/lib/ErrorMessage/ErrorMessage.d.ts +1 -1
- package/lib/ErrorMessage/ErrorResourceAccessDenied.d.ts +1 -1
- package/lib/FactBox/FactBox.d.ts +1 -1
- package/lib/Figure/Figure.d.ts +2 -2
- package/lib/Figure/FigureBylineExpandButton.d.ts +1 -1
- package/lib/Figure/FigureExpandButton.d.ts +1 -1
- package/lib/Figure/FigureLicense.d.ts +2 -2
- package/lib/Figure/FigureLicenseDialog.d.ts +1 -1
- package/lib/Figure/FigureOpenDialogButton.d.ts +1 -1
- package/lib/FileList/File.d.ts +1 -1
- package/lib/FileList/FileList.d.ts +1 -1
- package/lib/Filter/FilterButtons.d.ts +1 -1
- package/lib/Filter/FilterCarousel.d.ts +1 -1
- package/lib/Filter/FilterList.d.ts +1 -1
- package/lib/Filter/FilterListPhone.d.ts +1 -1
- package/lib/Filter/ToggleItem.d.ts +1 -1
- package/lib/Footer/EditorName.d.ts +1 -1
- package/lib/Footer/Footer.d.ts +1 -1
- package/lib/Footer/FooterAuth.d.ts +1 -1
- package/lib/Footer/FooterLinks.d.ts +3 -4
- package/lib/Footer/FooterLinks.js +12 -10
- package/lib/Footer/FooterPrivacy.d.ts +1 -1
- package/lib/Footer/FooterText.d.ts +1 -1
- package/lib/Footer/privacy_en.d.ts +1 -1
- package/lib/Footer/privacy_nb.d.ts +1 -1
- package/lib/Footer/privacy_nn.d.ts +1 -1
- package/lib/Frontpage/FrontpageAllSubjects.d.ts +1 -1
- package/lib/Frontpage/FrontpageFilm.d.ts +2 -4
- package/lib/Frontpage/FrontpageFilm.js +10 -8
- package/lib/Frontpage/FrontpageHeader.d.ts +1 -1
- package/lib/Frontpage/FrontpageInfo.d.ts +1 -1
- package/lib/Frontpage/FrontpageMultidisciplinarySubject.d.ts +7 -8
- package/lib/Frontpage/FrontpageMultidisciplinarySubject.js +12 -10
- package/lib/Frontpage/FrontpageProgramMenu.d.ts +1 -1
- package/lib/Frontpage/FrontpageSearch.d.ts +1 -1
- package/lib/Frontpage/FrontpageToolbox.d.ts +2 -4
- package/lib/Frontpage/FrontpageToolbox.js +10 -8
- package/lib/Frontpage/illustrations/Fellesfag.d.ts +1 -1
- package/lib/Frontpage/illustrations/FrontpageHeaderIllustration.d.ts +1 -1
- package/lib/Frontpage/illustrations/FrontpageIllustrations.d.ts +2 -2
- package/lib/Frontpage/illustrations/FrontpageSubjectIllustration.d.ts +1 -1
- package/lib/Frontpage/illustrations/MenuFellesfag.d.ts +1 -1
- package/lib/Frontpage/illustrations/MenuStudiespesialiserende.d.ts +1 -1
- package/lib/Frontpage/illustrations/MenuYrkesfag.d.ts +1 -1
- package/lib/Frontpage/illustrations/Studiespesialiserende.d.ts +1 -1
- package/lib/Frontpage/illustrations/Yrkesfag.d.ts +1 -1
- package/lib/Frontpage/illustrations/index.d.ts +6 -6
- package/lib/Hero/Hero.d.ts +8 -8
- package/lib/Image/Image.d.ts +2 -2
- package/lib/Image/ImageLink.d.ts +1 -1
- package/lib/Image/LazyLoadImage.d.ts +1 -1
- package/lib/InfoBlock/InfoBlock.d.ts +1 -1
- package/lib/InfoBox/InfoBox.d.ts +1 -1
- package/lib/InfoWidget/InfoWidget.d.ts +1 -1
- package/lib/LanguageSelector/LanguageSelector.d.ts +1 -1
- package/lib/LanguageSelector/LanguageSelectorContent.d.ts +1 -1
- package/lib/Layout/Content.d.ts +2 -2
- package/lib/Layout/LayoutItem.d.ts +1 -1
- package/lib/Layout/OneColumn.d.ts +1 -1
- package/lib/Layout/PageContainer.d.ts +1 -1
- package/lib/LearningPaths/LearningPathContent.d.ts +1 -1
- package/lib/LearningPaths/LearningPathInformation.d.ts +1 -1
- package/lib/LearningPaths/LearningPathLastStepNavigation.d.ts +3 -4
- package/lib/LearningPaths/LearningPathLastStepNavigation.js +10 -8
- package/lib/LearningPaths/LearningPathMenu.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMenuAside.d.ts +2 -4
- package/lib/LearningPaths/LearningPathMenuAside.js +12 -10
- package/lib/LearningPaths/LearningPathMenuAsideCopyright.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMenuContent.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMenuIntro.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMenuModalWrapper.d.ts +1 -1
- package/lib/LearningPaths/LearningPathMobileHeader.d.ts +2 -4
- package/lib/LearningPaths/LearningPathMobileHeader.js +7 -6
- package/lib/LearningPaths/LearningPathMobileStepInfo.d.ts +2 -4
- package/lib/LearningPaths/LearningPathMobileStepInfo.js +7 -5
- package/lib/LearningPaths/LearningPathSticky.d.ts +3 -3
- package/lib/LearningPaths/LearningPathWrapper.d.ts +1 -1
- package/lib/Logo/Logo.d.ts +1 -1
- package/lib/Logo/SvgLogo.d.ts +1 -1
- package/lib/Masthead/Masthead.d.ts +2 -2
- package/lib/Masthead/MastheadAuthModal.d.ts +1 -1
- package/lib/Masthead/MastheadSearchModal.d.ts +3 -4
- package/lib/Masthead/MastheadSearchModal.js +9 -7
- package/lib/Masthead/SkipToMainContent.d.ts +1 -1
- package/lib/MediaList/MediaList.d.ts +8 -8
- package/lib/Messages/MessageBanner.d.ts +1 -1
- package/lib/Messages/MessageBox.d.ts +2 -5
- package/lib/Messages/MessageBox.js +10 -14
- package/lib/Messages/MessageBoxTag.d.ts +1 -1
- package/lib/MultidisciplinarySubject/Illustrations.d.ts +7 -7
- package/lib/MultidisciplinarySubject/List.d.ts +1 -1
- package/lib/MultidisciplinarySubject/ListItem.d.ts +1 -1
- package/lib/MultidisciplinarySubject/MultidisciplinarySubject.d.ts +1 -1
- package/lib/MultidisciplinarySubject/MultidisciplinarySubjectHeader.d.ts +1 -1
- package/lib/MyNdla/Resource/Folder.d.ts +2 -2
- package/lib/MyNdla/Resource/Folder.js +115 -57
- package/lib/MyNdla/Resource/FolderInput.d.ts +1 -1
- package/lib/NDLAFilm/AboutNdlaFilm.d.ts +1 -1
- package/lib/NDLAFilm/AllMoviesAlphabetically.d.ts +1 -1
- package/lib/NDLAFilm/CategorySelect.d.ts +10 -5
- package/lib/NDLAFilm/CategorySelect.js +99 -145
- package/lib/NDLAFilm/FilmContentCard.d.ts +1 -1
- package/lib/NDLAFilm/FilmContentCardTags.d.ts +1 -1
- package/lib/NDLAFilm/FilmMovieList.d.ts +1 -1
- package/lib/NDLAFilm/FilmMovieSearch.d.ts +1 -1
- package/lib/NDLAFilm/FilmSlideshow.d.ts +1 -1
- package/lib/NDLAFilm/MovieGrid.d.ts +1 -1
- package/lib/NDLAFilm/NavigationArrow.d.ts +2 -2
- package/lib/NDLAFilm/SlideshowIndicator.d.ts +1 -1
- package/lib/NDLAFilm/VisualElement.d.ts +1 -1
- package/lib/NDLAFilm/filmStyles.d.ts +2 -2
- package/lib/Navigation/NavigationBox.d.ts +1 -1
- package/lib/Navigation/NavigationHeading.d.ts +1 -1
- package/lib/Navigation/NavigationTopicAbout.d.ts +1 -1
- package/lib/NoContentBox/NoContentBox.d.ts +1 -1
- package/lib/Notion/ConceptNotion.d.ts +1 -1
- package/lib/Notion/FigureNotion.d.ts +1 -1
- package/lib/Notion/Notion.d.ts +1 -1
- package/lib/Notion/NotionImage.d.ts +1 -1
- package/lib/Notion/NotionVisualElement.d.ts +1 -1
- package/lib/Portrait/Portrait.d.ts +1 -1
- package/lib/Programme/Programme.d.ts +1 -1
- package/lib/Programme/ProgrammeSubjects.d.ts +1 -1
- package/lib/RadioButtonGroup/RadioButtonGroup.d.ts +1 -1
- package/lib/RelatedArticleList/RelatedArticleList.d.ts +2 -2
- package/lib/Resource/BlockResource.d.ts +2 -2
- package/lib/Resource/BlockResource.js +44 -30
- package/lib/Resource/ListResource.d.ts +1 -1
- package/lib/Resource/ListResource.js +40 -36
- package/lib/Resource/resourceComponents.d.ts +7 -7
- package/lib/Resource/resourceComponents.js +28 -31
- package/lib/ResourceBox/ResourceBox.d.ts +1 -1
- package/lib/ResourceGroup/ResourceGroup.d.ts +1 -1
- package/lib/ResourceGroup/ResourceItem.d.ts +1 -1
- package/lib/ResourceGroup/ResourceList.d.ts +1 -1
- package/lib/ResourcesWrapper/ResourcesTitle.d.ts +1 -1
- package/lib/ResourcesWrapper/ResourcesTopicTitle.d.ts +1 -1
- package/lib/ResourcesWrapper/ResourcesWrapper.d.ts +1 -1
- package/lib/Search/ActiveFilterContent.d.ts +2 -2
- package/lib/Search/ActiveFilters.d.ts +1 -1
- package/lib/Search/ContentTypeResult.d.ts +1 -1
- package/lib/Search/ContentTypeResultStyles.d.ts +6 -6
- package/lib/Search/LoadingWrapper.d.ts +1 -1
- package/lib/Search/SearchField.d.ts +1 -1
- package/lib/Search/SearchFieldForm.d.ts +1 -1
- package/lib/Search/SearchResult.d.ts +2 -2
- package/lib/Search/SearchResultSleeve.d.ts +1 -1
- package/lib/Search/ToggleSearchButton.d.ts +1 -1
- package/lib/SearchTypeResult/ActiveFilterContent.d.ts +3 -4
- package/lib/SearchTypeResult/ActiveFilterContent.js +8 -6
- package/lib/SearchTypeResult/ActiveFilters.d.ts +1 -1
- package/lib/SearchTypeResult/PopupFilter.d.ts +1 -1
- package/lib/SearchTypeResult/ResultNavigation.d.ts +1 -1
- package/lib/SearchTypeResult/SearchFieldHeader.d.ts +1 -1
- package/lib/SearchTypeResult/SearchFilterContent.d.ts +1 -1
- package/lib/SearchTypeResult/SearchHeader.d.ts +3 -4
- package/lib/SearchTypeResult/SearchHeader.js +13 -12
- package/lib/SearchTypeResult/SearchItem.d.ts +1 -1
- package/lib/SearchTypeResult/SearchItemList.d.ts +1 -1
- package/lib/SearchTypeResult/SearchItems.d.ts +1 -1
- package/lib/SearchTypeResult/SearchNotionItem.d.ts +1 -1
- package/lib/SearchTypeResult/SearchNotionsResult.d.ts +3 -4
- package/lib/SearchTypeResult/SearchNotionsResult.js +5 -6
- package/lib/SearchTypeResult/SearchSubjectItem.d.ts +1 -1
- package/lib/SearchTypeResult/SearchSubjectResult.d.ts +1 -1
- package/lib/SearchTypeResult/SearchTypeHeader.d.ts +1 -2
- package/lib/SearchTypeResult/SearchTypeHeader.js +15 -12
- package/lib/SearchTypeResult/SearchTypeResult.d.ts +1 -1
- package/lib/SearchTypeResult/SearchViewType.d.ts +1 -1
- package/lib/SearchTypeResult/components/ItemContexts.d.ts +1 -1
- package/lib/SearchTypeResult/components/ItemResourceHeader.d.ts +1 -1
- package/lib/SearchTypeResult/components/ItemTopicHeader.d.ts +1 -1
- package/lib/SearchTypeResult/components/SubjectFilters.d.ts +1 -1
- package/lib/SectionHeading/SectionHeading.d.ts +1 -1
- package/lib/SnackBar/DefaultSnackbar.d.ts +1 -1
- package/lib/SnackBar/SnackbarProvider.d.ts +2 -2
- package/lib/Subject/Subject.d.ts +8 -8
- package/lib/Subject/SubjectAbout.d.ts +1 -1
- package/lib/Subject/SubjectArchive.d.ts +1 -1
- package/lib/Subject/SubjectBanner.d.ts +1 -1
- package/lib/Subject/SubjectCarousel.d.ts +2 -4
- package/lib/Subject/SubjectCarousel.js +10 -8
- package/lib/Subject/SubjectHeader.d.ts +1 -1
- package/lib/Subject/SubjectLinks.d.ts +1 -1
- package/lib/Subject/SubjectNewContent.d.ts +1 -1
- package/lib/Subject/SubjectShortcuts.d.ts +1 -1
- package/lib/Subject/SubjectSocial.d.ts +2 -2
- package/lib/Table/Table.d.ts +1 -1
- package/lib/TagSelector/Control.d.ts +1 -1
- package/lib/TagSelector/DropdownIndicator.d.ts +1 -1
- package/lib/TagSelector/Input.d.ts +1 -1
- package/lib/TagSelector/Menu.d.ts +1 -1
- package/lib/TagSelector/MenuList.d.ts +2 -2
- package/lib/TagSelector/Option.d.ts +1 -1
- package/lib/TagSelector/SelectContainer.d.ts +1 -1
- package/lib/TagSelector/TagSelector.d.ts +1 -1
- package/lib/TagSelector/ValueButton.d.ts +2 -2
- package/lib/ToolboxPage/ToolboxInfo.d.ts +3 -4
- package/lib/ToolboxPage/ToolboxInfo.js +8 -6
- package/lib/Topic/Loader.d.ts +1 -1
- package/lib/Topic/Topic.d.ts +1 -1
- package/lib/TopicIntroductionList/TopicIntroduction.d.ts +1 -1
- package/lib/TopicIntroductionList/TopicIntroductionList.d.ts +1 -1
- package/lib/TopicIntroductionList/TopicIntroductionShortcuts.d.ts +1 -1
- package/lib/TopicIntroductionList/TopicShortcutItem.d.ts +1 -1
- package/lib/Translation/Translation.d.ts +1 -1
- package/lib/Translation/TranslationBox.d.ts +1 -1
- package/lib/Translation/TranslationLine.d.ts +1 -1
- package/lib/TreeStructure/AddFolderButton.d.ts +1 -1
- package/lib/TreeStructure/FolderItem.d.ts +1 -1
- package/lib/TreeStructure/FolderItems.d.ts +1 -1
- package/lib/TreeStructure/NavigationLink.d.ts +1 -1
- package/lib/TreeStructure/TreeStructure.d.ts +1 -1
- package/lib/TreeStructure/helperFunctions.d.ts +1 -1
- package/lib/User/AuthModal.d.ts +1 -1
- package/lib/User/UserInfo.d.ts +1 -1
- package/lib/User/UserInfo.js +23 -2
- package/lib/User/apiTypes.d.ts +10 -2
- package/lib/User/parseUserObject.d.ts +2 -1
- package/lib/User/parseUserObject.js +22 -12
- package/lib/locale/LocaleProvider.d.ts +1 -1
- package/lib/locale/messages-en.d.ts +4 -0
- package/lib/locale/messages-en.js +5 -1
- package/lib/locale/messages-nb.d.ts +4 -0
- package/lib/locale/messages-nb.js +5 -1
- package/lib/locale/messages-nn.d.ts +4 -0
- package/lib/locale/messages-nn.js +5 -1
- package/lib/locale/messages-se.d.ts +4 -0
- package/lib/locale/messages-se.js +33 -29
- package/lib/locale/messages-sma.d.ts +4 -0
- package/lib/locale/messages-sma.js +5 -1
- package/lib/utils/createUniversalPortal.d.ts +1 -1
- package/lib/utils/createUniversalPortal.js +1 -1
- package/package.json +10 -10
- package/src/Article/ArticleHeaderWrapper.tsx +53 -66
- package/src/Footer/FooterLinks.tsx +43 -40
- package/src/Frontpage/FrontpageFilm.tsx +20 -17
- package/src/Frontpage/FrontpageMultidisciplinarySubject.tsx +33 -30
- package/src/Frontpage/FrontpageToolbox.tsx +21 -18
- package/src/LearningPaths/LearningPathLastStepNavigation.tsx +32 -29
- package/src/LearningPaths/LearningPathMenuAside.tsx +25 -29
- package/src/LearningPaths/LearningPathMobileHeader.tsx +11 -8
- package/src/LearningPaths/LearningPathMobileStepInfo.tsx +13 -10
- package/src/Masthead/MastheadSearchModal.tsx +36 -35
- package/src/Messages/MessageBox.tsx +2 -3
- package/src/MyNdla/Resource/Folder.tsx +118 -84
- package/src/NDLAFilm/CategorySelect.tsx +77 -97
- package/src/Resource/BlockResource.tsx +34 -28
- package/src/Resource/ListResource.tsx +76 -74
- package/src/Resource/resourceComponents.tsx +15 -20
- package/src/SearchTypeResult/ActiveFilterContent.tsx +18 -15
- package/src/SearchTypeResult/SearchHeader.tsx +4 -4
- package/src/SearchTypeResult/SearchNotionsResult.tsx +2 -3
- package/src/SearchTypeResult/SearchTypeHeader.tsx +48 -45
- package/src/Subject/SubjectCarousel.tsx +93 -96
- package/src/ToolboxPage/ToolboxInfo.tsx +19 -16
- package/src/User/UserInfo.tsx +22 -0
- package/src/User/__tests__/parseUserObject-test.ts +1 -0
- package/src/User/apiTypes.ts +11 -2
- package/src/User/parseUserObject.ts +17 -11
- package/src/locale/messages-en.ts +4 -0
- package/src/locale/messages-nb.ts +4 -0
- package/src/locale/messages-nn.ts +4 -0
- package/src/locale/messages-se.ts +32 -28
- package/src/locale/messages-sma.ts +4 -0
- package/src/utils/createUniversalPortal.tsx +1 -6
|
@@ -6,16 +6,15 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
import React, {
|
|
9
|
+
import React, { ComponentType, ReactNode, useEffect, useState } from 'react';
|
|
10
10
|
import BEMHelper from 'react-bem-helper';
|
|
11
|
-
import {
|
|
11
|
+
import { useTranslation } from 'react-i18next';
|
|
12
12
|
import Button from '@ndla/button';
|
|
13
13
|
import { isMobile } from 'react-device-detect';
|
|
14
14
|
import { fonts, colors } from '@ndla/core';
|
|
15
15
|
|
|
16
16
|
import styled from '@emotion/styled';
|
|
17
17
|
import { FooterHeaderIcon } from '@ndla/icons/common';
|
|
18
|
-
// @ts-ignore
|
|
19
18
|
import CompetenceGoalsDialog from '../CompetenceGoals/CompetenceGoalsDialog';
|
|
20
19
|
|
|
21
20
|
const classes = new BEMHelper({
|
|
@@ -40,12 +39,11 @@ const CompetenceWrapper = styled.div`
|
|
|
40
39
|
`;
|
|
41
40
|
|
|
42
41
|
const CompetenceBadge = styled.span`
|
|
43
|
-
display: inline-
|
|
42
|
+
display: inline-flex;
|
|
44
43
|
background: ${colors.brand.greyLighter};
|
|
45
44
|
border-radius: 36px;
|
|
46
45
|
font-weight: ${fonts.weight.semibold};
|
|
47
46
|
${fonts.sizes('12px', '15px')};
|
|
48
|
-
display: inline-flex;
|
|
49
47
|
align-items: center;
|
|
50
48
|
color: ${colors.text.primary};
|
|
51
49
|
font-family: ${fonts.sans};
|
|
@@ -77,19 +75,11 @@ type Props = {
|
|
|
77
75
|
children: ReactNode;
|
|
78
76
|
};
|
|
79
77
|
|
|
80
|
-
|
|
81
|
-
isOpen
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
class ArticleHeaderWrapper extends Component<Props & WithTranslation, State> {
|
|
85
|
-
constructor(props: Props & WithTranslation) {
|
|
86
|
-
super(props);
|
|
87
|
-
this.state = { isOpen: false };
|
|
88
|
-
this.closeDialog = this.closeDialog.bind(this);
|
|
89
|
-
this.openDialog = this.openDialog.bind(this);
|
|
90
|
-
}
|
|
78
|
+
const ArticleHeaderWrapper = ({ children, competenceGoals, competenceGoalTypes }: Props) => {
|
|
79
|
+
const [isOpen, setIsOpen] = useState(false);
|
|
80
|
+
const { t } = useTranslation();
|
|
91
81
|
|
|
92
|
-
|
|
82
|
+
useEffect(() => {
|
|
93
83
|
if (isMobile) {
|
|
94
84
|
const heroContentList: NodeListOf<HTMLElement> = document.querySelectorAll('.c-article__header');
|
|
95
85
|
if (heroContentList.length === 1) {
|
|
@@ -97,58 +87,55 @@ class ArticleHeaderWrapper extends Component<Props & WithTranslation, State> {
|
|
|
97
87
|
window.scrollBy(0, heroContentList[0].offsetTop - 120); // Adjust for header
|
|
98
88
|
}
|
|
99
89
|
}
|
|
100
|
-
}
|
|
90
|
+
}, []);
|
|
101
91
|
|
|
102
|
-
openDialog() {
|
|
103
|
-
|
|
104
|
-
}
|
|
92
|
+
const openDialog = () => {
|
|
93
|
+
setIsOpen(true);
|
|
94
|
+
};
|
|
105
95
|
|
|
106
|
-
closeDialog() {
|
|
107
|
-
|
|
108
|
-
}
|
|
96
|
+
const closeDialog = () => {
|
|
97
|
+
setIsOpen(false);
|
|
98
|
+
};
|
|
109
99
|
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
return <div {...classes('header')}>{children}</div>;
|
|
114
|
-
}
|
|
100
|
+
if (!competenceGoals) {
|
|
101
|
+
return <div {...classes('header')}>{children}</div>;
|
|
102
|
+
}
|
|
115
103
|
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
);
|
|
130
|
-
return (
|
|
131
|
-
<div {...classes('header')}>
|
|
132
|
-
{children}
|
|
133
|
-
<CompetenceWrapper>
|
|
134
|
-
{competenceGoalTypes &&
|
|
135
|
-
competenceGoalTypes.map((type) => (
|
|
136
|
-
<CompetenceBadge key={type}>
|
|
137
|
-
<FooterHeaderIcon />
|
|
138
|
-
<CompetenceBadgeText>{type}</CompetenceBadgeText>
|
|
139
|
-
</CompetenceBadge>
|
|
140
|
-
))}
|
|
141
|
-
<CompetenceButtonWrapper addSpace={competenceGoalTypes && competenceGoalTypes.length > 0}>
|
|
142
|
-
<OpenButton onClick={this.openDialog}>
|
|
143
|
-
<FooterHeaderIcon />
|
|
144
|
-
<CompetenceBadgeText>{t('competenceGoals.showCompetenceGoals')}</CompetenceBadgeText>
|
|
145
|
-
</OpenButton>
|
|
146
|
-
</CompetenceButtonWrapper>
|
|
147
|
-
</CompetenceWrapper>
|
|
148
|
-
{dialog}
|
|
149
|
-
</div>
|
|
104
|
+
const dialog =
|
|
105
|
+
typeof competenceGoals === 'function' ? (
|
|
106
|
+
competenceGoals({
|
|
107
|
+
Dialog: CompetenceGoalsDialog,
|
|
108
|
+
dialogProps: {
|
|
109
|
+
isOpen: isOpen,
|
|
110
|
+
onClose: closeDialog,
|
|
111
|
+
},
|
|
112
|
+
})
|
|
113
|
+
) : (
|
|
114
|
+
<CompetenceGoalsDialog onClose={closeDialog} isOpen={isOpen}>
|
|
115
|
+
{competenceGoals}
|
|
116
|
+
</CompetenceGoalsDialog>
|
|
150
117
|
);
|
|
151
|
-
|
|
152
|
-
}
|
|
118
|
+
return (
|
|
119
|
+
<div {...classes('header')}>
|
|
120
|
+
{children}
|
|
121
|
+
<CompetenceWrapper>
|
|
122
|
+
{competenceGoalTypes &&
|
|
123
|
+
competenceGoalTypes.map((type) => (
|
|
124
|
+
<CompetenceBadge key={type}>
|
|
125
|
+
<FooterHeaderIcon />
|
|
126
|
+
<CompetenceBadgeText>{type}</CompetenceBadgeText>
|
|
127
|
+
</CompetenceBadge>
|
|
128
|
+
))}
|
|
129
|
+
<CompetenceButtonWrapper addSpace={competenceGoalTypes && competenceGoalTypes.length > 0}>
|
|
130
|
+
<OpenButton onClick={openDialog}>
|
|
131
|
+
<FooterHeaderIcon />
|
|
132
|
+
<CompetenceBadgeText>{t('competenceGoals.showCompetenceGoals')}</CompetenceBadgeText>
|
|
133
|
+
</OpenButton>
|
|
134
|
+
</CompetenceButtonWrapper>
|
|
135
|
+
</CompetenceWrapper>
|
|
136
|
+
{dialog}
|
|
137
|
+
</div>
|
|
138
|
+
);
|
|
139
|
+
};
|
|
153
140
|
|
|
154
|
-
export default
|
|
141
|
+
export default ArticleHeaderWrapper;
|
|
@@ -3,7 +3,7 @@ import styled from '@emotion/styled';
|
|
|
3
3
|
import { spacing, fonts, colors, mq, breakpoints, spacingUnit } from '@ndla/core';
|
|
4
4
|
import SafeLink from '@ndla/safelink';
|
|
5
5
|
import { Forward, Launch } from '@ndla/icons/common';
|
|
6
|
-
import {
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
7
7
|
|
|
8
8
|
const StyledLinksWrapper = styled.div`
|
|
9
9
|
display: flex;
|
|
@@ -92,43 +92,46 @@ const StyledHeaderLinks = styled.h1`
|
|
|
92
92
|
margin: ${spacing.xsmall} 0;
|
|
93
93
|
`;
|
|
94
94
|
|
|
95
|
-
const FooterLinks = ({
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
<
|
|
123
|
-
{link.
|
|
124
|
-
<
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
95
|
+
const FooterLinks = ({ links }: FooterLinksProps) => {
|
|
96
|
+
const { t } = useTranslation();
|
|
97
|
+
return (
|
|
98
|
+
<>
|
|
99
|
+
<StyledLinksWrapper>
|
|
100
|
+
<section>
|
|
101
|
+
<StyledHeaderLinks>
|
|
102
|
+
{t('footer.footerLinksHeader')} <Launch />
|
|
103
|
+
</StyledHeaderLinks>
|
|
104
|
+
<StyledNav>
|
|
105
|
+
{commonLinks.map((link) => (
|
|
106
|
+
<div key={link.url}>
|
|
107
|
+
<StyledSafeLink
|
|
108
|
+
key={t<string>(`footer.ndlaLinks.${link.key}`)}
|
|
109
|
+
aria-label={t(`footer.ndlaLinks.${link.key}`)}
|
|
110
|
+
to={link.url}
|
|
111
|
+
target="_blank"
|
|
112
|
+
rel="noopener noreferrer">
|
|
113
|
+
{t(`footer.ndlaLinks.${link.key}`)}
|
|
114
|
+
</StyledSafeLink>
|
|
115
|
+
</div>
|
|
116
|
+
))}
|
|
117
|
+
</StyledNav>
|
|
118
|
+
</section>
|
|
119
|
+
<section>
|
|
120
|
+
<StyledNav>
|
|
121
|
+
{links.map((link) => (
|
|
122
|
+
<StyledSocialMediaLinkWrapper key={link.to}>
|
|
123
|
+
<StyledSocialMediaIcon>{link.icon}</StyledSocialMediaIcon>
|
|
124
|
+
<StyledSafeLink to={link.to}>
|
|
125
|
+
{link.text}
|
|
126
|
+
<Forward />
|
|
127
|
+
</StyledSafeLink>
|
|
128
|
+
</StyledSocialMediaLinkWrapper>
|
|
129
|
+
))}
|
|
130
|
+
</StyledNav>
|
|
131
|
+
</section>
|
|
132
|
+
</StyledLinksWrapper>
|
|
133
|
+
</>
|
|
134
|
+
);
|
|
135
|
+
};
|
|
133
136
|
|
|
134
|
-
export default
|
|
137
|
+
export default FooterLinks;
|
|
@@ -3,7 +3,7 @@ import styled from '@emotion/styled';
|
|
|
3
3
|
import { css } from '@emotion/react';
|
|
4
4
|
import SafeLink from '@ndla/safelink';
|
|
5
5
|
import { Forward } from '@ndla/icons/common';
|
|
6
|
-
import {
|
|
6
|
+
import { useTranslation } from 'react-i18next';
|
|
7
7
|
import { spacing, spacingUnit, colors, breakpoints, fonts, mq } from '@ndla/core';
|
|
8
8
|
import SectionHeading from '../SectionHeading';
|
|
9
9
|
|
|
@@ -74,20 +74,23 @@ type Props = {
|
|
|
74
74
|
imageUrl: string;
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
const FrontpageFilm = ({ url, imageUrl
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<
|
|
81
|
-
<
|
|
82
|
-
<
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
<
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
77
|
+
const FrontpageFilm = ({ url, imageUrl }: Props) => {
|
|
78
|
+
const { t } = useTranslation();
|
|
79
|
+
return (
|
|
80
|
+
<StyledSection>
|
|
81
|
+
<SectionHeading large>{t('welcomePage.film.header')}</SectionHeading>
|
|
82
|
+
<StyledImage imageUrl={imageUrl}>
|
|
83
|
+
<StyledText>{t('welcomePage.film.text')}</StyledText>
|
|
84
|
+
<StyledText narrow>{t('welcomePage.film.textShort')}</StyledText>
|
|
85
|
+
</StyledImage>
|
|
86
|
+
<div className="o-text-link__wrapper o-text-link__wrapper--right">
|
|
87
|
+
<SafeLink className="o-text-link" to={url}>
|
|
88
|
+
{t('welcomePage.film.linkLabel')}
|
|
89
|
+
<Forward />
|
|
90
|
+
</SafeLink>
|
|
91
|
+
</div>
|
|
92
|
+
</StyledSection>
|
|
93
|
+
);
|
|
94
|
+
};
|
|
92
95
|
|
|
93
|
-
export default
|
|
96
|
+
export default FrontpageFilm;
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import SafeLink, { SafeLinkButton } from '@ndla/safelink';
|
|
3
3
|
import styled from '@emotion/styled';
|
|
4
4
|
import { spacing, breakpoints, mq } from '@ndla/core';
|
|
5
|
-
import {
|
|
5
|
+
import { useTranslation } from 'react-i18next';
|
|
6
6
|
import SectionHeading from '../SectionHeading';
|
|
7
7
|
import ComponentCursor from '../ComponentCursor';
|
|
8
8
|
import { MultidisciplinarySubjectIllustration as Illustration } from './illustrations/FrontpageIllustrations';
|
|
@@ -74,33 +74,36 @@ type Props = {
|
|
|
74
74
|
topics?: { url: string; title: string; id: string }[];
|
|
75
75
|
};
|
|
76
76
|
|
|
77
|
-
const FrontpageMultidisciplinarySubject = ({ url,
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
<
|
|
81
|
-
<
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
<
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
77
|
+
const FrontpageMultidisciplinarySubject = ({ url, topics }: Props) => {
|
|
78
|
+
const { t } = useTranslation();
|
|
79
|
+
return (
|
|
80
|
+
<StyledSection>
|
|
81
|
+
<ComponentCursor variant="left" text={t('frontpageMultidisciplinarySubject.cursorText')} />
|
|
82
|
+
<Wrapper>
|
|
83
|
+
<Content>
|
|
84
|
+
<SectionHeading large>{t('frontpageMultidisciplinarySubject.heading')}</SectionHeading>
|
|
85
|
+
{topics ? (
|
|
86
|
+
<Topics>
|
|
87
|
+
{topics.map((topic) => {
|
|
88
|
+
return (
|
|
89
|
+
<Topic key={topic.id}>
|
|
90
|
+
<SafeLink to={topic.url}>{topic.title}</SafeLink>
|
|
91
|
+
</Topic>
|
|
92
|
+
);
|
|
93
|
+
})}
|
|
94
|
+
</Topics>
|
|
95
|
+
) : null}
|
|
96
|
+
<StyledText>{t('frontpageMultidisciplinarySubject.text')}</StyledText>
|
|
97
|
+
</Content>
|
|
98
|
+
</Wrapper>
|
|
99
|
+
<TargetItem className="o-text-link__wrapper o-text-link__wrapper">
|
|
100
|
+
<SafeLinkButton to={url} buttonSize="medium" borderShape="rounded">
|
|
101
|
+
{t('frontpageMultidisciplinarySubject.linkText')}
|
|
102
|
+
</SafeLinkButton>
|
|
103
|
+
</TargetItem>
|
|
104
|
+
<Illustration />
|
|
105
|
+
</StyledSection>
|
|
106
|
+
);
|
|
107
|
+
};
|
|
105
108
|
|
|
106
|
-
export default
|
|
109
|
+
export default FrontpageMultidisciplinarySubject;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import styled from '@emotion/styled';
|
|
3
|
-
import {
|
|
3
|
+
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';
|
|
@@ -46,21 +46,24 @@ type Props = {
|
|
|
46
46
|
urlTeachers: string;
|
|
47
47
|
};
|
|
48
48
|
|
|
49
|
-
const FrontpageToolbox = ({ urlStudents, urlTeachers
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
<
|
|
53
|
-
|
|
54
|
-
<
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
49
|
+
const FrontpageToolbox = ({ urlStudents, urlTeachers }: Props) => {
|
|
50
|
+
const { t } = useTranslation();
|
|
51
|
+
return (
|
|
52
|
+
<StyledSection>
|
|
53
|
+
<ComponentCursor variant="left" text={t('frontPageToolbox.cursorText')} />
|
|
54
|
+
<SectionHeading large>{t('frontPageToolbox.heading')}</SectionHeading>
|
|
55
|
+
<ToolboxWrapper>
|
|
56
|
+
<StyledText>{t('frontPageToolbox.text')}</StyledText>
|
|
57
|
+
</ToolboxWrapper>
|
|
58
|
+
<StyledStudentsButton to={urlStudents} buttonSize="medium" borderShape="rounded">
|
|
59
|
+
{t('frontPageToolbox.linkTextStudents')}
|
|
60
|
+
</StyledStudentsButton>
|
|
61
|
+
<SafeLinkButton to={urlTeachers} buttonSize="medium" borderShape="rounded">
|
|
62
|
+
{t('frontPageToolbox.linkTextTeachers')}
|
|
63
|
+
</SafeLinkButton>
|
|
64
|
+
<Illustration />
|
|
65
|
+
</StyledSection>
|
|
66
|
+
);
|
|
67
|
+
};
|
|
65
68
|
|
|
66
|
-
export default
|
|
69
|
+
export default FrontpageToolbox;
|
|
@@ -10,7 +10,7 @@ import React, { ReactNode } from 'react';
|
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { css } from '@emotion/react';
|
|
12
12
|
import SafeLink from '@ndla/safelink';
|
|
13
|
-
import {
|
|
13
|
+
import { useTranslation } from 'react-i18next';
|
|
14
14
|
import { fonts, spacing, spacingUnit } from '@ndla/core';
|
|
15
15
|
import { OneColumn, LayoutItem } from '../index';
|
|
16
16
|
|
|
@@ -51,32 +51,35 @@ interface Props {
|
|
|
51
51
|
learningPathName: string;
|
|
52
52
|
}
|
|
53
53
|
|
|
54
|
-
const LearningPathLastStepNavigation = ({ subject, topic, learningPathName, children
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
<
|
|
60
|
-
{t('learningPath.lastStep.
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
<
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
<
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
54
|
+
const LearningPathLastStepNavigation = ({ subject, topic, learningPathName, children }: Props) => {
|
|
55
|
+
const { t } = useTranslation();
|
|
56
|
+
return (
|
|
57
|
+
<OneColumn css={OneColumnCss}>
|
|
58
|
+
<LayoutItem layout="center">
|
|
59
|
+
<StyledHeader className="c-article__title">
|
|
60
|
+
<span>{t('learningPath.lastStep.heading')}</span>
|
|
61
|
+
<StyledSmallText>
|
|
62
|
+
{t('learningPath.lastStep.headingSmall', {
|
|
63
|
+
learningPathName,
|
|
64
|
+
})}
|
|
65
|
+
</StyledSmallText>
|
|
66
|
+
</StyledHeader>
|
|
67
|
+
{subject && (
|
|
68
|
+
<StyledLinkWrapper>
|
|
69
|
+
{t('learningPath.lastStep.subjectHeading')}
|
|
70
|
+
<SafeLink to={subject.url}>{subject.name}</SafeLink>
|
|
71
|
+
</StyledLinkWrapper>
|
|
72
|
+
)}
|
|
73
|
+
{topic && (
|
|
74
|
+
<StyledLinkWrapper>
|
|
75
|
+
{t('learningPath.lastStep.topicHeading')}
|
|
76
|
+
<SafeLink to={topic.url}>{topic.name}</SafeLink>
|
|
77
|
+
</StyledLinkWrapper>
|
|
78
|
+
)}
|
|
79
|
+
{children}
|
|
80
|
+
</LayoutItem>
|
|
81
|
+
</OneColumn>
|
|
82
|
+
);
|
|
83
|
+
};
|
|
81
84
|
|
|
82
|
-
export default
|
|
85
|
+
export default LearningPathLastStepNavigation;
|
|
@@ -11,7 +11,7 @@ import styled from '@emotion/styled';
|
|
|
11
11
|
import { css } from '@emotion/react';
|
|
12
12
|
import { Time } from '@ndla/icons/common';
|
|
13
13
|
import { SafeLinkButton } from '@ndla/safelink';
|
|
14
|
-
import {
|
|
14
|
+
import { useTranslation } from 'react-i18next';
|
|
15
15
|
import { colors, spacing, spacingUnit, fonts, mq, breakpoints, animations } from '@ndla/core';
|
|
16
16
|
import LearningPathMenuAsideCopyright from './LearningPathMenuAsideCopyright';
|
|
17
17
|
|
|
@@ -107,32 +107,28 @@ type Props = {
|
|
|
107
107
|
};
|
|
108
108
|
};
|
|
109
109
|
|
|
110
|
-
const LearningPathMenuAside = ({
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
}:
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
<
|
|
121
|
-
<p>
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
{t('learningPath.createLearningPathButtonText')}
|
|
134
|
-
</StyledSafeLinkButton>
|
|
135
|
-
</StyledAside>
|
|
136
|
-
);
|
|
110
|
+
const LearningPathMenuAside = ({ lastUpdated, learningPathURL, copyright, isOpen, invertedStyle }: Props) => {
|
|
111
|
+
const { t } = useTranslation();
|
|
112
|
+
return (
|
|
113
|
+
<StyledAside isOpen={isOpen} invertedStyle={invertedStyle}>
|
|
114
|
+
<div css={learningPathDetailsCSS}>
|
|
115
|
+
<Time />
|
|
116
|
+
<p>
|
|
117
|
+
{t('learningPath.lastUpdated')}: {lastUpdated}
|
|
118
|
+
</p>
|
|
119
|
+
</div>
|
|
120
|
+
{copyright.contributors && <LearningPathMenuAsideCopyright copyright={copyright} />}
|
|
121
|
+
<p css={infoTextCSS}>{t('learningPath.createLearningPathText')}</p>
|
|
122
|
+
<StyledSafeLinkButton
|
|
123
|
+
to={learningPathURL}
|
|
124
|
+
target="_blank"
|
|
125
|
+
rel="noopener noreferrer"
|
|
126
|
+
outline
|
|
127
|
+
invertedStyle={invertedStyle}>
|
|
128
|
+
{t('learningPath.createLearningPathButtonText')}
|
|
129
|
+
</StyledSafeLinkButton>
|
|
130
|
+
</StyledAside>
|
|
131
|
+
);
|
|
132
|
+
};
|
|
137
133
|
|
|
138
|
-
export default
|
|
134
|
+
export default LearningPathMenuAside;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import styled from '@emotion/styled';
|
|
10
10
|
import { colors, fonts, spacing } from '@ndla/core';
|
|
11
11
|
import React from 'react';
|
|
12
|
-
import {
|
|
12
|
+
import { useTranslation } from 'react-i18next';
|
|
13
13
|
import { LearningPathBadge } from '../ContentTypeBadge';
|
|
14
14
|
|
|
15
15
|
const StyledWrapper = styled.div`
|
|
@@ -25,11 +25,14 @@ const StyledMiniHeader = styled.span`
|
|
|
25
25
|
${fonts.sizes(16, 1.1)};
|
|
26
26
|
`;
|
|
27
27
|
|
|
28
|
-
const LearningPathMobileHeader = (
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
<
|
|
32
|
-
|
|
33
|
-
)
|
|
28
|
+
const LearningPathMobileHeader = () => {
|
|
29
|
+
const { t } = useTranslation();
|
|
30
|
+
return (
|
|
31
|
+
<StyledWrapper>
|
|
32
|
+
<LearningPathBadge size="xx-small" background />
|
|
33
|
+
<StyledMiniHeader>{t('learningPath.youAreInALearningPath')}</StyledMiniHeader>
|
|
34
|
+
</StyledWrapper>
|
|
35
|
+
);
|
|
36
|
+
};
|
|
34
37
|
|
|
35
|
-
export default
|
|
38
|
+
export default LearningPathMobileHeader;
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
import React from 'react';
|
|
10
10
|
import styled from '@emotion/styled';
|
|
11
11
|
import { mq, breakpoints, typography } from '@ndla/core';
|
|
12
|
-
import {
|
|
12
|
+
import { useTranslation } from 'react-i18next';
|
|
13
13
|
|
|
14
14
|
const StyledInfo = styled.div`
|
|
15
15
|
${typography.smallHeading}
|
|
@@ -24,13 +24,16 @@ type Props = {
|
|
|
24
24
|
current: number;
|
|
25
25
|
};
|
|
26
26
|
|
|
27
|
-
const LearningPathMobileStepInfo = ({ total, current
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
)
|
|
27
|
+
const LearningPathMobileStepInfo = ({ total, current }: Props) => {
|
|
28
|
+
const { t } = useTranslation();
|
|
29
|
+
return (
|
|
30
|
+
<StyledInfo>
|
|
31
|
+
{t('learningPath.mobileStepInfo', {
|
|
32
|
+
totalPages: total,
|
|
33
|
+
currentPage: current,
|
|
34
|
+
})}
|
|
35
|
+
</StyledInfo>
|
|
36
|
+
);
|
|
37
|
+
};
|
|
35
38
|
|
|
36
|
-
export default
|
|
39
|
+
export default LearningPathMobileStepInfo;
|