@ndla/ui 41.2.6 → 41.3.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.
Files changed (76) hide show
  1. package/es/Article/index.js +1 -2
  2. package/es/ContentTypeBadge/ContentTypeBadge.js +2 -2
  3. package/es/Embed/ImageEmbed.js +4 -1
  4. package/es/FrontpageArticle/FrontpageArticle.js +78 -0
  5. package/es/FrontpageArticle/index.js +10 -0
  6. package/es/Hero/Hero.js +25 -15
  7. package/es/Hero/HeroContent.js +16 -0
  8. package/es/Hero/index.js +2 -1
  9. package/es/Image/Image.js +42 -35
  10. package/es/Layout/LayoutItem.js +15 -4
  11. package/es/LearningPaths/LearningPathWrapper.js +4 -9
  12. package/es/LicenseByline/EmbedByline.js +11 -6
  13. package/es/all.css +1 -1
  14. package/es/index.js +3 -2
  15. package/es/locale/messages-en.js +1 -1
  16. package/es/locale/messages-nb.js +1 -1
  17. package/es/locale/messages-nn.js +1 -1
  18. package/es/locale/messages-se.js +1 -1
  19. package/es/locale/messages-sma.js +1 -1
  20. package/lib/Article/index.d.ts +1 -2
  21. package/lib/Article/index.js +0 -7
  22. package/lib/ContentTypeBadge/ContentTypeBadge.js +1 -1
  23. package/lib/Embed/ImageEmbed.d.ts +2 -1
  24. package/lib/Embed/ImageEmbed.js +4 -1
  25. package/lib/FrontpageArticle/FrontpageArticle.d.ts +17 -0
  26. package/lib/FrontpageArticle/FrontpageArticle.js +84 -0
  27. package/lib/FrontpageArticle/index.d.ts +9 -0
  28. package/lib/FrontpageArticle/index.js +17 -0
  29. package/lib/Hero/Hero.d.ts +5 -7
  30. package/lib/Hero/Hero.js +25 -17
  31. package/lib/Hero/HeroContent.d.ts +12 -0
  32. package/lib/Hero/HeroContent.js +24 -0
  33. package/lib/Hero/index.d.ts +1 -0
  34. package/lib/Hero/index.js +8 -1
  35. package/lib/Image/Image.d.ts +2 -1
  36. package/lib/Image/Image.js +42 -35
  37. package/lib/Layout/LayoutItem.d.ts +3 -3
  38. package/lib/Layout/LayoutItem.js +16 -6
  39. package/lib/LearningPaths/LearningPathWrapper.js +4 -9
  40. package/lib/LicenseByline/EmbedByline.d.ts +2 -1
  41. package/lib/LicenseByline/EmbedByline.js +11 -6
  42. package/lib/all.css +1 -1
  43. package/lib/index.d.ts +3 -2
  44. package/lib/index.js +13 -6
  45. package/lib/locale/messages-en.js +1 -1
  46. package/lib/locale/messages-nb.js +1 -1
  47. package/lib/locale/messages-nn.js +1 -1
  48. package/lib/locale/messages-se.js +1 -1
  49. package/lib/locale/messages-sma.js +1 -1
  50. package/package.json +3 -3
  51. package/src/Article/index.ts +0 -2
  52. package/src/ContentTypeBadge/ContentTypeBadge.tsx +2 -2
  53. package/src/Embed/ImageEmbed.tsx +4 -1
  54. package/src/FrontpageArticle/FrontpageArticle.tsx +76 -0
  55. package/src/FrontpageArticle/index.ts +11 -0
  56. package/src/Hero/Hero.stories.tsx +38 -0
  57. package/src/Hero/Hero.tsx +94 -22
  58. package/src/Hero/HeroContent.tsx +43 -0
  59. package/src/Hero/index.ts +1 -0
  60. package/src/Image/Image.tsx +29 -19
  61. package/src/Image/__tests__/__snapshots__/Image-test.jsx.snap +73 -0
  62. package/src/Layout/LayoutItem.tsx +8 -4
  63. package/src/LearningPaths/LearningPathWrapper.tsx +6 -20
  64. package/src/LicenseByline/EmbedByline.tsx +15 -4
  65. package/src/index.ts +3 -1
  66. package/src/locale/messages-en.ts +1 -1
  67. package/src/locale/messages-nb.ts +1 -1
  68. package/src/locale/messages-nn.ts +1 -1
  69. package/src/locale/messages-se.ts +1 -1
  70. package/src/locale/messages-sma.ts +1 -1
  71. package/src/main.scss +0 -1
  72. package/es/Article/ArticleSideBar.js +0 -78
  73. package/lib/Article/ArticleSideBar.d.ts +0 -7
  74. package/lib/Article/ArticleSideBar.js +0 -84
  75. package/src/Article/ArticleSideBar.tsx +0 -73
  76. package/src/Hero/component.hero.scss +0 -122
