@kitconcept/volto-light-theme 6.0.1 → 7.0.0-alpha.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/.changelog.draft +6 -2
- package/CHANGELOG.md +21 -0
- package/package.json +2 -1
- package/src/components/Blocks/Teaser/DefaultBody.jsx +26 -38
- package/src/components/Summary/DefaultSummary.tsx +24 -0
- package/src/components/Summary/{EventSummary.jsx → EventSummary.tsx} +5 -5
- package/src/components/Summary/{FileSummary.jsx → FileSummary.tsx} +4 -5
- package/src/components/Summary/{NewsItemSummary.jsx → NewsItemSummary.tsx} +5 -5
- package/src/components/Summary/Summary.stories.tsx +121 -0
- package/src/components/Widgets/ObjectList.tsx +2 -1
- package/src/primitives/Card/Card.stories.tsx +251 -0
- package/src/primitives/Card/Card.tsx +143 -0
- package/src/stories/BlockWrapper.tsx +25 -0
- package/src/stories/grid.teaser.stories.tsx +156 -0
- package/src/stories/mocks.ts +504 -0
- package/src/stories/static/black-starry-night.jpg +0 -0
- package/src/stories/static/image-light.jpg +0 -0
- package/src/stories/teaser.stories.tsx +74 -0
- package/src/theme/_bgcolor-blocks-layout.scss +1 -1
- package/src/theme/_insets.scss +25 -0
- package/src/theme/_layout.scss +30 -1
- package/src/theme/blocks/_grid.scss +14 -1
- package/src/theme/blocks/_teaser.scss +15 -2
- package/src/theme/card.scss +168 -0
- package/src/theme/main.scss +2 -0
- package/src/components/Summary/DefaultSummary.jsx +0 -16
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
height: 100%;
|
|
15
15
|
|
|
16
16
|
a.external {
|
|
17
|
-
.
|
|
17
|
+
.card-summary h2:after {
|
|
18
18
|
@include external-link-icon();
|
|
19
19
|
}
|
|
20
20
|
}
|
|
@@ -31,6 +31,10 @@
|
|
|
31
31
|
|
|
32
32
|
&.has--align--left,
|
|
33
33
|
&.has--align--right {
|
|
34
|
+
.card-inner {
|
|
35
|
+
padding-bottom: 40px;
|
|
36
|
+
}
|
|
37
|
+
|
|
34
38
|
.teaser-item.default {
|
|
35
39
|
display: flex;
|
|
36
40
|
|
|
@@ -91,7 +95,7 @@
|
|
|
91
95
|
}
|
|
92
96
|
}
|
|
93
97
|
|
|
94
|
-
.
|
|
98
|
+
.card-summary {
|
|
95
99
|
.headline {
|
|
96
100
|
margin-bottom: 20px;
|
|
97
101
|
letter-spacing: 1px;
|
|
@@ -115,11 +119,13 @@
|
|
|
115
119
|
|
|
116
120
|
&.is--last--of--block-type,
|
|
117
121
|
&.next--has--different--backgroundColor {
|
|
122
|
+
.card-inner,
|
|
118
123
|
.teaser-item.default {
|
|
119
124
|
padding-bottom: 0;
|
|
120
125
|
border-bottom: none;
|
|
121
126
|
}
|
|
122
127
|
&.next--is--__button {
|
|
128
|
+
.card-inner,
|
|
123
129
|
.teaser-item.default {
|
|
124
130
|
padding-bottom: 40px;
|
|
125
131
|
border-bottom: 1px solid;
|
|
@@ -128,6 +134,13 @@
|
|
|
128
134
|
}
|
|
129
135
|
}
|
|
130
136
|
|
|
137
|
+
// Only bottom border in render, just for top level teasers
|
|
138
|
+
.blocks-group-wrapper > .block.teaser {
|
|
139
|
+
.card-inner {
|
|
140
|
+
border-bottom: 1px solid var(--theme-foreground-color, $black);
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
|
|
131
144
|
#page-edit .block-editor-teaser.has--backgroundColor--grey {
|
|
132
145
|
background-color: $lightgrey;
|
|
133
146
|
}
|
|
@@ -0,0 +1,168 @@
|
|
|
1
|
+
.card {
|
|
2
|
+
position: relative;
|
|
3
|
+
transition: box-shadow 0.15s ease;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
.card:has(a):hover,
|
|
7
|
+
.card:has(a):focus-within {
|
|
8
|
+
cursor: pointer;
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
.card a {
|
|
12
|
+
inset: 0; /* top:0 right:0 bottom:0 left:0 */
|
|
13
|
+
text-decoration: none; /* remove default underline */
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
.card .card-summary,
|
|
17
|
+
.card .card-summary * {
|
|
18
|
+
user-select: text; /* explicit for clarity */
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
.card {
|
|
22
|
+
.image-wrapper {
|
|
23
|
+
width: 100%;
|
|
24
|
+
|
|
25
|
+
img {
|
|
26
|
+
display: block;
|
|
27
|
+
aspect-ratio: var(--image-aspect-ratio, $aspect-ratio) !important;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
.card-summary {
|
|
32
|
+
padding-top: 40px;
|
|
33
|
+
padding-bottom: 40px;
|
|
34
|
+
|
|
35
|
+
.headline {
|
|
36
|
+
margin-bottom: 20px;
|
|
37
|
+
letter-spacing: 1px;
|
|
38
|
+
text-transform: uppercase;
|
|
39
|
+
@include headtitle1();
|
|
40
|
+
}
|
|
41
|
+
h2 {
|
|
42
|
+
margin-top: 0;
|
|
43
|
+
margin-bottom: 20px;
|
|
44
|
+
@include text-heading-h2();
|
|
45
|
+
@container (max-width: #{$largest-mobile-screen}) {
|
|
46
|
+
@include text-heading-h3();
|
|
47
|
+
margin-bottom: 20px;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
p {
|
|
51
|
+
margin: 0;
|
|
52
|
+
@include body-text();
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
// Variants
|
|
58
|
+
// // Contained
|
|
59
|
+
.card {
|
|
60
|
+
.contained & .card-inner {
|
|
61
|
+
background: var(--theme-high-contrast-color);
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.contained & .card-summary {
|
|
65
|
+
padding-right: 20px;
|
|
66
|
+
padding-left: 20px;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// // Left-aligned
|
|
71
|
+
.card {
|
|
72
|
+
.has--align--left:not(.contained) &,
|
|
73
|
+
.has--align--right:not(.contained) & {
|
|
74
|
+
.card-inner {
|
|
75
|
+
display: flex;
|
|
76
|
+
|
|
77
|
+
.image-wrapper {
|
|
78
|
+
flex: 1 1 50%;
|
|
79
|
+
|
|
80
|
+
@media only screen and (max-width: $largest-mobile-screen) {
|
|
81
|
+
margin-right: 0;
|
|
82
|
+
margin-bottom: 26px;
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
|
|
86
|
+
.card-summary {
|
|
87
|
+
// width: 50%;
|
|
88
|
+
flex: 1 1 50%;
|
|
89
|
+
padding: 0;
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
.has--align--left:not(.contained) & {
|
|
95
|
+
.image-wrapper {
|
|
96
|
+
margin-right: 20px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
|
|
100
|
+
.has--align--right & {
|
|
101
|
+
.card-inner {
|
|
102
|
+
flex-direction: row-reverse;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
.image-wrapper {
|
|
106
|
+
margin-right: 0px;
|
|
107
|
+
margin-left: 20px;
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
@container (max-width: #{$largest-mobile-screen}) {
|
|
113
|
+
.card {
|
|
114
|
+
.has--align--left:not(.contained) &,
|
|
115
|
+
.has--align--right:not(.contained) & {
|
|
116
|
+
.card-inner {
|
|
117
|
+
display: block;
|
|
118
|
+
}
|
|
119
|
+
.image-wrapper {
|
|
120
|
+
margin-right: 0;
|
|
121
|
+
margin-left: 0;
|
|
122
|
+
}
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
// Heading sizes
|
|
128
|
+
@container (min-width: #{$largest-mobile-screen}) {
|
|
129
|
+
.card {
|
|
130
|
+
.card-summary {
|
|
131
|
+
.one & h2 {
|
|
132
|
+
margin-bottom: 40px !important;
|
|
133
|
+
@include text-heading-h2();
|
|
134
|
+
}
|
|
135
|
+
.two & h2,
|
|
136
|
+
.three & h2 {
|
|
137
|
+
@include text-heading-h3();
|
|
138
|
+
}
|
|
139
|
+
.four & h2 {
|
|
140
|
+
@include text-heading-h4();
|
|
141
|
+
}
|
|
142
|
+
}
|
|
143
|
+
}
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
// Listing
|
|
147
|
+
.card {
|
|
148
|
+
.card-listing & .card-inner {
|
|
149
|
+
display: flex;
|
|
150
|
+
|
|
151
|
+
.image-wrapper {
|
|
152
|
+
// width: 50%;
|
|
153
|
+
flex: 0 1 var(--card-listing-image-size, 220px);
|
|
154
|
+
margin-right: 20px;
|
|
155
|
+
|
|
156
|
+
@media only screen and (max-width: $largest-mobile-screen) {
|
|
157
|
+
margin-right: 0;
|
|
158
|
+
margin-bottom: 26px;
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
.card-summary {
|
|
163
|
+
// width: 50%;
|
|
164
|
+
flex: 1 1 50%;
|
|
165
|
+
padding: 0;
|
|
166
|
+
}
|
|
167
|
+
}
|
|
168
|
+
}
|
package/src/theme/main.scss
CHANGED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
const DefaultSummary = (props) => {
|
|
2
|
-
const { item, HeadingTag = 'h3' } = props;
|
|
3
|
-
return (
|
|
4
|
-
<>
|
|
5
|
-
{item?.head_title && <div className="headline">{item.head_title}</div>}
|
|
6
|
-
<HeadingTag className="title">
|
|
7
|
-
{item.title ? item.title : item.id}
|
|
8
|
-
</HeadingTag>
|
|
9
|
-
{!item.hide_description && (
|
|
10
|
-
<p className="description">{item.description}</p>
|
|
11
|
-
)}
|
|
12
|
-
</>
|
|
13
|
-
);
|
|
14
|
-
};
|
|
15
|
-
|
|
16
|
-
export default DefaultSummary;
|