@kitconcept/volto-light-theme 8.0.0-alpha.18 → 8.0.0-alpha.19

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 (32) hide show
  1. package/.changelog.draft +8 -7
  2. package/CHANGELOG.md +14 -0
  3. package/package.json +1 -1
  4. package/src/components/Blocks/EventCalendar/Search/components/EventTemplate.tsx +1 -1
  5. package/src/components/Blocks/Listing/DefaultTemplate.jsx +5 -5
  6. package/src/components/Blocks/Listing/GridTemplate.jsx +9 -6
  7. package/src/components/Blocks/Listing/ListingBody.jsx +1 -1
  8. package/src/components/Blocks/Listing/SummaryTemplate.jsx +9 -6
  9. package/src/components/Blocks/Teaser/DefaultBody.tsx +0 -1
  10. package/src/components/Summary/DefaultSummary.tsx +10 -3
  11. package/src/components/Summary/EventSummary.tsx +10 -3
  12. package/src/components/Summary/FileSummary.tsx +10 -3
  13. package/src/components/Summary/NewsItemSummary.tsx +10 -3
  14. package/src/components/Summary/PersonSummary.tsx +10 -3
  15. package/src/components/Summary/Summary.stories.tsx +46 -30
  16. package/src/primitives/Card/Card.stories.tsx +4 -1
  17. package/src/primitives/Card/Card.test.tsx +11 -33
  18. package/src/primitives/Card/Card.tsx +33 -49
  19. package/src/theme/_bgcolor-blocks-layout.scss +27 -41
  20. package/src/theme/_footer.scss +27 -1
  21. package/src/theme/_header.scss +13 -1
  22. package/src/theme/_layout.scss +6 -10
  23. package/src/theme/_typo-custom.scss +4 -5
  24. package/src/theme/_variables.scss +10 -5
  25. package/src/theme/blocks/_accordion.scss +10 -4
  26. package/src/theme/blocks/_grid.scss +0 -78
  27. package/src/theme/blocks/_listing.scss +54 -130
  28. package/src/theme/blocks/_search.scss +3 -4
  29. package/src/theme/blocks/_table.scss +1 -0
  30. package/src/theme/blocks/_teaser.scss +7 -119
  31. package/src/theme/card.scss +107 -70
  32. package/src/theme/person.scss +7 -1
@@ -15,39 +15,54 @@
15
15
  .block-editor-search,
16
16
  .block.rssBlock,
