@ndla/ui 25.0.2 → 25.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/ArticleFavoritesButton.js +2 -1
- package/es/Frontpage/FrontpageHeader.js +7 -5
- package/es/Frontpage/FrontpageProgramMenu.js +12 -10
- package/es/Frontpage/FrontpageSearch.js +5 -3
- package/es/Image/Image.js +5 -4
- package/es/LanguageSelector/LanguageSelector.js +31 -26
- package/es/Masthead/Masthead.js +8 -8
- package/es/Masthead/MastheadAuthModal.js +11 -11
- package/es/Masthead/MastheadSearchModal.js +9 -11
- package/es/NDLAFilm/AboutNdlaFilm.js +3 -3
- package/es/NDLAFilm/FilmSlideshow.js +7 -7
- package/es/NDLAFilm/NavigationArrow.js +4 -4
- package/es/Navigation/NavigationHeading.js +9 -6
- package/es/Navigation/NavigationTopicAbout.js +15 -14
- package/es/Notion/FigureNotion.js +4 -3
- package/es/Notion/NotionVisualElement.js +3 -2
- package/es/Programme/Programme.js +10 -7
- package/es/ResourceGroup/ResourceItem.js +17 -14
- package/es/Search/SearchField.js +4 -3
- package/es/Search/SearchFieldForm.js +4 -3
- package/es/Search/ToggleSearchButton.js +3 -3
- package/es/SectionHeading/SectionHeading.js +4 -3
- package/es/Subject/Subject.js +109 -64
- package/es/Subject/SubjectAbout.js +61 -23
- package/es/Subject/SubjectArchive.js +109 -67
- package/es/Subject/SubjectCarousel.js +39 -62
- package/es/Subject/SubjectHeader.js +55 -25
- package/es/Subject/SubjectLinks.js +30 -16
- package/es/Subject/SubjectNewContent.js +76 -21
- package/es/Subject/SubjectShortcuts.js +39 -24
- package/es/Subject/SubjectSocial.js +20 -18
- package/es/TagSelector/SuggestionInput.js +8 -8
- package/es/Topic/Topic.js +21 -20
- package/es/TopicMenu/TopicMenu.js +22 -13
- package/es/TopicMenu/TopicMenuButton.js +5 -5
- package/es/all.css +1 -1
- package/es/locale/messages-en.js +1 -1
- package/es/locale/messages-nb.js +24 -24
- package/es/locale/messages-nn.js +30 -30
- package/es/locale/messages-se.js +24 -24
- package/es/locale/messages-sma.js +24 -24
- package/lib/Article/ArticleFavoritesButton.js +2 -1
- package/lib/Frontpage/FrontpageHeader.js +7 -5
- package/lib/Frontpage/FrontpageProgramMenu.js +12 -10
- package/lib/Frontpage/FrontpageSearch.js +6 -3
- package/lib/Image/Image.d.ts +1 -1
- package/lib/Image/Image.js +5 -4
- package/lib/LanguageSelector/LanguageSelector.d.ts +1 -1
- package/lib/LanguageSelector/LanguageSelector.js +31 -26
- package/lib/Masthead/Masthead.js +8 -8
- package/lib/Masthead/MastheadAuthModal.js +11 -11
- package/lib/Masthead/MastheadSearchModal.js +9 -11
- package/lib/NDLAFilm/AboutNdlaFilm.js +4 -4
- package/lib/NDLAFilm/FilmSlideshow.js +7 -7
- package/lib/NDLAFilm/NavigationArrow.js +4 -4
- package/lib/Navigation/NavigationHeading.d.ts +2 -1
- package/lib/Navigation/NavigationHeading.js +9 -6
- package/lib/Navigation/NavigationTopicAbout.js +15 -14
- package/lib/Notion/FigureNotion.d.ts +2 -1
- package/lib/Notion/FigureNotion.js +4 -3
- package/lib/Notion/NotionVisualElement.d.ts +1 -0
- package/lib/Notion/NotionVisualElement.js +3 -2
- package/lib/Programme/Programme.d.ts +2 -1
- package/lib/Programme/Programme.js +10 -7
- package/lib/ResourceGroup/ResourceItem.js +17 -14
- package/lib/Search/SearchField.js +4 -3
- package/lib/Search/SearchFieldForm.js +4 -3
- package/lib/Search/ToggleSearchButton.js +3 -3
- package/lib/SectionHeading/SectionHeading.js +4 -3
- package/lib/Subject/Subject.d.ts +30 -82
- package/lib/Subject/Subject.js +90 -62
- package/lib/Subject/SubjectAbout.d.ts +1 -15
- package/lib/Subject/SubjectAbout.js +56 -25
- package/lib/Subject/SubjectArchive.d.ts +0 -21
- package/lib/Subject/SubjectArchive.js +103 -73
- package/lib/Subject/SubjectCarousel.d.ts +1 -31
- package/lib/Subject/SubjectCarousel.js +47 -76
- package/lib/Subject/SubjectHeader.d.ts +1 -14
- package/lib/Subject/SubjectHeader.js +53 -28
- package/lib/Subject/SubjectLinks.d.ts +1 -11
- package/lib/Subject/SubjectLinks.js +29 -19
- package/lib/Subject/SubjectNewContent.d.ts +1 -13
- package/lib/Subject/SubjectNewContent.js +70 -24
- package/lib/Subject/SubjectShortcuts.d.ts +0 -13
- package/lib/Subject/SubjectShortcuts.js +38 -29
- package/lib/Subject/SubjectSocial.d.ts +7 -22
- package/lib/Subject/SubjectSocial.js +19 -21
- package/lib/TagSelector/SuggestionInput.js +8 -8
- package/lib/Topic/Topic.js +21 -20
- package/lib/TopicMenu/TopicMenu.js +47 -39
- package/lib/TopicMenu/TopicMenuButton.js +6 -6
- package/lib/all.css +1 -1
- package/lib/locale/messages-en.js +1 -1
- package/lib/locale/messages-nb.js +24 -24
- package/lib/locale/messages-nn.js +30 -30
- package/lib/locale/messages-se.js +24 -24
- package/lib/locale/messages-sma.js +24 -24
- package/package.json +14 -14
- package/src/Article/ArticleFavoritesButton.tsx +2 -1
- package/src/Frontpage/FrontpageHeader.tsx +1 -1
- package/src/Frontpage/FrontpageProgramMenu.tsx +1 -1
- package/src/Frontpage/FrontpageSearch.tsx +3 -1
- package/src/Image/Image.tsx +1 -1
- package/src/LanguageSelector/LanguageSelector.tsx +21 -23
- package/src/Masthead/Masthead.tsx +2 -0
- package/src/Masthead/MastheadAuthModal.tsx +16 -16
- package/src/Masthead/MastheadSearchModal.tsx +6 -23
- package/src/NDLAFilm/AboutNdlaFilm.tsx +2 -2
- package/src/NDLAFilm/FilmSlideshow.tsx +2 -0
- package/src/NDLAFilm/NavigationArrow.tsx +4 -4
- package/src/Navigation/NavigationHeading.tsx +3 -2
- package/src/Navigation/NavigationTopicAbout.tsx +1 -0
- package/src/Notion/FigureNotion.tsx +5 -2
- package/src/Notion/NotionVisualElement.tsx +2 -0
- package/src/Programme/Programme.tsx +11 -2
- package/src/ResourceGroup/ResourceItem.tsx +12 -3
- package/src/Search/SearchField.tsx +6 -1
- package/src/Search/SearchFieldForm.tsx +1 -1
- package/src/Search/ToggleSearchButton.tsx +2 -2
- package/src/SectionHeading/SectionHeading.tsx +6 -2
- package/src/Subject/Subject.tsx +151 -72
- package/src/Subject/SubjectAbout.tsx +97 -27
- package/src/Subject/SubjectArchive.tsx +129 -58
- package/src/Subject/SubjectCarousel.tsx +42 -36
- package/src/Subject/SubjectHeader.tsx +75 -34
- package/src/Subject/SubjectLinks.tsx +21 -19
- package/src/Subject/SubjectNewContent.tsx +87 -32
- package/src/Subject/SubjectShortcuts.tsx +67 -27
- package/src/Subject/SubjectSocial.tsx +19 -20
- package/src/TagSelector/SuggestionInput.tsx +1 -1
- package/src/Topic/Topic.tsx +1 -0
- package/src/TopicMenu/TopicMenu.jsx +23 -17
- package/src/TopicMenu/TopicMenuButton.jsx +6 -7
- package/src/locale/messages-en.ts +1 -2
- package/src/locale/messages-nb.ts +23 -25
- package/src/locale/messages-nn.ts +29 -30
- package/src/locale/messages-se.ts +23 -24
- package/src/locale/messages-sma.ts +23 -24
- package/src/main.scss +0 -2
- package/es/Article/ArticleAuthorContent.js +0 -71
- package/lib/Article/ArticleAuthorContent.d.ts +0 -28
- package/lib/Article/ArticleAuthorContent.js +0 -88
- package/src/.DS_Store +0 -0
- package/src/Article/ArticleAuthorContent.tsx +0 -107
- package/src/Article/component.article-author-popup.scss +0 -90
- package/src/Subject/component.subject-about.scss +0 -73
- package/src/Subject/component.subject-archive.scss +0 -92
- package/src/Subject/component.subject-carousel.scss +0 -32
- package/src/Subject/component.subject-concepts.scss +0 -37
- package/src/Subject/component.subject-header.scss +0 -87
- package/src/Subject/component.subject-links.scss +0 -14
- package/src/Subject/component.subject-new-content.scss +0 -82
- package/src/Subject/component.subject-shortcut.scss +0 -57
- package/src/Subject/component.subject.scss +0 -213
|
@@ -1,71 +0,0 @@
|
|
|
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
|
-
import React from 'react';
|
|
9
|
-
import BEMHelper from 'react-bem-helper';
|
|
10
|
-
import { useTranslation } from 'react-i18next';
|
|
11
|
-
import Button from '@ndla/button';
|
|
12
|
-
import SafeLink from '@ndla/safelink';
|
|
13
|
-
import Portrait from '../Portrait';
|
|
14
|
-
import { jsx as ___EmotionJSX } from "@emotion/core";
|
|
15
|
-
var classes = new BEMHelper({
|
|
16
|
-
name: 'article-author-popup',
|
|
17
|
-
prefix: 'c-'
|
|
18
|
-
});
|
|
19
|
-
|
|
20
|
-
var ArticleAuthorContent = function ArticleAuthorContent(_ref) {
|
|
21
|
-
var showAuthor = _ref.showAuthor,
|
|
22
|
-
authors = _ref.authors,
|
|
23
|
-
onSelectAuthor = _ref.onSelectAuthor;
|
|
24
|
-
|
|
25
|
-
var _useTranslation = useTranslation(),
|
|
26
|
-
t = _useTranslation.t;
|
|
27
|
-
|
|
28
|
-
if ((showAuthor === null || showAuthor === undefined) && authors.length !== 1) {
|
|
29
|
-
// Render author list
|
|
30
|
-
return ___EmotionJSX("div", null, ___EmotionJSX("h1", null, t('article.multipleAuthorsLabel')), ___EmotionJSX("hr", null), ___EmotionJSX("ul", classes('ul-list'), authors.map(function (author, index) {
|
|
31
|
-
return ___EmotionJSX("li", {
|
|
32
|
-
key: author.name
|
|
33
|
-
}, author.role && ___EmotionJSX("span", null, author.role, ":"), ___EmotionJSX("span", null, author.phone || author.email || author.introduction || author.title ? ___EmotionJSX(Button, {
|
|
34
|
-
type: "button",
|
|
35
|
-
appearance: "link",
|
|
36
|
-
onClick: function onClick() {
|
|
37
|
-
onSelectAuthor(index);
|
|
38
|
-
}
|
|
39
|
-
}, author.name) : author.name), author.licenses && ___EmotionJSX("span", classes('', 'author-licenses'), author.licenses));
|
|
40
|
-
})));
|
|
41
|
-
} // Show author
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
var _authors = authors[showAuthor !== null && showAuthor !== undefined ? showAuthor : 0],
|
|
45
|
-
image = _authors.image,
|
|
46
|
-
name = _authors.name,
|
|
47
|
-
shortName = _authors.shortName,
|
|
48
|
-
title = _authors.title,
|
|
49
|
-
role = _authors.role,
|
|
50
|
-
phone = _authors.phone,
|
|
51
|
-
email = _authors.email,
|
|
52
|
-
introduction = _authors.introduction,
|
|
53
|
-
urlContributions = _authors.urlContributions,
|
|
54
|
-
urlAuthor = _authors.urlAuthor;
|
|
55
|
-
return ___EmotionJSX("div", classes(), ___EmotionJSX("div", classes('author-info'), image && ___EmotionJSX(Portrait, {
|
|
56
|
-
src: image,
|
|
57
|
-
alt: name
|
|
58
|
-
}), ___EmotionJSX("section", null, ___EmotionJSX("h1", null, name), ___EmotionJSX("hr", null), ___EmotionJSX("ul", null, title && ___EmotionJSX("li", null, "".concat(title).concat(title ? ' / ' : '').concat(role)), phone && ___EmotionJSX("li", null, phone), email && ___EmotionJSX("li", null, ___EmotionJSX(SafeLink, {
|
|
59
|
-
to: "mailto:".concat(email)
|
|
60
|
-
}, email))), introduction && ___EmotionJSX("p", null, introduction), ___EmotionJSX("div", classes('link-container'), urlContributions && ___EmotionJSX(SafeLink, {
|
|
61
|
-
to: urlContributions
|
|
62
|
-
}, t('article.urlContributionsLabel', {
|
|
63
|
-
name: shortName
|
|
64
|
-
})), urlAuthor && ___EmotionJSX(SafeLink, {
|
|
65
|
-
to: urlAuthor
|
|
66
|
-
}, t('article.urlAuthorLabel', {
|
|
67
|
-
name: shortName
|
|
68
|
-
}))))));
|
|
69
|
-
};
|
|
70
|
-
|
|
71
|
-
export default ArticleAuthorContent;
|
|
@@ -1,28 +0,0 @@
|
|
|
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
|
-
declare type Author = {
|
|
10
|
-
image: string;
|
|
11
|
-
name: string;
|
|
12
|
-
shortName: string;
|
|
13
|
-
role: string;
|
|
14
|
-
phone: string;
|
|
15
|
-
email: string;
|
|
16
|
-
introduction: string;
|
|
17
|
-
urlContributions: string;
|
|
18
|
-
urlAuthor: string;
|
|
19
|
-
title: string;
|
|
20
|
-
licenses: string[];
|
|
21
|
-
};
|
|
22
|
-
declare type Props = {
|
|
23
|
-
showAuthor: any;
|
|
24
|
-
authors: Array<Author>;
|
|
25
|
-
onSelectAuthor: (index: number) => void;
|
|
26
|
-
};
|
|
27
|
-
declare const ArticleAuthorContent: ({ showAuthor, authors, onSelectAuthor }: Props) => JSX.Element;
|
|
28
|
-
export default ArticleAuthorContent;
|
|
@@ -1,88 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports["default"] = void 0;
|
|
7
|
-
|
|
8
|
-
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
|
-
var _reactBemHelper = _interopRequireDefault(require("react-bem-helper"));
|
|
11
|
-
|
|
12
|
-
var _reactI18next = require("react-i18next");
|
|
13
|
-
|
|
14
|
-
var _button = _interopRequireDefault(require("@ndla/button"));
|
|
15
|
-
|
|
16
|
-
var _safelink = _interopRequireDefault(require("@ndla/safelink"));
|
|
17
|
-
|
|
18
|
-
var _Portrait = _interopRequireDefault(require("../Portrait"));
|
|
19
|
-
|
|
20
|
-
var _core = require("@emotion/core");
|
|
21
|
-
|
|
22
|
-
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
23
|
-
|
|
24
|
-
/**
|
|
25
|
-
* Copyright (c) 2016-present, NDLA.
|
|
26
|
-
*
|
|
27
|
-
* This source code is licensed under the GPLv3 license found in the
|
|
28
|
-
* LICENSE file in the root directory of this source tree.
|
|
29
|
-
*
|
|
30
|
-
*/
|
|
31
|
-
var classes = new _reactBemHelper["default"]({
|
|
32
|
-
name: 'article-author-popup',
|
|
33
|
-
prefix: 'c-'
|
|
34
|
-
});
|
|
35
|
-
|
|
36
|
-
var ArticleAuthorContent = function ArticleAuthorContent(_ref) {
|
|
37
|
-
var showAuthor = _ref.showAuthor,
|
|
38
|
-
authors = _ref.authors,
|
|
39
|
-
onSelectAuthor = _ref.onSelectAuthor;
|
|
40
|
-
|
|
41
|
-
var _useTranslation = (0, _reactI18next.useTranslation)(),
|
|
42
|
-
t = _useTranslation.t;
|
|
43
|
-
|
|
44
|
-
if ((showAuthor === null || showAuthor === undefined) && authors.length !== 1) {
|
|
45
|
-
// Render author list
|
|
46
|
-
return (0, _core.jsx)("div", null, (0, _core.jsx)("h1", null, t('article.multipleAuthorsLabel')), (0, _core.jsx)("hr", null), (0, _core.jsx)("ul", classes('ul-list'), authors.map(function (author, index) {
|
|
47
|
-
return (0, _core.jsx)("li", {
|
|
48
|
-
key: author.name
|
|
49
|
-
}, author.role && (0, _core.jsx)("span", null, author.role, ":"), (0, _core.jsx)("span", null, author.phone || author.email || author.introduction || author.title ? (0, _core.jsx)(_button["default"], {
|
|
50
|
-
type: "button",
|
|
51
|
-
appearance: "link",
|
|
52
|
-
onClick: function onClick() {
|
|
53
|
-
onSelectAuthor(index);
|
|
54
|
-
}
|
|
55
|
-
}, author.name) : author.name), author.licenses && (0, _core.jsx)("span", classes('', 'author-licenses'), author.licenses));
|
|
56
|
-
})));
|
|
57
|
-
} // Show author
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
var _authors = authors[showAuthor !== null && showAuthor !== undefined ? showAuthor : 0],
|
|
61
|
-
image = _authors.image,
|
|
62
|
-
name = _authors.name,
|
|
63
|
-
shortName = _authors.shortName,
|
|
64
|
-
title = _authors.title,
|
|
65
|
-
role = _authors.role,
|
|
66
|
-
phone = _authors.phone,
|
|
67
|
-
email = _authors.email,
|
|
68
|
-
introduction = _authors.introduction,
|
|
69
|
-
urlContributions = _authors.urlContributions,
|
|
70
|
-
urlAuthor = _authors.urlAuthor;
|
|
71
|
-
return (0, _core.jsx)("div", classes(), (0, _core.jsx)("div", classes('author-info'), image && (0, _core.jsx)(_Portrait["default"], {
|
|
72
|
-
src: image,
|
|
73
|
-
alt: name
|
|
74
|
-
}), (0, _core.jsx)("section", null, (0, _core.jsx)("h1", null, name), (0, _core.jsx)("hr", null), (0, _core.jsx)("ul", null, title && (0, _core.jsx)("li", null, "".concat(title).concat(title ? ' / ' : '').concat(role)), phone && (0, _core.jsx)("li", null, phone), email && (0, _core.jsx)("li", null, (0, _core.jsx)(_safelink["default"], {
|
|
75
|
-
to: "mailto:".concat(email)
|
|
76
|
-
}, email))), introduction && (0, _core.jsx)("p", null, introduction), (0, _core.jsx)("div", classes('link-container'), urlContributions && (0, _core.jsx)(_safelink["default"], {
|
|
77
|
-
to: urlContributions
|
|
78
|
-
}, t('article.urlContributionsLabel', {
|
|
79
|
-
name: shortName
|
|
80
|
-
})), urlAuthor && (0, _core.jsx)(_safelink["default"], {
|
|
81
|
-
to: urlAuthor
|
|
82
|
-
}, t('article.urlAuthorLabel', {
|
|
83
|
-
name: shortName
|
|
84
|
-
}))))));
|
|
85
|
-
};
|
|
86
|
-
|
|
87
|
-
var _default = ArticleAuthorContent;
|
|
88
|
-
exports["default"] = _default;
|
package/src/.DS_Store
DELETED
|
Binary file
|
|
@@ -1,107 +0,0 @@
|
|
|
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 React from 'react';
|
|
10
|
-
import BEMHelper from 'react-bem-helper';
|
|
11
|
-
import { useTranslation } from 'react-i18next';
|
|
12
|
-
import Button from '@ndla/button';
|
|
13
|
-
import SafeLink from '@ndla/safelink';
|
|
14
|
-
import Portrait from '../Portrait';
|
|
15
|
-
|
|
16
|
-
const classes = new BEMHelper({
|
|
17
|
-
name: 'article-author-popup',
|
|
18
|
-
prefix: 'c-',
|
|
19
|
-
});
|
|
20
|
-
|
|
21
|
-
type Author = {
|
|
22
|
-
image: string;
|
|
23
|
-
name: string;
|
|
24
|
-
shortName: string;
|
|
25
|
-
role: string;
|
|
26
|
-
phone: string;
|
|
27
|
-
email: string;
|
|
28
|
-
introduction: string;
|
|
29
|
-
urlContributions: string;
|
|
30
|
-
urlAuthor: string;
|
|
31
|
-
title: string;
|
|
32
|
-
licenses: string[];
|
|
33
|
-
};
|
|
34
|
-
|
|
35
|
-
type Props = {
|
|
36
|
-
showAuthor: any;
|
|
37
|
-
authors: Array<Author>;
|
|
38
|
-
onSelectAuthor: (index: number) => void;
|
|
39
|
-
};
|
|
40
|
-
|
|
41
|
-
const ArticleAuthorContent = ({ showAuthor, authors, onSelectAuthor }: Props) => {
|
|
42
|
-
const { t } = useTranslation();
|
|
43
|
-
if ((showAuthor === null || showAuthor === undefined) && authors.length !== 1) {
|
|
44
|
-
// Render author list
|
|
45
|
-
return (
|
|
46
|
-
<div>
|
|
47
|
-
<h1>{t('article.multipleAuthorsLabel')}</h1>
|
|
48
|
-
<hr />
|
|
49
|
-
<ul {...classes('ul-list')}>
|
|
50
|
-
{authors.map((author, index) => (
|
|
51
|
-
<li key={author.name}>
|
|
52
|
-
{author.role && <span>{author.role}:</span>}
|
|
53
|
-
<span>
|
|
54
|
-
{author.phone || author.email || author.introduction || author.title ? (
|
|
55
|
-
<Button
|
|
56
|
-
type="button"
|
|
57
|
-
appearance="link"
|
|
58
|
-
onClick={() => {
|
|
59
|
-
onSelectAuthor(index);
|
|
60
|
-
}}>
|
|
61
|
-
{author.name}
|
|
62
|
-
</Button>
|
|
63
|
-
) : (
|
|
64
|
-
author.name
|
|
65
|
-
)}
|
|
66
|
-
</span>
|
|
67
|
-
{author.licenses && <span {...classes('', 'author-licenses')}>{author.licenses}</span>}
|
|
68
|
-
</li>
|
|
69
|
-
))}
|
|
70
|
-
</ul>
|
|
71
|
-
</div>
|
|
72
|
-
);
|
|
73
|
-
}
|
|
74
|
-
// Show author
|
|
75
|
-
const { image, name, shortName, title, role, phone, email, introduction, urlContributions, urlAuthor } =
|
|
76
|
-
authors[showAuthor !== null && showAuthor !== undefined ? showAuthor : 0];
|
|
77
|
-
|
|
78
|
-
return (
|
|
79
|
-
<div {...classes()}>
|
|
80
|
-
<div {...classes('author-info')}>
|
|
81
|
-
{image && <Portrait src={image} alt={name} />}
|
|
82
|
-
<section>
|
|
83
|
-
<h1>{name}</h1>
|
|
84
|
-
<hr />
|
|
85
|
-
<ul>
|
|
86
|
-
{title && <li>{`${title}${title ? ' / ' : ''}${role}`}</li>}
|
|
87
|
-
{phone && <li>{phone}</li>}
|
|
88
|
-
{email && (
|
|
89
|
-
<li>
|
|
90
|
-
<SafeLink to={`mailto:${email}`}>{email}</SafeLink>
|
|
91
|
-
</li>
|
|
92
|
-
)}
|
|
93
|
-
</ul>
|
|
94
|
-
{introduction && <p>{introduction}</p>}
|
|
95
|
-
<div {...classes('link-container')}>
|
|
96
|
-
{urlContributions && (
|
|
97
|
-
<SafeLink to={urlContributions}>{t('article.urlContributionsLabel', { name: shortName })}</SafeLink>
|
|
98
|
-
)}
|
|
99
|
-
{urlAuthor && <SafeLink to={urlAuthor}>{t('article.urlAuthorLabel', { name: shortName })}</SafeLink>}
|
|
100
|
-
</div>
|
|
101
|
-
</section>
|
|
102
|
-
</div>
|
|
103
|
-
</div>
|
|
104
|
-
);
|
|
105
|
-
};
|
|
106
|
-
|
|
107
|
-
export default ArticleAuthorContent;
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
** ARTICLE AUTHOR POPUP
|
|
3
|
-
**
|
|
4
|
-
** EXAMPLE:
|
|
5
|
-
** <div class="c-article-author-popup">
|
|
6
|
-
** <span class="c-article-author-popup__authors"><svg /> [Opphavsperson].</span>
|
|
7
|
-
** <span class="c-article-author-popup__date"><svg /> Publisert [dato]</span>
|
|
8
|
-
** </div>
|
|
9
|
-
**/
|
|
10
|
-
|
|
11
|
-
.c-article-author-popup {
|
|
12
|
-
|
|
13
|
-
&__ul-list {
|
|
14
|
-
@include font-size(18px, 20px);
|
|
15
|
-
list-style-type: none;
|
|
16
|
-
list-style-image: none;
|
|
17
|
-
margin: $spacing--small 0;
|
|
18
|
-
padding: 0;
|
|
19
|
-
li {
|
|
20
|
-
margin: 0;
|
|
21
|
-
padding: $spacing--small / 2 0;
|
|
22
|
-
span:not(:first-child) {
|
|
23
|
-
padding-left: $spacing--small / 2;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
button {
|
|
27
|
-
font-size: inherit;
|
|
28
|
-
line-height: inherit;
|
|
29
|
-
}
|
|
30
|
-
@include mq($until: tablet) {
|
|
31
|
-
&:not(--large) {
|
|
32
|
-
li {
|
|
33
|
-
line-height: $spacing;
|
|
34
|
-
padding-bottom: $spacing;
|
|
35
|
-
span {
|
|
36
|
-
&:first-child {
|
|
37
|
-
display: block;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
}
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
&--author-licenses {
|
|
46
|
-
@include font-size(14px, 20px);
|
|
47
|
-
color: $brand-grey-dark;
|
|
48
|
-
}
|
|
49
|
-
|
|
50
|
-
ul {
|
|
51
|
-
margin: $spacing--small 0;
|
|
52
|
-
padding: 0;
|
|
53
|
-
list-style: none;
|
|
54
|
-
li {
|
|
55
|
-
margin: 0;
|
|
56
|
-
padding: 0;
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
&__link-container {
|
|
61
|
-
margin-top: $spacing;
|
|
62
|
-
display: flex;
|
|
63
|
-
flex-flow: column;
|
|
64
|
-
align-items: flex-start;
|
|
65
|
-
> a:not(:first-child) {
|
|
66
|
-
margin-top: $spacing--small;
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
|
|
70
|
-
&__author-info {
|
|
71
|
-
display: flex;
|
|
72
|
-
margin-bottom: $spacing;
|
|
73
|
-
animation-name: fadeIn;
|
|
74
|
-
animation-duration: 0.5s;
|
|
75
|
-
|
|
76
|
-
> :nth-child(2) {
|
|
77
|
-
flex-grow: 1;
|
|
78
|
-
padding-left: $spacing;
|
|
79
|
-
}
|
|
80
|
-
|
|
81
|
-
@include mq($until: mobileWide) {
|
|
82
|
-
display: block;
|
|
83
|
-
margin-bottom: 2rem;
|
|
84
|
-
> :nth-child(2) {
|
|
85
|
-
padding-top: $spacing;
|
|
86
|
-
padding-left: 0;
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
}
|
|
@@ -1,73 +0,0 @@
|
|
|
1
|
-
.c-subject-about {
|
|
2
|
-
margin-bottom: $spacing--large;
|
|
3
|
-
|
|
4
|
-
@include mq(tablet) {
|
|
5
|
-
border: 1px solid $brand-grey--light;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
&--fixedWidth {
|
|
9
|
-
max-width: 350px;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
&__media-wrapper {
|
|
13
|
-
width: 100%;
|
|
14
|
-
display: flex;
|
|
15
|
-
justify-content: center;
|
|
16
|
-
align-items: center;
|
|
17
|
-
text-align: center;
|
|
18
|
-
& > *,
|
|
19
|
-
img {
|
|
20
|
-
width: 100%;
|
|
21
|
-
}
|
|
22
|
-
@include mq(tablet) {
|
|
23
|
-
width: 50%;
|
|
24
|
-
min-width: 50%;
|
|
25
|
-
}
|
|
26
|
-
@include mq(desktop) {
|
|
27
|
-
width: 40%;
|
|
28
|
-
min-width: 40%;
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
&--wide {
|
|
33
|
-
margin: 40px 0;
|
|
34
|
-
@include mq(tablet) {
|
|
35
|
-
display: flex;
|
|
36
|
-
margin: 80px 0;
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
|
|
40
|
-
&__content {
|
|
41
|
-
padding: $spacing--small 0 0 0;
|
|
42
|
-
|
|
43
|
-
@include mq(tablet) {
|
|
44
|
-
padding: $spacing;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
&__top-heading {
|
|
49
|
-
margin: 0 0 $spacing--small 0;
|
|
50
|
-
|
|
51
|
-
@include mq(tablet) {
|
|
52
|
-
display: none;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
&__main-heading {
|
|
57
|
-
margin: 0 0 $spacing--small 0;
|
|
58
|
-
@include font-size(14px, 32px);
|
|
59
|
-
text-transform: uppercase;
|
|
60
|
-
font-weight: $font-weight-bold;
|
|
61
|
-
|
|
62
|
-
display: none;
|
|
63
|
-
|
|
64
|
-
@include mq(tablet) {
|
|
65
|
-
display: block;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
&__description {
|
|
70
|
-
margin: 0;
|
|
71
|
-
@include font-size(16px, 26px);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
@@ -1,92 +0,0 @@
|
|
|
1
|
-
.c-subject-archive {
|
|
2
|
-
margin-bottom: $spacing--large;
|
|
3
|
-
display: flex;
|
|
4
|
-
flex-direction: column;
|
|
5
|
-
|
|
6
|
-
@include mq(tablet) {
|
|
7
|
-
border: 1px solid $brand-grey--light;
|
|
8
|
-
}
|
|
9
|
-
|
|
10
|
-
&--fixedWidth {
|
|
11
|
-
max-width: 350px;
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
&--animate {
|
|
15
|
-
.c-subject-archive {
|
|
16
|
-
&__featuring,
|
|
17
|
-
&__archive {
|
|
18
|
-
animation: fadeIn 0.3s ease-in-out;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
}
|
|
22
|
-
|
|
23
|
-
&__media-wrapper {
|
|
24
|
-
width: 100%;
|
|
25
|
-
|
|
26
|
-
& > * {
|
|
27
|
-
width: 100%;
|
|
28
|
-
}
|
|
29
|
-
}
|
|
30
|
-
|
|
31
|
-
&__wrapper {
|
|
32
|
-
// flex: 1 1 auto;
|
|
33
|
-
display: flex;
|
|
34
|
-
flex-flow: column;
|
|
35
|
-
// justify-content: space-between;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
&__content {
|
|
39
|
-
padding: $spacing--small 0 0 0;
|
|
40
|
-
|
|
41
|
-
@include mq(tablet) {
|
|
42
|
-
padding: $spacing;
|
|
43
|
-
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
&__heading {
|
|
47
|
-
@include font-size(20px, 32px);
|
|
48
|
-
margin: 0 0 $spacing--small 0;
|
|
49
|
-
flex: 0 0 auto;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
&__section-heading {
|
|
53
|
-
margin: 0 0 $spacing--small 0;
|
|
54
|
-
@include mq(tablet) {
|
|
55
|
-
@include visually-hidden();
|
|
56
|
-
}
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
&__description {
|
|
60
|
-
margin: 0;
|
|
61
|
-
@include font-size(16px, 26px);
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
&__archive-button {
|
|
65
|
-
display: none;
|
|
66
|
-
@extend .o-text-link;
|
|
67
|
-
margin: $spacing--small 0 0 0;
|
|
68
|
-
padding: $spacing--small/2 0;
|
|
69
|
-
@include mq(tablet) {
|
|
70
|
-
margin: $spacing--small/2 $spacing $spacing;
|
|
71
|
-
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
&__archive {
|
|
75
|
-
padding: 0;
|
|
76
|
-
|
|
77
|
-
@include mq(tablet) {
|
|
78
|
-
padding: $spacing--large $spacing--large 0 $spacing--large;
|
|
79
|
-
}
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
&__archive-articles {
|
|
83
|
-
list-style: none;
|
|
84
|
-
margin: 0;
|
|
85
|
-
padding: 0;
|
|
86
|
-
|
|
87
|
-
li {
|
|
88
|
-
@include font-size(16px, 24px);
|
|
89
|
-
margin-bottom: $spacing--small;
|
|
90
|
-
}
|
|
91
|
-
}
|
|
92
|
-
}
|
|
@@ -1,32 +0,0 @@
|
|
|
1
|
-
.c-subject-carousel {
|
|
2
|
-
margin-bottom: $spacing--large;
|
|
3
|
-
|
|
4
|
-
@include mq(tablet) {
|
|
5
|
-
margin-bottom: $subject-section-padding;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
&__title {
|
|
9
|
-
// margin-left: $spacing !important;
|
|
10
|
-
|
|
11
|
-
@include mq(tablet) {
|
|
12
|
-
margin-left: $spacing--medium !important;
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@include mq(desktop) {
|
|
16
|
-
margin-left: $spacing--large + $spacing--small !important;
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
&--wideScreen {
|
|
21
|
-
display: none;
|
|
22
|
-
@include mq(tablet) {
|
|
23
|
-
display: block;
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
&--narrowScreen {
|
|
28
|
-
@include mq(tablet) {
|
|
29
|
-
display: none;
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
.c-subject-concepts {
|
|
2
|
-
position: relative;
|
|
3
|
-
margin-bottom: $subject-section-padding;
|
|
4
|
-
&__list {
|
|
5
|
-
list-style: none;
|
|
6
|
-
display: flex;
|
|
7
|
-
flex-direction: row;
|
|
8
|
-
border: 1px solid $brand-color--light;
|
|
9
|
-
padding: $spacing;
|
|
10
|
-
margin: 0;
|
|
11
|
-
}
|
|
12
|
-
|
|
13
|
-
&__item {
|
|
14
|
-
flex-grow: 1;
|
|
15
|
-
text-align: center;
|
|
16
|
-
margin: 0;
|
|
17
|
-
position: relative;
|
|
18
|
-
margin-bottom: 0.5em;
|
|
19
|
-
|
|
20
|
-
button {
|
|
21
|
-
background: transparent;
|
|
22
|
-
border-bottom: none;
|
|
23
|
-
|
|
24
|
-
&:hover {
|
|
25
|
-
border-bottom: none;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
.c-concept__link {
|
|
29
|
-
@include inuit-font-size(16px);
|
|
30
|
-
color: $brand-color--dark;
|
|
31
|
-
font-family: $font;
|
|
32
|
-
font-weight: $font-weight-semibold;
|
|
33
|
-
border-bottom-width: 2px;
|
|
34
|
-
}
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
}
|