@@ -1,122 +0,0 @@
1
- .c-hero {
2
- background-repeat: repeat;
3
- background-size: 20px;
4
- background-color: $brand-grey--lightest;
5
-
6
- @include mq(tablet) {
7
- min-height: 246px;
8
- padding-bottom: 156px;
9
- }
10
-
11
- &--subject-material {
12
- background-color: $subject-material-light;
13
- }
14
-
15
- &--tasks-and-activities {
16
- background-color: $tasks-and-activities-background;
17
- }
18
-
19
- &--subject {
20
- background-color: $subject-light;
21
- }
22
-
23
- &--assessment-resources {
24
- background-color: $assessment-resource-background;
25
- }
26
-
27
- &--external-learning-resources {
28
- background-color: $external-learning-resource-background;
29
- }
30
-
31
- &--source-material {
32
- background-color: $source-material-light;
33
- }
34
-
35
- &--beta {
36
- background: $brand-color;
37
- }
38
-
39
- &--ndla-film {
40
- background: $film-color;
41
- .c-hero__content {
42
- .c-breadcrumb__item,
43
- .c-breadcrumb__item--home:after,
44
- a, a:focus, a:hover {
45
- color: #fff;
46
- }
47
- }
48
- @include mq(tablet) {
49
- .c-hero__content {
50
- min-height: 90px;
51
- }
52
- height: 2000px;
53
- margin-bottom: -1910px;
54
- }
55
- &.c-hero--has-image {
56
- @include mq(tablet) {
57
- margin-bottom: -1800px;
58
- .c-hero__content {
59
- min-height: 190px;
60
- }
61
- @media (min-height: 720px) {
62
- .c-hero__content {
63
- min-height: 240px;
64
- }
65
- margin-bottom: -1750px;
66
- }
67
- @media (min-height: 1020px) {
68
- .c-hero__content {
69
- min-height: 290px;
70
- }
71
- margin-bottom: -1700px;
72
- }
73
- }
74
- }
75
- @include mq($until: tablet) {
76
- + div article.c-article {
77
- margin-left: -$spacing;
78
- margin-right: -$spacing;
79
- margin-top: 0;
80
- background: #fff;
81
- padding-left: $spacing;
82
- padding-right: $spacing;
83
- padding-top: $spacing--large;
84
- }
85
- }
86
- }
87
- }
88
- .c-hero__background {
89
- position: absolute;
90
- width: 100%;
91
- img {
92
- display: block;
93
- width: 100%;
94
- opacity: 0.4;
95
- max-width: 1460px;
96
- margin: 0 auto;
97
- }
98
- &:after {
99
- content: '';
100
- position: absolute;
101
- display: block;
102
- background-image: linear-gradient(
103
- unquote('#091a2a00'),
104
- unquote('#091a2aff')
105
- );
106
- width: 100%;
107
- height: 100px;
108
- bottom: 0px;
109
- }
110
- }
111
- .c-hero__content {
112
- padding: $spacing--small 0 $spacing--small;
113
- z-index: 9;
114
-
115
- @include mq(tablet) {
116
- min-height: 90px;
117
- padding-bottom: $spacing--small/2;
118
- }
119
- display: flex;
120
- flex-wrap: wrap;
121
- align-items: flex-end;
122
- }