@ndla/ui 55.0.15-alpha.0 → 55.0.17-alpha.0
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/dist/panda.buildinfo.json +125 -29
- package/dist/styles.css +453 -103
- package/es/Article/Article.js +101 -162
- package/es/Article/ArticleByline.js +89 -56
- package/es/Article/ArticleFootNotes.js +35 -23
- package/es/Article/ArticleParagraph.js +2 -2
- package/es/Article/index.js +3 -5
- package/es/AudioPlayer/AudioPlayer.js +20 -20
- package/es/AudioPlayer/Controls.js +45 -45
- package/es/AudioPlayer/SpeechControl.js +8 -8
- package/es/BlogPost/BlogPost.js +6 -6
- package/es/Breadcrumb/Breadcrumb.js +19 -29
- package/es/Breadcrumb/BreadcrumbItem.js +20 -49
- package/es/Breadcrumb/HomeBreadcrumb.js +36 -82
- package/es/CampaignBlock/CampaignBlock.js +12 -12
- package/es/CodeBlock/CodeBlock.js +2 -2
- package/es/Concept/Concept.js +11 -11
- package/es/ContactBlock/ContactBlock.js +170 -185
- package/es/ContactBlock/index.js +3 -3
- package/es/ContentLoader/index.js +12 -12
- package/es/ContentPlaceholder/ContentPlaceholder.js +3 -3
- package/es/ContentTypeBadge/ContentTypeBadge.js +81 -80
- package/es/ContentTypeBadge/ContentTypeBadgeNew.js +3 -2
- package/es/ContentTypeHero/ContentTypeHero.js +50 -0
- package/es/{Logo → ContentTypeHero}/index.js +2 -3
- package/es/CopyParagraphButton/CopyParagraphButton.js +13 -12
- package/es/Embed/AudioEmbed.js +7 -7
- package/es/Embed/BrightcoveEmbed.js +8 -8
- package/es/Embed/CodeEmbed.js +6 -6
- package/es/Embed/ConceptEmbed.js +13 -13
- package/es/Embed/ConceptListEmbed.js +9 -9
- package/es/Embed/ContentLinkEmbed.js +6 -6
- package/es/Embed/CopyrightEmbed.js +3 -3
- package/es/Embed/EmbedErrorPlaceholder.js +5 -5
- package/es/Embed/ExternalEmbed.js +5 -5
- package/es/Embed/FootnoteEmbed.js +5 -5
- package/es/Embed/GlossEmbed.js +11 -11
- package/es/Embed/H5pEmbed.js +5 -5
- package/es/Embed/IframeEmbed.js +6 -6
- package/es/Embed/ImageEmbed.js +10 -10
- package/es/Embed/InlineTriggerButton.js +2 -2
- package/es/Embed/RelatedContentEmbed.js +5 -5
- package/es/Embed/UnknownEmbed.js +3 -3
- package/es/Embed/UuDisclaimerEmbed.js +6 -6
- package/es/ErrorMessage/ErrorMessage.js +14 -14
- package/es/ErrorMessage/ErrorResourceAccessDenied.js +6 -6
- package/es/FactBox/FactBox.js +5 -5
- package/es/FileList/File.js +3 -3
- package/es/FileList/FileList.js +6 -6
- package/es/FileList/Format.js +6 -6
- package/es/FileList/PdfFile.js +5 -5
- package/es/FrontpageArticle/FrontpageArticle.js +7 -8
- package/es/Gloss/Gloss.js +23 -23
- package/es/Gloss/GlossExample.js +9 -9
- package/es/Grid/Grid.js +4 -4
- package/es/KeyFigure/KeyFigure.js +5 -5
- package/es/Layout/LayoutItem.js +25 -37
- package/es/Layout/OneColumn.js +33 -31
- package/es/Layout/PageContainer.js +21 -30
- package/es/LicenseByline/EmbedByline.js +21 -21
- package/es/LicenseByline/LicenseLink.js +3 -3
- package/es/LinkBlock/LinkBlock.js +8 -8
- package/es/LinkBlock/LinkBlockSection.js +4 -4
- package/es/Messages/MessageBox.js +11 -11
- package/es/Messages/index.js +1 -2
- package/es/ProgrammeCard/ProgrammeCard.js +5 -5
- package/es/RelatedArticleList/RelatedArticleList.js +15 -15
- package/es/ResourceBox/ResourceBox.js +9 -9
- package/es/SnackBar/DefaultSnackbar.js +5 -5
- package/es/SnackBar/SnackbarProvider.js +7 -7
- package/es/TagSelector/TagSelector.js +17 -17
- package/es/TreeStructure/AddFolderButton.js +4 -4
- package/es/TreeStructure/ComboboxButton.js +7 -7
- package/es/TreeStructure/FolderItem.js +13 -13
- package/es/TreeStructure/FolderItems.js +6 -6
- package/es/TreeStructure/TreeStructure.js +9 -9
- package/es/ZendeskButton/ZendeskButton.js +2 -2
- package/es/i18n/index.js +1 -1
- package/es/index.js +5 -12
- package/es/locale/messages-en.js +1 -1
- package/es/locale/messages-nb.js +1 -1
- package/es/locale/messages-nn.js +1 -1
- package/es/locale/messages-se.js +1 -1
- package/es/locale/messages-sma.js +1 -1
- package/es/model/ContentType.js +3 -1
- package/es/styles.css +453 -103
- package/lib/Article/Article.d.ts +9 -30
- package/lib/Article/Article.js +104 -164
- package/lib/Article/ArticleByline.d.ts +1 -3
- package/lib/Article/ArticleByline.js +89 -56
- package/lib/Article/ArticleFootNotes.js +35 -24
- package/lib/Article/ArticleParagraph.js +2 -2
- package/lib/Article/index.d.ts +2 -5
- package/lib/Article/index.js +18 -24
- package/lib/AudioPlayer/AudioPlayer.js +20 -20
- package/lib/AudioPlayer/Controls.js +45 -45
- package/lib/AudioPlayer/SpeechControl.js +8 -8
- package/lib/BlogPost/BlogPost.js +6 -6
- package/lib/Breadcrumb/Breadcrumb.js +21 -29
- package/lib/Breadcrumb/BreadcrumbItem.js +22 -50
- package/lib/Breadcrumb/HomeBreadcrumb.d.ts +1 -2
- package/lib/Breadcrumb/HomeBreadcrumb.js +38 -82
- package/lib/CampaignBlock/CampaignBlock.js +12 -12
- package/lib/CodeBlock/CodeBlock.js +2 -2
- package/lib/Concept/Concept.js +11 -11
- package/lib/ContactBlock/ContactBlock.d.ts +6 -7
- package/lib/ContactBlock/ContactBlock.js +173 -184
- package/lib/ContactBlock/index.d.ts +3 -3
- package/lib/ContactBlock/index.js +13 -11
- package/lib/ContentLoader/index.js +12 -12
- package/lib/ContentPlaceholder/ContentPlaceholder.js +3 -3
- package/lib/ContentTypeBadge/ContentTypeBadge.d.ts +11 -12
- package/lib/ContentTypeBadge/ContentTypeBadge.js +83 -80
- package/lib/ContentTypeBadge/ContentTypeBadgeNew.d.ts +1 -2
- package/lib/ContentTypeBadge/ContentTypeBadgeNew.js +3 -2
- package/lib/ContentTypeHero/ContentTypeHero.d.ts +15 -0
- package/lib/ContentTypeHero/ContentTypeHero.js +57 -0
- package/lib/ContentTypeHero/index.d.ts +9 -0
- package/lib/ContentTypeHero/index.js +12 -0
- package/lib/CopyParagraphButton/CopyParagraphButton.js +13 -12
- package/lib/Embed/AudioEmbed.js +7 -7
- package/lib/Embed/BrightcoveEmbed.js +8 -8
- package/lib/Embed/CodeEmbed.js +6 -6
- package/lib/Embed/ConceptEmbed.js +13 -13
- package/lib/Embed/ConceptListEmbed.js +9 -9
- package/lib/Embed/ContentLinkEmbed.js +6 -6
- package/lib/Embed/CopyrightEmbed.js +3 -3
- package/lib/Embed/EmbedErrorPlaceholder.js +5 -5
- package/lib/Embed/ExternalEmbed.js +5 -5
- package/lib/Embed/FootnoteEmbed.js +5 -5
- package/lib/Embed/GlossEmbed.js +11 -11
- package/lib/Embed/H5pEmbed.js +5 -5
- package/lib/Embed/IframeEmbed.js +6 -6
- package/lib/Embed/ImageEmbed.js +10 -10
- package/lib/Embed/InlineTriggerButton.js +2 -2
- package/lib/Embed/RelatedContentEmbed.js +5 -5
- package/lib/Embed/UnknownEmbed.js +3 -3
- package/lib/Embed/UuDisclaimerEmbed.js +6 -6
- package/lib/ErrorMessage/ErrorMessage.js +14 -14
- package/lib/ErrorMessage/ErrorResourceAccessDenied.js +6 -6
- package/lib/FactBox/FactBox.js +5 -5
- package/lib/FileList/File.js +3 -3
- package/lib/FileList/FileList.js +6 -6
- package/lib/FileList/Format.js +6 -6
- package/lib/FileList/PdfFile.js +5 -5
- package/lib/FrontpageArticle/FrontpageArticle.js +7 -8
- package/lib/Gloss/Gloss.js +23 -23
- package/lib/Gloss/GlossExample.js +9 -9
- package/lib/Grid/Grid.js +4 -4
- package/lib/KeyFigure/KeyFigure.js +5 -5
- package/lib/Layout/LayoutItem.d.ts +3 -7
- package/lib/Layout/LayoutItem.js +27 -38
- package/lib/Layout/OneColumn.d.ts +3 -6
- package/lib/Layout/OneColumn.js +36 -33
- package/lib/Layout/PageContainer.d.ts +3 -6
- package/lib/Layout/PageContainer.js +24 -32
- package/lib/LicenseByline/EmbedByline.js +21 -21
- package/lib/LicenseByline/LicenseLink.js +3 -3
- package/lib/LinkBlock/LinkBlock.js +8 -8
- package/lib/LinkBlock/LinkBlockSection.js +4 -4
- package/lib/Messages/MessageBox.js +11 -11
- package/lib/Messages/index.d.ts +1 -2
- package/lib/Messages/index.js +0 -7
- package/lib/ProgrammeCard/ProgrammeCard.js +5 -5
- package/lib/RelatedArticleList/RelatedArticleList.js +15 -15
- package/lib/ResourceBox/ResourceBox.js +9 -9
- package/lib/SnackBar/DefaultSnackbar.js +5 -5
- package/lib/SnackBar/SnackbarProvider.js +7 -7
- package/lib/TagSelector/TagSelector.js +17 -17
- package/lib/TreeStructure/AddFolderButton.js +4 -4
- package/lib/TreeStructure/ComboboxButton.js +7 -7
- package/lib/TreeStructure/FolderItem.js +13 -13
- package/lib/TreeStructure/FolderItems.js +6 -6
- package/lib/TreeStructure/TreeStructure.js +9 -9
- package/lib/ZendeskButton/ZendeskButton.js +2 -2
- package/lib/i18n/index.d.ts +1 -1
- package/lib/i18n/index.js +6 -0
- package/lib/index.d.ts +8 -15
- package/lib/index.js +30 -139
- package/lib/locale/messages-en.js +1 -1
- package/lib/locale/messages-nb.js +1 -1
- package/lib/locale/messages-nn.js +1 -1
- package/lib/locale/messages-se.js +1 -1
- package/lib/locale/messages-sma.js +1 -1
- package/lib/model/ContentType.d.ts +1 -0
- package/lib/model/ContentType.js +4 -2
- package/lib/styles.css +453 -103
- package/package.json +10 -11
- package/src/Article/Article.tsx +101 -229
- package/src/Article/ArticleByline.tsx +82 -69
- package/src/Article/ArticleFootNotes.tsx +32 -36
- package/src/Article/index.ts +3 -7
- package/src/Breadcrumb/Breadcrumb.tsx +20 -18
- package/src/Breadcrumb/BreadcrumbItem.tsx +36 -59
- package/src/Breadcrumb/HomeBreadcrumb.stories.tsx +0 -12
- package/src/Breadcrumb/HomeBreadcrumb.tsx +33 -46
- package/src/ContactBlock/{Contactblock.stories.tsx → ContactBlock.stories.tsx} +3 -4
- package/src/ContactBlock/ContactBlock.tsx +165 -199
- package/src/ContactBlock/index.ts +3 -3
- package/src/ContentTypeBadge/ContentTypeBadge.tsx +77 -77
- package/src/ContentTypeBadge/ContentTypeBadgeNew.tsx +3 -1
- package/src/ContentTypeHero/ContentTypeHero.stories.tsx +76 -0
- package/src/ContentTypeHero/ContentTypeHero.tsx +55 -0
- package/src/ContentTypeHero/index.ts +10 -0
- package/src/CopyParagraphButton/CopyParagraphButton.tsx +10 -3
- package/src/Embed/AudioEmbed.stories.tsx +6 -8
- package/src/Embed/BrightcoveEmbed.stories.tsx +6 -8
- package/src/Embed/ConceptEmbed.stories.tsx +6 -8
- package/src/Embed/ExternalEmbed.stories.tsx +5 -5
- package/src/Embed/H5pEmbed.stories.tsx +6 -8
- package/src/Embed/IframeEmbed.stories.tsx +6 -8
- package/src/Embed/ImageEmbed.stories.tsx +6 -8
- package/src/Embed/RelatedContentEmbed.stories.tsx +6 -8
- package/src/Embed/UuDisclaimerEmbed.stories.tsx +6 -8
- package/src/FrontpageArticle/FrontpageArticle.tsx +1 -1
- package/src/Layout/LayoutItem.tsx +25 -41
- package/src/Layout/OneColumn.tsx +33 -33
- package/src/Layout/PageContainer.tsx +22 -24
- package/src/Messages/index.ts +1 -2
- package/src/i18n/index.ts +1 -0
- package/src/index.ts +11 -35
- package/src/locale/messages-en.ts +1 -1
- package/src/locale/messages-nb.ts +1 -1
- package/src/locale/messages-nn.ts +1 -1
- package/src/locale/messages-se.ts +1 -1
- package/src/locale/messages-sma.ts +1 -1
- package/src/model/ContentType.ts +2 -0
- package/es/Article/ArticleHeaderWrapper.js +0 -33
- package/es/CreatedBy/CreatedBy.js +0 -73
- package/es/CreatedBy/index.js +0 -10
- package/es/Hero/Hero.js +0 -68
- package/es/Hero/HeroContent.js +0 -16
- package/es/Hero/index.js +0 -10
- package/es/LanguageSelector/LanguageSelector.js +0 -87
- package/es/LanguageSelector/index.js +0 -10
- package/es/Logo/Logo.js +0 -52
- package/es/Logo/SvgLogo.js +0 -54
- package/es/Messages/MessageBanner.js +0 -72
- package/es/Search/ActiveFilterContent.js +0 -40
- package/es/Search/ActiveFilters.js +0 -112
- package/es/Search/ContentTypeResult.js +0 -151
- package/es/Search/ContentTypeResultStyles.js +0 -51
- package/es/Search/IsPathToHighlight.js +0 -12
- package/es/Search/LoadingWrapper.js +0 -31
- package/es/Search/SearchField.js +0 -110
- package/es/Search/SearchFieldForm.js +0 -33
- package/es/Search/SearchResult.js +0 -185
- package/es/Search/SearchResultSleeve.js +0 -229
- package/es/Search/index.js +0 -12
- package/lib/Article/ArticleHeaderWrapper.d.ts +0 -14
- package/lib/Article/ArticleHeaderWrapper.js +0 -40
- package/lib/CreatedBy/CreatedBy.d.ts +0 -15
- package/lib/CreatedBy/CreatedBy.js +0 -78
- package/lib/CreatedBy/index.d.ts +0 -9
- package/lib/CreatedBy/index.js +0 -16
- package/lib/Hero/Hero.d.ts +0 -25
- package/lib/Hero/Hero.js +0 -83
- package/lib/Hero/HeroContent.d.ts +0 -12
- package/lib/Hero/HeroContent.js +0 -23
- package/lib/Hero/index.d.ts +0 -10
- package/lib/Hero/index.js +0 -61
- package/lib/LanguageSelector/LanguageSelector.d.ts +0 -15
- package/lib/LanguageSelector/LanguageSelector.js +0 -92
- package/lib/LanguageSelector/index.d.ts +0 -9
- package/lib/LanguageSelector/index.js +0 -13
- package/lib/Logo/Logo.d.ts +0 -20
- package/lib/Logo/Logo.js +0 -58
- package/lib/Logo/SvgLogo.d.ts +0 -14
- package/lib/Logo/SvgLogo.js +0 -62
- package/lib/Logo/index.d.ts +0 -9
- package/lib/Logo/index.js +0 -16
- package/lib/Messages/MessageBanner.d.ts +0 -16
- package/lib/Messages/MessageBanner.js +0 -77
- package/lib/Search/ActiveFilterContent.d.ts +0 -23
- package/lib/Search/ActiveFilterContent.js +0 -47
- package/lib/Search/ActiveFilters.d.ts +0 -19
- package/lib/Search/ActiveFilters.js +0 -119
- package/lib/Search/ContentTypeResult.d.ts +0 -29
- package/lib/Search/ContentTypeResult.js +0 -159
- package/lib/Search/ContentTypeResultStyles.d.ts +0 -45
- package/lib/Search/ContentTypeResultStyles.js +0 -58
- package/lib/Search/IsPathToHighlight.d.ts +0 -8
- package/lib/Search/IsPathToHighlight.js +0 -19
- package/lib/Search/LoadingWrapper.d.ts +0 -12
- package/lib/Search/LoadingWrapper.js +0 -38
- package/lib/Search/SearchField.d.ts +0 -25
- package/lib/Search/SearchField.js +0 -117
- package/lib/Search/SearchFieldForm.d.ts +0 -15
- package/lib/Search/SearchFieldForm.js +0 -41
- package/lib/Search/SearchResult.d.ts +0 -43
- package/lib/Search/SearchResult.js +0 -194
- package/lib/Search/SearchResultSleeve.d.ts +0 -25
- package/lib/Search/SearchResultSleeve.js +0 -237
- package/lib/Search/index.d.ts +0 -11
- package/lib/Search/index.js +0 -33
- package/src/Article/ArticleHeaderWrapper.tsx +0 -38
- package/src/CreatedBy/CreatedBy.stories.tsx +0 -36
- package/src/CreatedBy/CreatedBy.tsx +0 -63
- package/src/CreatedBy/index.ts +0 -11
- package/src/Hero/Hero.stories.tsx +0 -35
- package/src/Hero/Hero.tsx +0 -129
- package/src/Hero/HeroContent.tsx +0 -43
- package/src/Hero/index.ts +0 -21
- package/src/LanguageSelector/LanguageSelector.stories.tsx +0 -44
- package/src/LanguageSelector/LanguageSelector.tsx +0 -101
- package/src/LanguageSelector/index.ts +0 -11
- package/src/Logo/Logo.stories.tsx +0 -47
- package/src/Logo/Logo.tsx +0 -47
- package/src/Logo/SvgLogo.tsx +0 -48
- package/src/Logo/index.ts +0 -11
- package/src/Messages/MessageBanner.stories.tsx +0 -31
- package/src/Messages/MessageBanner.tsx +0 -67
- package/src/Search/ActiveFilterContent.tsx +0 -64
- package/src/Search/ActiveFilters.tsx +0 -145
- package/src/Search/ContentTypeResult.tsx +0 -190
- package/src/Search/ContentTypeResultStyles.tsx +0 -172
- package/src/Search/IsPathToHighlight.ts +0 -12
- package/src/Search/LoadingWrapper.tsx +0 -44
- package/src/Search/SearchField.tsx +0 -175
- package/src/Search/SearchFieldForm.tsx +0 -64
- package/src/Search/SearchResult.tsx +0 -368
- package/src/Search/SearchResultSleeve.tsx +0 -367
- package/src/Search/__tests__/Highlight-test.ts +0 -66
- package/src/Search/index.ts +0 -14
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { Meta, StoryFn } from "@storybook/react";
|
|
10
|
+
import { HeroBackground, HeroContent, Text } from "@ndla/primitives";
|
|
11
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
12
|
+
import { ContentTypeHero } from "./ContentTypeHero";
|
|
13
|
+
import { OneColumn } from "../Layout";
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* A thin wrapper around the `Hero` component that automatically assigns a variant based on the provided content type
|
|
17
|
+
*/
|
|
18
|
+
export default {
|
|
19
|
+
title: "Components/ContentTypeHero",
|
|
20
|
+
component: ContentTypeHero,
|
|
21
|
+
tags: ["autodocs"],
|
|
22
|
+
parameters: {
|
|
23
|
+
inlineStories: true,
|
|
24
|
+
layout: "fullscreen",
|
|
25
|
+
},
|
|
26
|
+
args: {
|
|
27
|
+
contentType: "audio",
|
|
28
|
+
},
|
|
29
|
+
} as Meta<typeof ContentTypeHero>;
|
|
30
|
+
|
|
31
|
+
export const HeroStory: StoryFn<typeof ContentTypeHero> = ({ ...args }) => (
|
|
32
|
+
<ContentTypeHero {...args}>
|
|
33
|
+
<HeroBackground />
|
|
34
|
+
<OneColumn>
|
|
35
|
+
<HeroContent>Hello</HeroContent>
|
|
36
|
+
|
|
37
|
+
<styled.div css={{ background: "surface.default", padding: "medium" }}>
|
|
38
|
+
<Text>
|
|
39
|
+
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam ut orci a lectus pellentesque porta. Integer
|
|
40
|
+
tellus nunc, lobortis non enim quis, interdum porttitor orci. Suspendisse sit amet sapien at dolor venenatis
|
|
41
|
+
malesuada ut ac turpis. Quisque bibendum ultrices urna, nec sodales dui feugiat vel. Proin dapibus dolor ut
|
|
42
|
+
metus dignissim euismod. Aliquam erat volutpat. Donec vestibulum lectus a accumsan aliquet. Maecenas suscipit
|
|
43
|
+
urna vel neque viverra, sit amet viverra orci fermentum. Pellentesque ac lacus malesuada, imperdiet nisi et,
|
|
44
|
+
scelerisque nulla. Phasellus commodo justo et purus fermentum, eu vulputate mauris auctor.
|
|
45
|
+
</Text>
|
|
46
|
+
<Text>
|
|
47
|
+
Nunc sodales placerat ex ac accumsan. Phasellus a mollis lorem. Maecenas in dictum nisl, ut auctor massa. Sed
|
|
48
|
+
vitae ipsum eget mi sodales tristique non sed est. Praesent nec hendrerit massa. In egestas venenatis
|
|
49
|
+
pharetra. Vivamus rutrum magna vel elit malesuada imperdiet. Nunc cursus, metus a tempor auctor, ante nunc
|
|
50
|
+
ornare mauris, ut blandit eros lacus ut massa. Ut eu velit at arcu vestibulum commodo. Pellentesque ac quam
|
|
51
|
+
facilisis, scelerisque augue fermentum, commodo magna. Ut mauris est, fermentum sit amet pretium a, tempor
|
|
52
|
+
mattis dolor. In vitae finibus nibh. In sit amet vestibulum quam. Etiam sed venenatis eros. Fusce massa
|
|
53
|
+
tellus, pharetra ut dui a, vulputate suscipit felis. Phasellus id velit at purus tristique lobortis.
|
|
54
|
+
</Text>
|
|
55
|
+
<Text>
|
|
56
|
+
Duis non tempus tortor, non aliquet turpis. Sed aliquet et tellus non viverra. Nam luctus eros orci, porttitor
|
|
57
|
+
sollicitudin neque placerat sed. Quisque laoreet lorem et augue commodo, nec maximus justo dapibus. Nullam
|
|
58
|
+
condimentum ex leo. Morbi rhoncus tortor quis ex volutpat, id aliquam arcu eleifend. Interdum et malesuada
|
|
59
|
+
fames ac ante ipsum primis in faucibus. Pellentesque neque justo, rhoncus a nisi in, pretium dapibus felis. Ut
|
|
60
|
+
convallis est et dui placerat, vitae ultricies eros gravida.
|
|
61
|
+
</Text>
|
|
62
|
+
<Text>
|
|
63
|
+
In metus ex, iaculis ac feugiat eget, dignissim in augue. Proin nec ultricies nisi, id elementum ex. Aenean id
|
|
64
|
+
massa quis turpis cursus vulputate. Nam eget turpis iaculis, molestie libero vel, commodo purus. Phasellus
|
|
65
|
+
luctus ipsum in libero venenatis, quis auctor justo fringilla. Donec vel mauris non justo feugiat sodales in
|
|
66
|
+
in orci. Vestibulum fringilla consequat erat. Interdum et malesuada fames ac ante ipsum primis in faucibus.
|
|
67
|
+
Morbi condimentum, justo a dictum venenatis, ante libero gravida enim, et blandit tellus urna ac purus. Nunc
|
|
68
|
+
sed orci sit amet lorem malesuada tincidunt. Duis non dictum leo. Suspendisse eget dui vel risus dictum
|
|
69
|
+
faucibus ac ut mauris. Fusce facilisis at erat a dignissim.
|
|
70
|
+
</Text>
|
|
71
|
+
</styled.div>
|
|
72
|
+
</OneColumn>
|
|
73
|
+
</ContentTypeHero>
|
|
74
|
+
);
|
|
75
|
+
|
|
76
|
+
HeroStory.storyName = "Hero";
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { forwardRef } from "react";
|
|
10
|
+
import { Hero, HeroProps, HeroVariant } from "@ndla/primitives";
|
|
11
|
+
import { ContentType } from "../ContentTypeBadge/ContentTypeBadgeNew";
|
|
12
|
+
import * as contentTypes from "../model/ContentType";
|
|
13
|
+
|
|
14
|
+
// TODO: Figure out what to do with frontpage articles. If anything...
|
|
15
|
+
// Also, verify all of these colors.
|
|
16
|
+
export const contentTypeToHeroMap: Record<ContentType, HeroVariant> = {
|
|
17
|
+
[contentTypes.SUBJECT_MATERIAL]: "primary",
|
|
18
|
+
[contentTypes.TASKS_AND_ACTIVITIES]: "brand2Strong",
|
|
19
|
+
[contentTypes.ASSESSMENT_RESOURCES]: "brand2",
|
|
20
|
+
// This will never happen
|
|
21
|
+
[contentTypes.SUBJECT]: "primary",
|
|
22
|
+
[contentTypes.SOURCE_MATERIAL]: "brand1",
|
|
23
|
+
// This will never happen
|
|
24
|
+
[contentTypes.LEARNING_PATH]: "primary",
|
|
25
|
+
// TODO: This needs a color
|
|
26
|
+
[contentTypes.TOPIC]: "neutral",
|
|
27
|
+
// TODO: This is just taken from thin air.
|
|
28
|
+
[contentTypes.MULTIDISCIPLINARY_TOPIC]: "brand4",
|
|
29
|
+
[contentTypes.CONCEPT]: "brand1Subtle",
|
|
30
|
+
// TODO: No clue what this'll be. Maybe unused?
|
|
31
|
+
[contentTypes.EXTERNAL]: "primary",
|
|
32
|
+
[contentTypes.IMAGE]: "primary",
|
|
33
|
+
[contentTypes.AUDIO]: "primary",
|
|
34
|
+
[contentTypes.PODCAST]: "primary",
|
|
35
|
+
[contentTypes.VIDEO]: "primary",
|
|
36
|
+
[contentTypes.MISSING]: "neutral",
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
export interface ContentTypeHeroProps extends HeroProps {
|
|
40
|
+
contentType: ContentType | undefined;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
export const ContentTypeHero = forwardRef<HTMLDivElement, ContentTypeHeroProps>(
|
|
44
|
+
({ contentType, children, ...props }, ref) => {
|
|
45
|
+
return (
|
|
46
|
+
<Hero
|
|
47
|
+
variant={contentTypeToHeroMap[contentType ?? "missing"] ?? contentTypeToHeroMap["missing"]}
|
|
48
|
+
{...props}
|
|
49
|
+
ref={ref}
|
|
50
|
+
>
|
|
51
|
+
{children}
|
|
52
|
+
</Hero>
|
|
53
|
+
);
|
|
54
|
+
},
|
|
55
|
+
);
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2024-present, NDLA.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
export { ContentTypeHero } from "./ContentTypeHero";
|
|
10
|
+
export type { ContentTypeHeroProps } from "./ContentTypeHero";
|
|
@@ -16,6 +16,12 @@ import { copyTextToClipboard } from "@ndla/util";
|
|
|
16
16
|
|
|
17
17
|
const ContainerDiv = styled.div`
|
|
18
18
|
position: relative;
|
|
19
|
+
&:hover {
|
|
20
|
+
[data-copy-button] {
|
|
21
|
+
opacity: 1;
|
|
22
|
+
cursor: pointer;
|
|
23
|
+
}
|
|
24
|
+
}
|
|
19
25
|
`;
|
|
20
26
|
const IconButton = styled.button`
|
|
21
27
|
position: absolute;
|
|
@@ -33,8 +39,9 @@ const IconButton = styled.button`
|
|
|
33
39
|
height: 30px;
|
|
34
40
|
}
|
|
35
41
|
|
|
36
|
-
|
|
37
|
-
&:focus
|
|
42
|
+
&:focus,
|
|
43
|
+
&:focus-visible,
|
|
44
|
+
&:active {
|
|
38
45
|
cursor: pointer;
|
|
39
46
|
opacity: 1;
|
|
40
47
|
}
|
|
@@ -71,7 +78,7 @@ const CopyParagraphButton = ({ children, copyText, lang }: Props) => {
|
|
|
71
78
|
return (
|
|
72
79
|
<ContainerDiv>
|
|
73
80
|
<Tooltip tooltip={tooltip}>
|
|
74
|
-
<IconButton onClick={onCopyClick} aria-label={`${tooltip}: ${copyText}`}>
|
|
81
|
+
<IconButton data-copy-button="" onClick={onCopyClick} aria-label={`${tooltip}: ${copyText}`}>
|
|
75
82
|
<Link />
|
|
76
83
|
</IconButton>
|
|
77
84
|
</Tooltip>
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { AudioEmbedData, AudioMeta } from "@ndla/types-embed";
|
|
11
11
|
import AudioEmbed from "./AudioEmbed";
|
|
12
|
-
import { ArticleWrapper } from "../Article";
|
|
13
|
-
import
|
|
12
|
+
import { ArticleContent, ArticleWrapper } from "../Article";
|
|
13
|
+
import { OneColumn } from "../Layout";
|
|
14
14
|
|
|
15
15
|
const embedData: AudioEmbedData = {
|
|
16
16
|
resource: "audio",
|
|
@@ -188,12 +188,10 @@ const meta: Meta<typeof AudioEmbed> = {
|
|
|
188
188
|
decorators: [
|
|
189
189
|
(Story) => (
|
|
190
190
|
<OneColumn>
|
|
191
|
-
<ArticleWrapper
|
|
192
|
-
<
|
|
193
|
-
<
|
|
194
|
-
|
|
195
|
-
</section>
|
|
196
|
-
</LayoutItem>
|
|
191
|
+
<ArticleWrapper>
|
|
192
|
+
<ArticleContent>
|
|
193
|
+
<Story />
|
|
194
|
+
</ArticleContent>
|
|
197
195
|
</ArticleWrapper>
|
|
198
196
|
</OneColumn>
|
|
199
197
|
),
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { BrightcoveData, BrightcoveEmbedData, BrightcoveMetaData } from "@ndla/types-embed";
|
|
11
11
|
import BrightcoveEmbed from "./BrightcoveEmbed";
|
|
12
|
-
import { ArticleWrapper } from "../Article";
|
|
13
|
-
import
|
|
12
|
+
import { ArticleContent, ArticleWrapper } from "../Article";
|
|
13
|
+
import { OneColumn } from "../Layout";
|
|
14
14
|
|
|
15
15
|
const embedData: BrightcoveEmbedData = {
|
|
16
16
|
resource: "brightcove",
|
|
@@ -158,12 +158,10 @@ const meta: Meta<typeof BrightcoveEmbed> = {
|
|
|
158
158
|
decorators: [
|
|
159
159
|
(Story) => (
|
|
160
160
|
<OneColumn>
|
|
161
|
-
<ArticleWrapper
|
|
162
|
-
<
|
|
163
|
-
<
|
|
164
|
-
|
|
165
|
-
</section>
|
|
166
|
-
</LayoutItem>
|
|
161
|
+
<ArticleWrapper>
|
|
162
|
+
<ArticleContent>
|
|
163
|
+
<Story />
|
|
164
|
+
</ArticleContent>
|
|
167
165
|
</ArticleWrapper>
|
|
168
166
|
</OneColumn>
|
|
169
167
|
),
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { ConceptData, ConceptEmbedData } from "@ndla/types-embed";
|
|
11
11
|
import { ConceptEmbed } from "./ConceptEmbed";
|
|
12
|
-
import { ArticleWrapper } from "../Article";
|
|
13
|
-
import
|
|
12
|
+
import { ArticleContent, ArticleWrapper } from "../Article";
|
|
13
|
+
import { OneColumn } from "../Layout";
|
|
14
14
|
|
|
15
15
|
const blockEmbedData: ConceptEmbedData = {
|
|
16
16
|
contentId: "35",
|
|
@@ -150,12 +150,10 @@ const meta: Meta<typeof ConceptEmbed> = {
|
|
|
150
150
|
decorators: [
|
|
151
151
|
(Story) => (
|
|
152
152
|
<OneColumn>
|
|
153
|
-
<ArticleWrapper
|
|
154
|
-
<
|
|
155
|
-
<
|
|
156
|
-
|
|
157
|
-
</section>
|
|
158
|
-
</LayoutItem>
|
|
153
|
+
<ArticleWrapper>
|
|
154
|
+
<ArticleContent>
|
|
155
|
+
<Story />
|
|
156
|
+
</ArticleContent>
|
|
159
157
|
</ArticleWrapper>
|
|
160
158
|
</OneColumn>
|
|
161
159
|
),
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { OembedEmbedData, OembedData } from "@ndla/types-embed";
|
|
11
11
|
import ExternalEmbed from "./ExternalEmbed";
|
|
12
|
-
import { ArticleWrapper } from "../Article";
|
|
13
|
-
import
|
|
12
|
+
import { ArticleWrapper, ArticleContent } from "../Article";
|
|
13
|
+
import { OneColumn } from "../Layout";
|
|
14
14
|
|
|
15
15
|
const embedData: OembedEmbedData = {
|
|
16
16
|
resource: "external",
|
|
@@ -56,12 +56,12 @@ const meta: Meta<typeof ExternalEmbed> = {
|
|
|
56
56
|
decorators: [
|
|
57
57
|
(Story) => (
|
|
58
58
|
<OneColumn>
|
|
59
|
-
<ArticleWrapper
|
|
60
|
-
<
|
|
59
|
+
<ArticleWrapper>
|
|
60
|
+
<ArticleContent>
|
|
61
61
|
<section>
|
|
62
62
|
<Story />
|
|
63
63
|
</section>
|
|
64
|
-
</
|
|
64
|
+
</ArticleContent>
|
|
65
65
|
</ArticleWrapper>
|
|
66
66
|
</OneColumn>
|
|
67
67
|
),
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { H5pEmbedData, H5pData } from "@ndla/types-embed";
|
|
11
11
|
import H5pEmbed from "./H5pEmbed";
|
|
12
|
-
import { ArticleWrapper } from "../Article";
|
|
13
|
-
import
|
|
12
|
+
import { ArticleWrapper, ArticleContent } from "../Article";
|
|
13
|
+
import { OneColumn } from "../Layout";
|
|
14
14
|
|
|
15
15
|
const embedData: H5pEmbedData = {
|
|
16
16
|
resource: "h5p",
|
|
@@ -53,12 +53,10 @@ const meta: Meta<typeof H5pEmbed> = {
|
|
|
53
53
|
decorators: [
|
|
54
54
|
(Story) => (
|
|
55
55
|
<OneColumn>
|
|
56
|
-
<ArticleWrapper
|
|
57
|
-
<
|
|
58
|
-
<
|
|
59
|
-
|
|
60
|
-
</section>
|
|
61
|
-
</LayoutItem>
|
|
56
|
+
<ArticleWrapper>
|
|
57
|
+
<ArticleContent>
|
|
58
|
+
<Story />
|
|
59
|
+
</ArticleContent>
|
|
62
60
|
</ArticleWrapper>
|
|
63
61
|
</OneColumn>
|
|
64
62
|
),
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { IframeData, IframeEmbedData } from "@ndla/types-embed";
|
|
11
11
|
import IframeEmbed from "./IframeEmbed";
|
|
12
|
-
import { ArticleWrapper } from "../Article";
|
|
13
|
-
import
|
|
12
|
+
import { ArticleWrapper, ArticleContent } from "../Article";
|
|
13
|
+
import { OneColumn } from "../Layout";
|
|
14
14
|
|
|
15
15
|
const embedData: IframeEmbedData = {
|
|
16
16
|
width: "708px",
|
|
@@ -28,12 +28,10 @@ const meta: Meta<typeof IframeEmbed> = {
|
|
|
28
28
|
decorators: [
|
|
29
29
|
(Story) => (
|
|
30
30
|
<OneColumn>
|
|
31
|
-
<ArticleWrapper
|
|
32
|
-
<
|
|
33
|
-
<
|
|
34
|
-
|
|
35
|
-
</section>
|
|
36
|
-
</LayoutItem>
|
|
31
|
+
<ArticleWrapper>
|
|
32
|
+
<ArticleContent>
|
|
33
|
+
<Story />
|
|
34
|
+
</ArticleContent>
|
|
37
35
|
</ArticleWrapper>
|
|
38
36
|
</OneColumn>
|
|
39
37
|
),
|
|
@@ -14,9 +14,9 @@ import { styled } from "@ndla/styled-system/jsx";
|
|
|
14
14
|
import { IImageMetaInformationV3 } from "@ndla/types-backend/image-api";
|
|
15
15
|
import { ImageEmbedData } from "@ndla/types-embed";
|
|
16
16
|
import ImageEmbed from "./ImageEmbed";
|
|
17
|
-
import { ArticleWrapper } from "../Article";
|
|
17
|
+
import { ArticleWrapper, ArticleContent } from "../Article";
|
|
18
18
|
import { Grid } from "../Grid";
|
|
19
|
-
import
|
|
19
|
+
import { OneColumn } from "../Layout";
|
|
20
20
|
|
|
21
21
|
const embedData: ImageEmbedData = {
|
|
22
22
|
resource: "image",
|
|
@@ -98,12 +98,10 @@ const meta: Meta<typeof ImageEmbed> = {
|
|
|
98
98
|
decorators: [
|
|
99
99
|
(Story) => (
|
|
100
100
|
<OneColumn>
|
|
101
|
-
<ArticleWrapper
|
|
102
|
-
<
|
|
103
|
-
<
|
|
104
|
-
|
|
105
|
-
</section>
|
|
106
|
-
</LayoutItem>
|
|
101
|
+
<ArticleWrapper>
|
|
102
|
+
<ArticleContent>
|
|
103
|
+
<Story />
|
|
104
|
+
</ArticleContent>
|
|
107
105
|
</ArticleWrapper>
|
|
108
106
|
</OneColumn>
|
|
109
107
|
),
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
10
|
import { RelatedContentMetaData } from "@ndla/types-embed";
|
|
11
11
|
import RelatedContentEmbed from "./RelatedContentEmbed";
|
|
12
|
-
import { ArticleWrapper } from "../Article";
|
|
13
|
-
import
|
|
12
|
+
import { ArticleWrapper, ArticleContent } from "../Article";
|
|
13
|
+
import { OneColumn } from "../Layout";
|
|
14
14
|
import RelatedArticleList from "../RelatedArticleList";
|
|
15
15
|
|
|
16
16
|
const filmResourceMeta: RelatedContentMetaData = {
|
|
@@ -368,12 +368,10 @@ const meta: Meta<typeof RelatedContentEmbed> = {
|
|
|
368
368
|
decorators: [
|
|
369
369
|
(Story) => (
|
|
370
370
|
<OneColumn>
|
|
371
|
-
<ArticleWrapper
|
|
372
|
-
<
|
|
373
|
-
<
|
|
374
|
-
|
|
375
|
-
</section>
|
|
376
|
-
</LayoutItem>
|
|
371
|
+
<ArticleWrapper>
|
|
372
|
+
<ArticleContent>
|
|
373
|
+
<Story />
|
|
374
|
+
</ArticleContent>
|
|
377
375
|
</ArticleWrapper>
|
|
378
376
|
</OneColumn>
|
|
379
377
|
),
|
|
@@ -12,10 +12,10 @@ import { UuDisclaimerEmbedData } from "@ndla/types-embed";
|
|
|
12
12
|
import H5pEmbed from "./H5pEmbed";
|
|
13
13
|
import IframeEmbed from "./IframeEmbed";
|
|
14
14
|
import UuDisclaimerEmbed from "./UuDisclaimerEmbed";
|
|
15
|
-
import { ArticleWrapper } from "../Article";
|
|
15
|
+
import { ArticleWrapper, ArticleContent } from "../Article";
|
|
16
16
|
import CopyParagraphButton from "../CopyParagraphButton";
|
|
17
17
|
import FactBox from "../FactBox";
|
|
18
|
-
import
|
|
18
|
+
import { OneColumn } from "../Layout";
|
|
19
19
|
|
|
20
20
|
const embedData: UuDisclaimerEmbedData = {
|
|
21
21
|
resource: "uu-disclaimer",
|
|
@@ -30,12 +30,10 @@ const meta: Meta<typeof UuDisclaimerEmbed> = {
|
|
|
30
30
|
decorators: [
|
|
31
31
|
(Story) => (
|
|
32
32
|
<OneColumn>
|
|
33
|
-
<ArticleWrapper
|
|
34
|
-
<
|
|
35
|
-
<
|
|
36
|
-
|
|
37
|
-
</section>
|
|
38
|
-
</LayoutItem>
|
|
33
|
+
<ArticleWrapper>
|
|
34
|
+
<ArticleContent>
|
|
35
|
+
<Story />
|
|
36
|
+
</ArticleContent>
|
|
39
37
|
</ArticleWrapper>
|
|
40
38
|
</OneColumn>
|
|
41
39
|
),
|
|
@@ -79,7 +79,7 @@ export const FrontpageArticle = ({ article, id, isWide, licenseBox, lang }: Prop
|
|
|
79
79
|
{introduction}
|
|
80
80
|
</Text>
|
|
81
81
|
{content}
|
|
82
|
-
<ArticleByline
|
|
82
|
+
<ArticleByline licenseBox={licenseBox} displayByline={false} />
|
|
83
83
|
</StyledArticle>
|
|
84
84
|
);
|
|
85
85
|
};
|
|
@@ -6,47 +6,31 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
import { HTMLAttributes, ReactNode, useMemo } from "react";
|
|
11
|
-
import { css } from "@emotion/react";
|
|
12
|
-
import { mq, breakpoints } from "@ndla/core";
|
|
9
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
13
10
|
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
return extendCss;
|
|
39
|
-
} else if (layout === "center") {
|
|
40
|
-
return centerCss;
|
|
41
|
-
}
|
|
42
|
-
return undefined;
|
|
43
|
-
}, [layout]);
|
|
44
|
-
|
|
45
|
-
return (
|
|
46
|
-
<section css={style} {...rest}>
|
|
47
|
-
{children}
|
|
48
|
-
</section>
|
|
49
|
-
);
|
|
50
|
-
};
|
|
11
|
+
// TODO: Refactor this. This is a copy of our old layout.
|
|
12
|
+
export const LayoutItem = styled("section", {
|
|
13
|
+
defaultVariants: {
|
|
14
|
+
layout: "center",
|
|
15
|
+
},
|
|
16
|
+
variants: {
|
|
17
|
+
layout: {
|
|
18
|
+
center: {
|
|
19
|
+
position: "relative!",
|
|
20
|
+
width: "83.333%",
|
|
21
|
+
right: "auto !important",
|
|
22
|
+
left: "8.333%",
|
|
23
|
+
},
|
|
24
|
+
extend: {
|
|
25
|
+
tablet: {
|
|
26
|
+
position: "relative!",
|
|
27
|
+
width: "83.333%",
|
|
28
|
+
right: "auto!",
|
|
29
|
+
left: "8.333%",
|
|
30
|
+
},
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
},
|
|
34
|
+
});
|
|
51
35
|
|
|
52
36
|
export default LayoutItem;
|
package/src/Layout/OneColumn.tsx
CHANGED
|
@@ -6,39 +6,39 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
import { ComponentPropsWithoutRef } from "react";
|
|
11
|
-
import { css } from "@emotion/react";
|
|
12
|
-
import styled from "@emotion/styled";
|
|
13
|
-
import { mq, spacing, breakpoints } from "@ndla/core";
|
|
9
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
11
|
+
// TODO: This is a rewrite of our old layout. Refactor this.
|
|
12
|
+
export const OneColumn = styled("div", {
|
|
13
|
+
base: {
|
|
14
|
+
marginLeft: "auto",
|
|
15
|
+
marginRight: "auto",
|
|
16
|
+
width: "100%",
|
|
17
|
+
paddingLeft: "18px",
|
|
18
|
+
paddingRight: "18px",
|
|
19
|
+
mobileWide: {
|
|
20
|
+
paddingLeft: "medium",
|
|
21
|
+
paddingRight: "medium",
|
|
22
|
+
},
|
|
23
|
+
_after: {
|
|
24
|
+
content: '""!',
|
|
25
|
+
display: "block!",
|
|
26
|
+
clear: "both!",
|
|
27
|
+
},
|
|
28
|
+
},
|
|
29
|
+
defaultVariants: {
|
|
30
|
+
wide: false,
|
|
31
|
+
},
|
|
32
|
+
variants: {
|
|
33
|
+
wide: {
|
|
34
|
+
true: {
|
|
35
|
+
maxWidth: "1150px",
|
|
36
|
+
},
|
|
37
|
+
false: {
|
|
38
|
+
maxWidth: "1024px",
|
|
39
|
+
},
|
|
40
|
+
},
|
|
41
|
+
},
|
|
42
|
+
});
|
|
43
43
|
|
|
44
44
|
export default OneColumn;
|
|
@@ -6,30 +6,28 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
import { ComponentPropsWithoutRef } from "react";
|
|
11
|
-
import { css } from "@emotion/react";
|
|
12
|
-
import styled from "@emotion/styled";
|
|
13
|
-
import { colors, mq, breakpoints } from "@ndla/core";
|
|
9
|
+
import { styled } from "@ndla/styled-system/jsx";
|
|
14
10
|
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
11
|
+
// TODO: Refactor this. It's a rewrite of our old layout.
|
|
12
|
+
export const PageContainer = styled("div", {
|
|
13
|
+
base: {
|
|
14
|
+
minHeight: "100vh",
|
|
15
|
+
display: "flex",
|
|
16
|
+
flexDirection: "column",
|
|
17
|
+
},
|
|
18
|
+
defaultVariants: {
|
|
19
|
+
backgroundWide: false,
|
|
20
|
+
},
|
|
21
|
+
variants: {
|
|
22
|
+
backgroundWide: {
|
|
23
|
+
true: {
|
|
24
|
+
tablet: {
|
|
25
|
+
backgroundColor: "#f8f8f8",
|
|
26
|
+
},
|
|
27
|
+
},
|
|
28
|
+
false: {},
|
|
29
|
+
},
|
|
30
|
+
},
|
|
31
|
+
});
|
|
34
32
|
|
|
35
33
|
export default PageContainer;
|