@ndla/ui 50.15.3 → 51.0.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/es/Embed/ImageEmbed.js +4 -3
- package/es/Embed/index.js +1 -1
- package/es/Footer/FooterBlock.js +17 -0
- package/es/Footer/index.js +1 -4
- package/es/Subject/index.js +0 -1
- package/es/index.js +3 -3
- package/es/locale/messages-en.js +2 -1
- package/es/locale/messages-nb.js +2 -1
- package/es/locale/messages-nn.js +2 -1
- package/es/locale/messages-se.js +2 -1
- package/es/locale/messages-sma.js +2 -1
- package/lib/Embed/ImageEmbed.js +4 -3
- package/lib/Embed/index.d.ts +1 -1
- package/lib/Embed/index.js +15 -3
- package/lib/Footer/FooterBlock.d.ts +13 -0
- package/lib/Footer/FooterBlock.js +24 -0
- package/lib/Footer/index.d.ts +1 -4
- package/lib/Footer/index.js +3 -18
- package/lib/Subject/index.d.ts +0 -1
- package/lib/Subject/index.js +0 -7
- package/lib/index.d.ts +3 -3
- package/lib/index.js +14 -20
- package/lib/locale/messages-en.d.ts +1 -0
- package/lib/locale/messages-en.js +2 -1
- package/lib/locale/messages-nb.d.ts +1 -0
- package/lib/locale/messages-nb.js +2 -1
- package/lib/locale/messages-nn.d.ts +1 -0
- package/lib/locale/messages-nn.js +2 -1
- package/lib/locale/messages-se.d.ts +1 -0
- package/lib/locale/messages-se.js +2 -1
- package/lib/locale/messages-sma.d.ts +1 -0
- package/lib/locale/messages-sma.js +2 -1
- package/package.json +2 -2
- package/src/Embed/ImageEmbed.tsx +1 -0
- package/src/Embed/index.ts +1 -1
- package/src/Footer/Footer.stories.tsx +7 -105
- package/src/Footer/FooterBlock.tsx +30 -0
- package/src/Footer/index.ts +1 -5
- package/src/Subject/index.ts +0 -1
- package/src/index.ts +4 -2
- package/src/locale/messages-en.ts +1 -0
- package/src/locale/messages-nb.ts +1 -0
- package/src/locale/messages-nn.ts +1 -0
- package/src/locale/messages-se.ts +1 -0
- package/src/locale/messages-sma.ts +1 -0
- package/es/Footer/EditorName.js +0 -20
- package/es/Footer/Footer.js +0 -83
- package/es/Footer/FooterLinks.js +0 -108
- package/es/Footer/FooterText.js +0 -25
- package/es/Subject/SubjectHeader.js +0 -66
- package/lib/Footer/EditorName.d.ts +0 -13
- package/lib/Footer/EditorName.js +0 -27
- package/lib/Footer/Footer.d.ts +0 -30
- package/lib/Footer/Footer.js +0 -88
- package/lib/Footer/FooterLinks.d.ts +0 -26
- package/lib/Footer/FooterLinks.js +0 -115
- package/lib/Footer/FooterText.d.ts +0 -13
- package/lib/Footer/FooterText.js +0 -33
- package/lib/Subject/SubjectHeader.d.ts +0 -17
- package/lib/Subject/SubjectHeader.js +0 -73
- package/src/Footer/EditorName.tsx +0 -19
- package/src/Footer/Footer.tsx +0 -107
- package/src/Footer/FooterLinks.tsx +0 -144
- package/src/Footer/FooterText.tsx +0 -35
- package/src/Subject/SubjectHeader.tsx +0 -100
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2016-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
|
+
/// <reference types="react" />
|
|
9
|
+
export declare const FooterBlock: import("@emotion/styled").StyledComponent<{
|
|
10
|
+
theme?: import("@emotion/react").Theme | undefined;
|
|
11
|
+
as?: import("react").ElementType<any, keyof import("react").JSX.IntrinsicElements> | undefined;
|
|
12
|
+
}, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
|
|
13
|
+
export default FooterBlock;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.FooterBlock = void 0;
|
|
7
|
+
var _base = _interopRequireDefault(require("@emotion/styled/base"));
|
|
8
|
+
var _core = require("@ndla/core");
|
|
9
|
+
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
10
|
+
/**
|
|
11
|
+
* Copyright (c) 2016-present, NDLA.
|
|
12
|
+
*
|
|
13
|
+
* This source code is licensed under the GPLv3 license found in the
|
|
14
|
+
* LICENSE file in the root directory of this source tree.
|
|
15
|
+
*
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const FooterBlock = exports.FooterBlock = /*#__PURE__*/(0, _base.default)("div", {
|
|
19
|
+
target: "eu3vydv0",
|
|
20
|
+
label: "FooterBlock"
|
|
21
|
+
})("position:relative;display:flex;flex-direction:column;align-items:center;gap:", _core.spacing.large, ";color:", _core.colors.white, ";z-index:", _core.stackOrder.offsetSingle, ";padding:", _core.spacing.large, " ", _core.spacing.large, " ", _core.spacing.xlarge, ";background:", _core.colors.brand.dark, ";", _core.mq.range({
|
|
22
|
+
from: _core.breakpoints.wide
|
|
23
|
+
}), "{padding:", _core.spacing.large, " 170px ", _core.spacing.xlarge, ";}>*{max-width:1100px;}" + (process.env.NODE_ENV === "production" ? "" : "/*# sourceMappingURL=data:application/json;charset=utf-8;base64,eyJ2ZXJzaW9uIjozLCJzb3VyY2VzIjpbIkZvb3RlckJsb2NrLnRzeCJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFXcUMiLCJmaWxlIjoiRm9vdGVyQmxvY2sudHN4Iiwic291cmNlc0NvbnRlbnQiOlsiLyoqXG4gKiBDb3B5cmlnaHQgKGMpIDIwMTYtcHJlc2VudCwgTkRMQS5cbiAqXG4gKiBUaGlzIHNvdXJjZSBjb2RlIGlzIGxpY2Vuc2VkIHVuZGVyIHRoZSBHUEx2MyBsaWNlbnNlIGZvdW5kIGluIHRoZVxuICogTElDRU5TRSBmaWxlIGluIHRoZSByb290IGRpcmVjdG9yeSBvZiB0aGlzIHNvdXJjZSB0cmVlLlxuICpcbiAqL1xuXG5pbXBvcnQgc3R5bGVkIGZyb20gXCJAZW1vdGlvbi9zdHlsZWRcIjtcbmltcG9ydCB7IGJyZWFrcG9pbnRzLCBjb2xvcnMsIG1xLCBzcGFjaW5nLCBzdGFja09yZGVyIH0gZnJvbSBcIkBuZGxhL2NvcmVcIjtcblxuZXhwb3J0IGNvbnN0IEZvb3RlckJsb2NrID0gc3R5bGVkLmRpdmBcbiAgcG9zaXRpb246IHJlbGF0aXZlO1xuICBkaXNwbGF5OiBmbGV4O1xuICBmbGV4LWRpcmVjdGlvbjogY29sdW1uO1xuICBhbGlnbi1pdGVtczogY2VudGVyO1xuICBnYXA6ICR7c3BhY2luZy5sYXJnZX07XG4gIGNvbG9yOiAke2NvbG9ycy53aGl0ZX07XG4gIHotaW5kZXg6ICR7c3RhY2tPcmRlci5vZmZzZXRTaW5nbGV9O1xuICBwYWRkaW5nOiAke3NwYWNpbmcubGFyZ2V9ICR7c3BhY2luZy5sYXJnZX0gJHtzcGFjaW5nLnhsYXJnZX07XG4gIGJhY2tncm91bmQ6ICR7Y29sb3JzLmJyYW5kLmRhcmt9O1xuICAke21xLnJhbmdlKHsgZnJvbTogYnJlYWtwb2ludHMud2lkZSB9KX0ge1xuICAgIHBhZGRpbmc6ICR7c3BhY2luZy5sYXJnZX0gMTcwcHggJHtzcGFjaW5nLnhsYXJnZX07XG4gIH1cbiAgPiAqIHtcbiAgICBtYXgtd2lkdGg6IDExMDBweDtcbiAgfVxuYDtcblxuZXhwb3J0IGRlZmF1bHQgRm9vdGVyQmxvY2s7XG4iXX0= */"));
|
|
24
|
+
var _default = exports.default = FooterBlock;
|
package/lib/Footer/index.d.ts
CHANGED
|
@@ -5,7 +5,4 @@
|
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
|
-
|
|
9
|
-
import Footer from "./Footer";
|
|
10
|
-
import { FooterText } from "./FooterText";
|
|
11
|
-
export { Footer, FooterText, EditorName };
|
|
8
|
+
export { FooterBlock } from "./FooterBlock";
|
package/lib/Footer/index.js
CHANGED
|
@@ -3,25 +3,10 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
Object.defineProperty(exports, "
|
|
6
|
+
Object.defineProperty(exports, "FooterBlock", {
|
|
7
7
|
enumerable: true,
|
|
8
8
|
get: function () {
|
|
9
|
-
return
|
|
9
|
+
return _FooterBlock.FooterBlock;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _Footer.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
Object.defineProperty(exports, "FooterText", {
|
|
19
|
-
enumerable: true,
|
|
20
|
-
get: function () {
|
|
21
|
-
return _FooterText.FooterText;
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
var _EditorName = require("./EditorName");
|
|
25
|
-
var _Footer = _interopRequireDefault(require("./Footer"));
|
|
26
|
-
var _FooterText = require("./FooterText");
|
|
27
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
|
12
|
+
var _FooterBlock = require("./FooterBlock");
|
package/lib/Subject/index.d.ts
CHANGED
package/lib/Subject/index.js
CHANGED
|
@@ -9,12 +9,5 @@ Object.defineProperty(exports, "SubjectBanner", {
|
|
|
9
9
|
return _SubjectBanner.default;
|
|
10
10
|
}
|
|
11
11
|
});
|
|
12
|
-
Object.defineProperty(exports, "SubjectHeader", {
|
|
13
|
-
enumerable: true,
|
|
14
|
-
get: function () {
|
|
15
|
-
return _SubjectHeader.default;
|
|
16
|
-
}
|
|
17
|
-
});
|
|
18
|
-
var _SubjectHeader = _interopRequireDefault(require("./SubjectHeader"));
|
|
19
12
|
var _SubjectBanner = _interopRequireDefault(require("./SubjectBanner"));
|
|
20
13
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { default: obj }; }
|
package/lib/index.d.ts
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export { ExpandableBox, ExpandableBoxSummary } from "./ExpandableBox";
|
|
9
9
|
export { default as FramedContent } from "./FramedContent";
|
|
10
|
-
export { ConceptNotionV2, ImageEmbed, AudioEmbed, H5pEmbed, ExternalEmbed, IframeEmbed, FootnoteEmbed, BrightcoveEmbed, ContentLinkEmbed, RelatedContentEmbed, ConceptEmbed, ConceptListEmbed, UnknownEmbed, InlineConcept, BlockConcept, UuDisclaimerEmbed, CopyrightEmbed, CodeEmbed, } from "./Embed";
|
|
10
|
+
export { ConceptNotionV2, ImageEmbed, getCrop, getFocalPoint, AudioEmbed, H5pEmbed, ExternalEmbed, IframeEmbed, FootnoteEmbed, BrightcoveEmbed, ContentLinkEmbed, RelatedContentEmbed, ConceptEmbed, ConceptListEmbed, UnknownEmbed, InlineConcept, BlockConcept, UuDisclaimerEmbed, CopyrightEmbed, CodeEmbed, } from "./Embed";
|
|
11
11
|
export { LicenseLink } from "./LicenseByline";
|
|
12
12
|
export { ArticleByline, ArticleFootNotes, ArticleIntroduction, ArticleTitle, ArticleWrapper, ArticleHeaderWrapper, default as Article, } from "./Article";
|
|
13
13
|
export { getPossiblyRelativeUrl } from "./utils/relativeUrl";
|
|
@@ -26,7 +26,7 @@ export type { ImageCrop, ImageFocalPoint } from "./Image";
|
|
|
26
26
|
export type { HeroContentType } from "./Hero";
|
|
27
27
|
export { SubjectMaterialHero, TasksAndActivitiesHero, AssessmentResourcesHero, SubjectHero, SourceMaterialHero, Hero, NdlaFilmHero, ConceptHero, HeroContent, } from "./Hero";
|
|
28
28
|
export { FilterButtons, ToggleItem } from "./Filter";
|
|
29
|
-
export {
|
|
29
|
+
export { FooterBlock } from "./Footer";
|
|
30
30
|
export { Figure } from "./Figure";
|
|
31
31
|
export type { FigureType } from "./Figure";
|
|
32
32
|
export { LanguageSelector } from "./LanguageSelector";
|
|
@@ -62,7 +62,7 @@ export { FilmSlideshow, MovieGrid, FilmMovieSearch, FilmMovieList, AllMoviesAlph
|
|
|
62
62
|
export { MediaList, MediaListItem, MediaListItemBody, MediaListItemActions, MediaListItemImage, MediaListItemMeta, } from "./MediaList";
|
|
63
63
|
export type { ItemType } from "./MediaList";
|
|
64
64
|
export { default as ContentTypeBadge, SubjectMaterialBadge, TasksAndActivitiesBadge, AssessmentResourcesBadge, LearningPathBadge, SubjectBadge, SourceMaterialBadge, ConceptBadge, } from "./ContentTypeBadge";
|
|
65
|
-
export {
|
|
65
|
+
export { SubjectBanner } from "./Subject";
|
|
66
66
|
export { default as CopyParagraphButton } from "./CopyParagraphButton";
|
|
67
67
|
export { default as ContentPlaceholder } from "./ContentPlaceholder";
|
|
68
68
|
export { Notion } from "./Notion";
|
package/lib/index.js
CHANGED
|
@@ -255,12 +255,6 @@ Object.defineProperty(exports, "DefinitionTerm", {
|
|
|
255
255
|
return _DefinitionList.DefinitionTerm;
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
|
-
Object.defineProperty(exports, "EditorName", {
|
|
259
|
-
enumerable: true,
|
|
260
|
-
get: function () {
|
|
261
|
-
return _Footer.EditorName;
|
|
262
|
-
}
|
|
263
|
-
});
|
|
264
258
|
Object.defineProperty(exports, "ErrorMessage", {
|
|
265
259
|
enumerable: true,
|
|
266
260
|
get: function () {
|
|
@@ -357,16 +351,10 @@ Object.defineProperty(exports, "FolderInput", {
|
|
|
357
351
|
return _MyNdla.FolderInput;
|
|
358
352
|
}
|
|
359
353
|
});
|
|
360
|
-
Object.defineProperty(exports, "
|
|
361
|
-
enumerable: true,
|
|
362
|
-
get: function () {
|
|
363
|
-
return _Footer.Footer;
|
|
364
|
-
}
|
|
365
|
-
});
|
|
366
|
-
Object.defineProperty(exports, "FooterText", {
|
|
354
|
+
Object.defineProperty(exports, "FooterBlock", {
|
|
367
355
|
enumerable: true,
|
|
368
356
|
get: function () {
|
|
369
|
-
return _Footer.
|
|
357
|
+
return _Footer.FooterBlock;
|
|
370
358
|
}
|
|
371
359
|
});
|
|
372
360
|
Object.defineProperty(exports, "FootnoteEmbed", {
|
|
@@ -855,12 +843,6 @@ Object.defineProperty(exports, "SubjectBanner", {
|
|
|
855
843
|
return _Subject.SubjectBanner;
|
|
856
844
|
}
|
|
857
845
|
});
|
|
858
|
-
Object.defineProperty(exports, "SubjectHeader", {
|
|
859
|
-
enumerable: true,
|
|
860
|
-
get: function () {
|
|
861
|
-
return _Subject.SubjectHeader;
|
|
862
|
-
}
|
|
863
|
-
});
|
|
864
846
|
Object.defineProperty(exports, "SubjectHero", {
|
|
865
847
|
enumerable: true,
|
|
866
848
|
get: function () {
|
|
@@ -969,6 +951,18 @@ Object.defineProperty(exports, "formatNestedMessages", {
|
|
|
969
951
|
return _i18n.formatNestedMessages;
|
|
970
952
|
}
|
|
971
953
|
});
|
|
954
|
+
Object.defineProperty(exports, "getCrop", {
|
|
955
|
+
enumerable: true,
|
|
956
|
+
get: function () {
|
|
957
|
+
return _Embed.getCrop;
|
|
958
|
+
}
|
|
959
|
+
});
|
|
960
|
+
Object.defineProperty(exports, "getFocalPoint", {
|
|
961
|
+
enumerable: true,
|
|
962
|
+
get: function () {
|
|
963
|
+
return _Embed.getFocalPoint;
|
|
964
|
+
}
|
|
965
|
+
});
|
|
972
966
|
Object.defineProperty(exports, "getMastheadHeight", {
|
|
973
967
|
enumerable: true,
|
|
974
968
|
get: function () {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ndla/ui",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "51.0.0",
|
|
4
4
|
"description": "UI component library for NDLA.",
|
|
5
5
|
"license": "GPL-3.0",
|
|
6
6
|
"main": "lib/index.js",
|
|
@@ -82,5 +82,5 @@
|
|
|
82
82
|
"publishConfig": {
|
|
83
83
|
"access": "public"
|
|
84
84
|
},
|
|
85
|
-
"gitHead": "
|
|
85
|
+
"gitHead": "4c02a36e29e56aef17cf835b383799a1898b99e3"
|
|
86
86
|
}
|
package/src/Embed/ImageEmbed.tsx
CHANGED
|
@@ -279,6 +279,7 @@ const ExpandButton = ({ size, expanded, bylineHidden, onExpand, onHideByline }:
|
|
|
279
279
|
<button
|
|
280
280
|
type="button"
|
|
281
281
|
css={figureActionIndicatorStyle}
|
|
282
|
+
data-byline-button=""
|
|
282
283
|
aria-label={t(`license.images.itemImage.zoom${expanded ? "Out" : ""}ImageButtonLabel`)}
|
|
283
284
|
onClick={onExpand}
|
|
284
285
|
>
|
package/src/Embed/index.ts
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
|
-
export { default as ImageEmbed } from "./ImageEmbed";
|
|
9
|
+
export { default as ImageEmbed, getCrop, getFocalPoint } from "./ImageEmbed";
|
|
10
10
|
export { default as AudioEmbed } from "./AudioEmbed";
|
|
11
11
|
export { default as H5pEmbed } from "./H5pEmbed";
|
|
12
12
|
export { default as ExternalEmbed } from "./ExternalEmbed";
|
|
@@ -7,81 +7,12 @@
|
|
|
7
7
|
*/
|
|
8
8
|
|
|
9
9
|
import { Meta, StoryObj } from "@storybook/react";
|
|
10
|
-
import
|
|
11
|
-
import { EditorName } from "./EditorName";
|
|
12
|
-
import Footer from "./Footer";
|
|
13
|
-
import { FooterText } from "./FooterText";
|
|
14
|
-
|
|
15
|
-
const mockCommonLinks = [
|
|
16
|
-
{
|
|
17
|
-
to: "https://ndla.no/about/om-ndla",
|
|
18
|
-
text: "Om NDLA",
|
|
19
|
-
external: false,
|
|
20
|
-
},
|
|
21
|
-
{
|
|
22
|
-
to: "https://ndla.no/about/about-ndla",
|
|
23
|
-
text: "About NDLA",
|
|
24
|
-
external: false,
|
|
25
|
-
},
|
|
26
|
-
{
|
|
27
|
-
to: "https://blogg.ndla.no/",
|
|
28
|
-
text: "NDLA fagblogg",
|
|
29
|
-
external: true,
|
|
30
|
-
},
|
|
31
|
-
];
|
|
32
|
-
|
|
33
|
-
const mockFooterLinks = [
|
|
34
|
-
{
|
|
35
|
-
to: "https://www.facebook.com/ndla.no",
|
|
36
|
-
text: "NDLA på Facebook",
|
|
37
|
-
icon: <Facebook />,
|
|
38
|
-
},
|
|
39
|
-
{
|
|
40
|
-
to: "https://instagram.com/ndla_no/",
|
|
41
|
-
text: "NDLA på Instagram",
|
|
42
|
-
icon: <Instagram />,
|
|
43
|
-
},
|
|
44
|
-
{
|
|
45
|
-
to: "https://www.linkedin.com/company/ndla/",
|
|
46
|
-
text: "NDLA på LinkedIn",
|
|
47
|
-
icon: <LinkedIn />,
|
|
48
|
-
},
|
|
49
|
-
{
|
|
50
|
-
to: "https://www.youtube.com/channel/UCBlt6T8B0mmvDh3k5q7EhsA",
|
|
51
|
-
text: "NDLA på YouTube",
|
|
52
|
-
icon: <Youtube />,
|
|
53
|
-
},
|
|
54
|
-
{
|
|
55
|
-
to: "https://ndla.us6.list-manage.com/subscribe?u=99d41bbb28de0128915adebed&id=9a1d3ad1ea",
|
|
56
|
-
text: "Meld deg på vårt nyhetsbrev",
|
|
57
|
-
icon: <EmailOutline />,
|
|
58
|
-
},
|
|
59
|
-
{
|
|
60
|
-
to: "#",
|
|
61
|
-
text: "Del denne siden",
|
|
62
|
-
icon: <Share />,
|
|
63
|
-
},
|
|
64
|
-
];
|
|
65
|
-
|
|
66
|
-
const privacyLinks = [
|
|
67
|
-
{
|
|
68
|
-
label: "Personvernerklæring",
|
|
69
|
-
url: "https://ndla.no/article/personvernerklaering",
|
|
70
|
-
},
|
|
71
|
-
{
|
|
72
|
-
label: "Erklæring om informasjonskapsler",
|
|
73
|
-
url: "https://ndla.no/article/erklaering-for-informasjonskapsler",
|
|
74
|
-
},
|
|
75
|
-
{
|
|
76
|
-
label: "Tilgjengelighetserklæring",
|
|
77
|
-
url: "https://uustatus.no/nn/erklaringer/publisert/8cefdf3d-3272-402a-907b-689ddfc9bba7",
|
|
78
|
-
},
|
|
79
|
-
];
|
|
10
|
+
import FooterBlock from "./FooterBlock";
|
|
80
11
|
|
|
81
12
|
export default {
|
|
82
|
-
title: "Components/
|
|
13
|
+
title: "Components/FooterBlock",
|
|
83
14
|
tags: ["autodocs"],
|
|
84
|
-
component:
|
|
15
|
+
component: FooterBlock,
|
|
85
16
|
parameters: {
|
|
86
17
|
inlineStories: true,
|
|
87
18
|
},
|
|
@@ -89,10 +20,7 @@ export default {
|
|
|
89
20
|
args: {
|
|
90
21
|
children: (
|
|
91
22
|
<>
|
|
92
|
-
<
|
|
93
|
-
<EditorName title="Ansvarlig redaktør:" name="Sigurd Trageton" />
|
|
94
|
-
</FooterText>
|
|
95
|
-
<FooterText>Nettstedet er utarbeidet av NDLA med åpen kildekode.</FooterText>
|
|
23
|
+
<p>Litt tekst i footer!</p>
|
|
96
24
|
</>
|
|
97
25
|
),
|
|
98
26
|
},
|
|
@@ -101,33 +29,7 @@ export default {
|
|
|
101
29
|
languageSelector: { control: false },
|
|
102
30
|
auth: { control: false },
|
|
103
31
|
},
|
|
104
|
-
render: (args) => <
|
|
105
|
-
} as Meta<typeof
|
|
106
|
-
|
|
107
|
-
export const Default: StoryObj<typeof Footer> = {};
|
|
108
|
-
|
|
109
|
-
export const WithContentAndLinks: StoryObj<typeof Footer> = {
|
|
110
|
-
args: {
|
|
111
|
-
privacyLinks: privacyLinks,
|
|
112
|
-
commonLinks: mockCommonLinks,
|
|
113
|
-
links: mockFooterLinks,
|
|
114
|
-
},
|
|
115
|
-
};
|
|
116
|
-
|
|
117
|
-
export const WithoutContent: StoryObj<typeof Footer> = {
|
|
118
|
-
args: {
|
|
119
|
-
children: undefined,
|
|
120
|
-
commonLinks: mockCommonLinks,
|
|
121
|
-
links: mockFooterLinks,
|
|
122
|
-
privacyLinks: privacyLinks,
|
|
123
|
-
},
|
|
124
|
-
};
|
|
32
|
+
render: (args) => <FooterBlock {...args}></FooterBlock>,
|
|
33
|
+
} as Meta<typeof FooterBlock>;
|
|
125
34
|
|
|
126
|
-
export const
|
|
127
|
-
args: {
|
|
128
|
-
privacyLinks: privacyLinks,
|
|
129
|
-
commonLinks: mockCommonLinks,
|
|
130
|
-
links: mockFooterLinks,
|
|
131
|
-
auth: <div>Auth info can be placed down here</div>,
|
|
132
|
-
},
|
|
133
|
-
};
|
|
35
|
+
export const Default: StoryObj<typeof FooterBlock> = {};
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) 2016-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 styled from "@emotion/styled";
|
|
10
|
+
import { breakpoints, colors, mq, spacing, stackOrder } from "@ndla/core";
|
|
11
|
+
|
|
12
|
+
export const FooterBlock = styled.div`
|
|
13
|
+
position: relative;
|
|
14
|
+
display: flex;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
gap: ${spacing.large};
|
|
18
|
+
color: ${colors.white};
|
|
19
|
+
z-index: ${stackOrder.offsetSingle};
|
|
20
|
+
padding: ${spacing.large} ${spacing.large} ${spacing.xlarge};
|
|
21
|
+
background: ${colors.brand.dark};
|
|
22
|
+
${mq.range({ from: breakpoints.wide })} {
|
|
23
|
+
padding: ${spacing.large} 170px ${spacing.xlarge};
|
|
24
|
+
}
|
|
25
|
+
> * {
|
|
26
|
+
max-width: 1100px;
|
|
27
|
+
}
|
|
28
|
+
`;
|
|
29
|
+
|
|
30
|
+
export default FooterBlock;
|
package/src/Footer/index.ts
CHANGED
package/src/Subject/index.ts
CHANGED
package/src/index.ts
CHANGED
|
@@ -14,6 +14,8 @@ export { default as FramedContent } from "./FramedContent";
|
|
|
14
14
|
export {
|
|
15
15
|
ConceptNotionV2,
|
|
16
16
|
ImageEmbed,
|
|
17
|
+
getCrop,
|
|
18
|
+
getFocalPoint,
|
|
17
19
|
AudioEmbed,
|
|
18
20
|
H5pEmbed,
|
|
19
21
|
ExternalEmbed,
|
|
@@ -84,7 +86,7 @@ export {
|
|
|
84
86
|
|
|
85
87
|
export { FilterButtons, ToggleItem } from "./Filter";
|
|
86
88
|
|
|
87
|
-
export {
|
|
89
|
+
export { FooterBlock } from "./Footer";
|
|
88
90
|
|
|
89
91
|
export { Figure } from "./Figure";
|
|
90
92
|
export type { FigureType } from "./Figure";
|
|
@@ -179,7 +181,7 @@ export {
|
|
|
179
181
|
ConceptBadge,
|
|
180
182
|
} from "./ContentTypeBadge";
|
|
181
183
|
|
|
182
|
-
export {
|
|
184
|
+
export { SubjectBanner } from "./Subject";
|
|
183
185
|
|
|
184
186
|
export { default as CopyParagraphButton } from "./CopyParagraphButton";
|
|
185
187
|
|
package/es/Footer/EditorName.js
DELETED
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "@emotion/react/jsx-runtime";
|
|
2
|
-
/**
|
|
3
|
-
* Copyright (c) 2019-present, NDLA.
|
|
4
|
-
*
|
|
5
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
6
|
-
* LICENSE file in the root directory of this source tree.
|
|
7
|
-
*
|
|
8
|
-
*/
|
|
9
|
-
|
|
10
|
-
export const EditorName = _ref => {
|
|
11
|
-
let {
|
|
12
|
-
title,
|
|
13
|
-
name
|
|
14
|
-
} = _ref;
|
|
15
|
-
return _jsxs("span", {
|
|
16
|
-
children: [_jsx("strong", {
|
|
17
|
-
children: title
|
|
18
|
-
}), " ".concat(name)]
|
|
19
|
-
});
|
|
20
|
-
};
|