17
17
  .block-editor-rssBlock {
18
- &.next--has--same--backgroundColor.next--is--same--block-type,
19
- &.next--is--__button {
20
- .listing-item:last-child {
21
- padding-bottom: 40px !important;
22
- border-bottom: 1px solid vas(--theme-font-color, black);
18
+ .items {
19
+ padding: 0;
20
+ margin: 0;
21
+ & + .pagination-wrapper {
22
+ margin-top: $spacing-xlarge;
23
+ @container (max-width: #{$largest-mobile-screen}) {
24
+ margin-top: $spacing-large;
25
+ }
26
+ }
27
+ &:not(:has(+ .pagination-wrapper)) {
28
+ .listing-item:last-child {
29
+ padding-bottom: 0;
30
+ border-bottom: none;
31
+ margin-bottom: 0;
32
+
33
+ .card-inner {
34
+ padding-bottom: 0;
35
+ }
36
+ }
23
37
  }
24
38
  }
25
39
 
26
- .items + .pagination-wrapper {
27
- margin-top: 80px;
28
- @container (max-width: #{$largest-mobile-screen}) {
29
- margin-top: 60px;
40
+ &.next--has--same--backgroundColor.next--is--same--block-type:not(
41
+ :last-child
42
+ ),
43
+ &.next--is--__button {
44
+ .items > .listing-item:last-child {
45
+ border-bottom: 1px solid var(--theme-font-color, black);
46
+ }
47
+ }
48
+ &.next--is--__button {
49
+ margin-bottom: 0 !important;
50
+ .listing-item:last-child {
51
+ padding-bottom: $spacing-medium !important;
30
52
  }
31
53
  }
32
54
 
33
55
  .listing-item {
34
- padding-bottom: 40px !important;
35
56
  border-bottom: 1px solid $black;
36
57
  margin-bottom: 40px;
58
+ .card-summary {
59
+ padding: 0;
37
60
 
38
- a.external + .card-inner {
39
- .listing-body h2:after {
40
- @include external-link-icon();
41
- margin-left: 3px;
61
+ p:empty {
62
+ display: none;
42
63
  }
43
64
  }
44
65
 
45
- &:last-child {
46
- padding-bottom: 0 !important;
47
- border-bottom: none !important;
48
- margin-bottom: 0;
49
- }
50
-
51
66
  img {
52
67
  object-fit: cover;
53
68
  }
@@ -55,44 +70,15 @@
55
70
  .card-inner a {
56
71
  display: inline;
57
72
  }
58
- }
59
-
60
- h2.headline {
61
- @container (max-width: #{$default-container-width + 2 * 20px}) {
62
- margin-right: 20px !important;
63
- margin-left: 20px !important;
64
- }
65
- }
66
-
67
- // Default variation
68
- &.default,
69
- & .default-variation {
70
- .headline {
71
- @include block-title();
72
- }
73
73
 
74
- .listing-item {
75
- .card-summary {
76
- padding-top: unset;
77
- padding-bottom: unset;
78
- }
79
- .headline {
80
- margin-bottom: 20px;
81
- letter-spacing: 1px;
82
- text-transform: uppercase;
83
- @include headtitle1();
84
- }
85
- h2 {
86
- margin-top: 0;
87
- margin-bottom: $spacing-medium;
88
- @include text-heading-h2();
89
- }
90
- p {
91
- margin-bottom: 0;
92
- @include body-text();
93
- }
94
- p:empty {
95
- display: none;
74
+ .title {
75
+ display: block;
76
+ margin-top: 0;
77
+ margin-bottom: $spacing-medium !important;
78
+ @include text-heading-h2();
79
+ @container (max-width: #{$largest-mobile-screen}) {
80
+ @include text-heading-h3();
81
+ margin-bottom: $spacing-small;
96
82
  }
97
83
  }
98
84
  }
@@ -101,44 +87,21 @@
101
87
  &.summary,
102
88
  & .summary-variation {
103
89
  .listing-item {
104
- padding-top: 0 !important;
105
-
106
90
  .card {
107
- width: 100%;
108
91
  .card-inner .image-wrapper {
109
92
  flex: 0 0 220px;
110
93
  img {
94
+ width: 220px;
111
95
  max-width: 100%;
96
+ height: min-content;
97
+ @container (max-width: #{$largest-mobile-screen}) {
98
+ width: 100%;
99
+ min-width: 335px;
100
+ margin-bottom: $spacing-small;
101
+ }
112
102
  }
113
103
  }
114
104
  }
115
-
116
- img {
117
- width: 220px;
118
- height: min-content;
119
- aspect-ratio: var(--image-aspect-ratio, $aspect-ratio) !important;
120
- @container (max-width: #{$largest-mobile-screen}) {
121
- width: 100%;
122
- min-width: 335px;
123
- margin-bottom: 20px;
124
- }
125
- }
126
- .headline {
127
- margin-bottom: 20px;
128
- letter-spacing: 1px;
129
- text-transform: uppercase;
130
- @include headtitle1();
131
- }
132
- h3 {
133
- margin-top: 0 !important;
134
- margin-bottom: 40px !important;
135
- color: $black;
136
- @include text-heading-h2();
137
- @container (max-width: #{$largest-mobile-screen}) {
138
- @include text-heading-h3();
139
- margin-bottom: 20px !important;
140
- }
141
- }
142
105
  }
143
106
  }
144
107
 
@@ -160,15 +123,10 @@
160
123
  flex-direction: column;
161
124
 
162
125
  .listing-item {
163
- padding-bottom: 20px !important;
126
+ padding-bottom: $spacing-small !important;
164
127
  }
165
128
  }
166
129
  }
167
- .headline {
168
- @include block-title();
169
- margin-right: 0 !important;
170
- margin-left: 0 !important;
171
- }
172
130
  .listing-item {
173
131
  align-items: normal;
174
132
  border-bottom: none;
@@ -209,35 +167,16 @@
209
167
  .card-inner {
210
168
  .image-wrapper {
211
169
  img {
212
- width: 100%;
213
170
  margin: 0;
214
- aspect-ratio: var(--image-aspect-ratio, $aspect-ratio) !important;
215
171
  }
216
172
  }
217
173
  .card-summary {
218
- padding: 0 $spacing-small $spacing-medium $spacing-small;
219
- margin-top: $spacing-medium;
220
-
221
- .headline {
222
- padding: 0 !important;
223
- margin-bottom: $spacing-small;
224
- letter-spacing: 1px;
225
- text-transform: uppercase;
226
- @include headtitle1();
227
- @include word-break();
228
- }
174
+ padding: $spacing-medium $spacing-small 0 $spacing-small;
229
175
 
230
- h2 {
231
- margin: 0 0 $spacing-small 0;
176
+ .title {
177
+ margin: 0 0 $spacing-small 0 !important;
232
178
  @include text-heading-h3();
233
179
  }
234
- p {
235
- margin-bottom: 0;
236
- @include body-text();
237
- }
238
- p:empty {
239
- display: none;
240
- }
241
180
  }
242
181
  }
243
182
  }
@@ -460,21 +399,6 @@
460
399
  #page-edit .block-editor-listing.has--backgroundColor--grey,
461
400
  .block.listing.has--backgroundColor--grey {
462
401
  background-color: $lightgrey;
463
-
464
- &.grid {
465
- .listing-item {
466
- .card-container {
467
- background-color: $white;
468
- }
469
- }
470
- }
471
- .block.listing.grid {
472
- .listing-item {
473
- .card-container {
474
- background-color: $white;
475
- }
476
- }
477
- }
478
402
  }
479
403
 
480
404
  .listing-item .headline span:not(:last-child)::after {
@@ -2,11 +2,10 @@
2
2
  #page-add,
3
3
  #page-edit {
4
4
  .block.search {
5
+ &.next--has--same--backgroundColor.next--is--same--block-type {
6
+ margin-bottom: $spacing-xlarge;
7
+ }
5
8
  &.grid {
6
- .card-container > img {
7
- width: 100% !important;
8
- }
9
-
10
9
  .listing-item:last-child {
11
10
  padding-bottom: 0;
12
11
  border-bottom: none;
@@ -13,6 +13,7 @@
13
13
  th {
14
14
  padding: $spacing-small;
15
15
  border-color: #c1c1c1;
16
+ border-bottom: none;
16
17
  background: $darkGrey;
17
18
  color: $white;
18
19
  p {
@@ -1,8 +1,3 @@
1
- // Override the Image component `aspect-ratio`
2
- .teaser-item .image-wrapper img {
3
- aspect-ratio: var(--image-aspect-ratio, $aspect-ratio) !important;
4
- }
5
-
6
1
  // Block Teaser Standalone
7
2
  #page-document .block.teaser {
8
3
  @include vertical-space-teaser();
@@ -19,125 +14,18 @@
19
14
  }
20
15
  }
21
16
 
22
- a.external + .card-inner {
23
- .card-summary h2:after {
24
- @include external-link-icon();
25
- margin-left: 3px;
26
- }
27
- }
28
-
29
- .teaser-item:not(.placeholder) {
30
- align-items: start;
31
- padding-bottom: 40px; // same as vertical spacing in margin-bottom
32
- border-bottom: 1px solid $black;
33
- }
34
-
35
- .image-wrapper {
36
- width: 100%;
37
- }
38
-
39
- &.has--align--left,
40
- &.has--align--right {
41
- .card-inner {
42
- padding-bottom: 40px;
43
- }
44
-
45
- .teaser-item.default {
46
- display: flex;
47
-
48
- .image-wrapper {
49
- align-self: flex-start;
50
- }
51
-
52
- @media only screen and (max-width: $largest-mobile-screen) {
53
- flex-direction: column !important;
54
- }
55
- }
56
- }
57
-
58
- &.has--align--left {
59
- .teaser-item.default {
60
- flex-direction: row;
61
-
62
- .image-wrapper {
63
- margin-right: 20px;
64
-
65
- @media only screen and (max-width: $largest-mobile-screen) {
66
- margin-right: 0;
67
- margin-bottom: 26px;
68
- }
69
- }
70
- }
71
- }
72
-
73
- &.has--align--right {
74
- .teaser-item.default {
75
- flex-direction: row-reverse;
76
-
77
- .image-wrapper {
78
- margin-right: 0px;
79
- margin-left: 20px;
80
-
81
- @media only screen and (max-width: $largest-mobile-screen) {
82
- margin-bottom: 26px;
83
- margin-left: 0;
84
- }
85
- }
86
- }
87
- }
88
-
89
- &.has--align--center {
90
- .teaser-item.default {
91
- display: block;
92
- a {
93
- display: block;
94
- }
95
-
96
- .image-wrapper {
97
- margin-bottom: 26px;
98
- @container (max-width: #{$largest-mobile-screen}) {
99
- margin: 0 0 20px 0 !important;
100
- }
101
- }
102
- }
103
- }
104
-
105
- .card-summary {
106
- .headline {
107
- margin-bottom: 20px;
108
- letter-spacing: 1px;
109
- text-transform: uppercase;
110
- @include headtitle1();
111
- }
112
- h2 {
113
- margin-top: 0;
114
- margin-bottom: 20px;
115
- @include text-heading-h2();
116
- @container (max-width: #{$largest-mobile-screen}) {
117
- @include text-heading-h3();
118
- margin-bottom: 20px;
119
- }
120
- }
121
- p {
122
- margin: 0;
123
- @include body-text();
124
- }
125
- }
126
-
127
17
  &.is--last--of--block-type,
128
18
  &.next--has--different--backgroundColor {
129
- .card-inner,
130
- .teaser-item.default {
19
+ .card-inner {
131
20
  padding-bottom: 0;
132
21
  border-bottom: none;
133
22
  }
134
- &.next--is--__button {
135
- margin-bottom: 0 !important;
136
- .card-inner,
137
- .teaser-item.default {
138
- padding-bottom: 40px;
139
- border-bottom: 1px solid;
140
- }
23
+ }
24
+ &.next--is--__button {
25
+ margin-bottom: 0 !important;
26
+ .card-inner {
27
+ padding-bottom: $spacing-medium;
28
+ border-bottom: 1px solid;
141
29
  }
142
30
  }
143
31
  }
@@ -1,24 +1,27 @@
1
1
  .card {
2
+ // Base
2
3
  position: relative;
4
+ width: 100%;
3
5
  transition: box-shadow 0.15s ease;
4
- }
5
6
 
6
- .card:has(> a):hover,
7
- .card:has(> a):focus-within {
8
- cursor: pointer;
9
- }
7
+ &:has(.card-primary-link) {
8
+ cursor: pointer;
10
9
 
11
- .card a {
12
- inset: 0; /* top:0 right:0 bottom:0 left:0 */
13
- text-decoration: none; /* remove default underline */
14
- }
10
+ // Primary card link stretched via ::after pseudo-element
11
+ .card-summary .card-primary-link {
12
+ color: inherit;
13
+ font: inherit;
15
14
 
16
- .card .card-summary,
17
- .card .card-summary * {
18
- user-select: text; /* explicit for clarity */
19
- }
15
+ &::after {
16
+ position: absolute;
17
+ z-index: 0;
18
+ content: '';
19
+ inset: 0;
20
+ }
21
+ }
22
+ }
20
23
 
21
- .card {
24
+ // Image
22
25
  .image-wrapper {
23
26
  width: 100%;
24
27
 
@@ -30,48 +33,66 @@
30
33
  aspect-ratio: var(--image-aspect-ratio, $aspect-ratio) !important;
31
34
  }
32
35
  }
36
+ &:not(.contained) .card-inner {
37
+ padding-bottom: $spacing-medium;
33
38
 
34
- .card-summary {
35
- padding-top: 40px;
36
- padding-bottom: 40px;
39
+ @container (max-width: #{$largest-mobile-screen}) {
40
+ padding-top: 0;
41
+ }
42
+ }
43
+ .previous--has--different--backgroundColor & .card-inner {
44
+ padding-top: 0;
45
+ }
37
46
 
47
+ // Summary
48
+ :not(.has--align--left, .has--align--right) > & .card-summary {
49
+ padding-top: $spacing-medium;
50
+ }
51
+ .card-summary {
52
+ @container (max-width: #{$largest-mobile-screen}) {
53
+ padding-top: $spacing-small !important;
54
+ }
38
55
  .headline {
39
- margin-bottom: 20px;
56
+ margin-bottom: $spacing-small;
40
57
  letter-spacing: 1px;
41
58
  text-transform: uppercase;
42
59
  @include headtitle1();
43
60
  }
44
- h2 {
61
+
62
+ .title {
45
63
  margin-top: 0;
46
- margin-bottom: 20px;
64
+ margin-bottom: $spacing-small !important; // Override margin from volto
47
65
  @include text-heading-h2();
66
+
48
67
  @container (max-width: #{$largest-mobile-screen}) {
49
68
  @include text-heading-h3();
50
- margin-bottom: 20px;
69
+ margin-bottom: $spacing-small;
51
70
  }
52
71
  }
72
+
53
73
  p {
54
74
  margin: 0;
55
75
  @include body-text();
76
+
77
+ &:empty {
78
+ display: none;
79
+ }
56
80
  }
57
81
  }
58
- }
59
-
60
- // Variants
61
- // // Contained
62
- .card {
63
- .contained & .card-inner {
64
- background: var(--theme-high-contrast-color);
82
+ // Additional links within the card
83
+ a:not(.card-primary-link) {
84
+ position: relative;
85
+ z-index: 1;
86
+ cursor: pointer;
65
87
  }
66
88
 
89
+ // Contained
67
90
  .contained & .card-summary {
68
- padding-right: 20px;
69
- padding-left: 20px;
91
+ padding-right: $spacing-small;
92
+ padding-left: $spacing-small;
70
93
  }
71
- }
72
94
 
73
- // // Side-aligned
74
- .card {
95
+ // Side-aligned
75
96
  .has--align--left:not(.contained) &,
76
97
  .has--align--right:not(.contained) & {
77
98
  .card-inner {
@@ -80,84 +101,60 @@
80
101
  .image-wrapper {
81
102
  flex: 1 1 50%;
82
103
 
83
- @media only screen and (max-width: $largest-mobile-screen) {
84
- margin-right: 0;
85
- margin-bottom: 26px;
104
+ @container (max-width: #{$largest-mobile-screen}) {
105
+ margin: 0;
86
106
  }
87
107
  }
88
108
 
89
109
  .card-summary {
90
- // width: 50%;
91
110
  flex: 1 1 50%;
92
- padding: 0;
111
+ // padding: 0;
93
112
  }
94
113
  }
95
114
  }
96
115
 
97
116
  .has--align--left:not(.contained) & {
98
117
  .image-wrapper {
99
- margin-right: 20px;
118
+ margin-right: $spacing-small;
100
119
  }
101
120
  }
102
121
 
103
- .has--align--right & {
122
+ .has--align--right:not(.contained) & {
104
123
  .card-inner {
105
124
  flex-direction: row-reverse;
106
125
  }
107
126
 
108
127
  .image-wrapper {
109
- margin-right: 0px;
110
- margin-left: 20px;
128
+ margin-right: 0;
129
+ margin-left: $spacing-small;
111
130
  }
112
131
  }
113
- }
114
132
 
115
- @container (max-width: #{$largest-mobile-screen}) {
116
- .card {
133
+ @container (max-width: #{$largest-mobile-screen}) {
117
134
  .has--align--left:not(.contained) &,
118
135
  .has--align--right:not(.contained) & {
119
136
  .card-inner {
120
137
  display: block;
121
138
  }
139
+
122
140
  .image-wrapper {
123
141
  margin-right: 0;
124
142
  margin-left: 0;
125
143
  }
126
144
  }
127
145
  }
128
- }
129
-
130
- // Heading sizes
131
- @container (min-width: #{$largest-mobile-screen}) {
132
- .card {
133
- .card-summary {
134
- .one & h2 {
135
- margin-bottom: 40px !important;
136
- @include text-heading-h2();
137
- }
138
- .two & h2,
139
- .three & h2 {
140
- @include text-heading-h3();
141
- }
142
- .four & h2 {
143
- @include text-heading-h4();
144
- }
145
- }
146
- }
147
- }
148
146
 
149
- // Listing
150
- .card {
147
+ // Listing
151
148
  .card-listing & .card-inner {
152
149
  display: flex;
153
150
 
154
151
  .image-wrapper {
155
152
  flex: 0 1 var(--card-listing-image-size, 220px);
156
- margin-right: 20px;
153
+ margin-right: $spacing-small;
157
154
 
158
- @media only screen and (max-width: $largest-mobile-screen) {
155
+ @container (max-width: #{$largest-mobile-screen}) {
159
156
  margin-right: 0;
160
- margin-bottom: 26px;
157
+ margin-bottom: $spacing-small;
161
158
  }
162
159
  }
163
160
 
@@ -167,3 +164,43 @@
167
164
  }
168
165
  }
169
166
  }
167
+
168
+ // Cards in columns
169
+ @container (min-width: #{$largest-mobile-screen}) {
170
+ .card {
171
+ .card-inner {
172
+ .one & {
173
+ .card-summary {
174
+ padding-top: $spacing-medium;
175
+ }
176
+ .title {
177
+ margin-bottom: $spacing-medium !important; // Override margin from volto
178
+ @include text-heading-h2();
179
+ }
180
+ }
181
+
182
+ .two &,
183
+ .three & {
184
+ .card-summary {
185
+ padding-top: $spacing-medium;
186
+ }
187
+ .title {
188
+ @include text-heading-h3();
189
+ }
190
+ }
191
+
192
+ .four & {
193
+ .card-summary {
194
+ padding-top: $spacing-small;
195
+ }
196
+ padding-bottom: $spacing-small;
197
+ .headline {
198
+ @include headtitle2();
199
+ }
200
+ .title {
201
+ @include text-heading-h4();
202
+ }
203
+ }
204
+ }
205
+ }
206
+ }
@@ -166,11 +166,17 @@ body .block.gridBlock .contained .person-teaser .card-inner {
166
166
  display: flex;
167
167
  align-items: center;
168
168
  margin-bottom: $spacing-small;
169
+ svg {
170
+ margin-right: 0.25em;
171
+ }
169
172
  }
170
173
 
171
174
  .summary-room-phone {
172
175
  display: flex;
173
176
  gap: $spacing-small;
177
+ svg {
178
+ margin-right: 0.25em;
179
+ }
174
180
  }
175
181
 
176
182
  // One person teaser in Grid, edit mode
@@ -214,7 +220,7 @@ body .block.gridBlock .contained .person-teaser .card-inner {
214
220
 
215
221
  img {
216
222
  width: 100%;
217
- height: 100%;
223
+ height: 100% !important;
218
224
  object-fit: cover;
219
225
  object-position: center;
220
226
  }