@moreonion/foundist 3.0.0 → 3.0.2

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 (31) hide show
  1. package/package.json +2 -2
  2. package/src/html/basic-action-page-cover-1col-with-headline.html +60 -0
  3. package/src/html/basic-action-page-cover-2col-with-headline.html +60 -0
  4. package/src/html/basic-action-page-cover-banner-with-headline.html +60 -0
  5. package/src/html/basic-action-page-with-banner-and-headline.html +60 -0
  6. package/src/html/dev-index.html +8 -0
  7. package/src/html/includes/login-form.html +1 -1
  8. package/src/html/includes/section-1col.html +11 -0
  9. package/src/html/includes/section-2col.html +12 -0
  10. package/src/html/templates/action-page-cover-1col.html +1 -1
  11. package/src/html/templates/action-page-cover-banner.html +4 -3
  12. package/src/html/templates/action-page-reversed.html +1 -1
  13. package/src/html/templates/action-page.html +1 -1
  14. package/src/html/templates/page.html +19 -12
  15. package/src/html/templates/share-page.html +6 -0
  16. package/src/html/thank-you-page-cover-1col-with-headline.html +33 -0
  17. package/src/html/thank-you-page-cover-2col-with-headline.html +37 -0
  18. package/src/html/thank-you-page-cover-banner-with-headline.html +33 -0
  19. package/src/html/thank-you-page-with-banner-and-headline.html +33 -0
  20. package/src/html/thank-you-page.html +1 -1
  21. package/src/js/foundist.js +9 -3
  22. package/src/scss/_util.scss +16 -6
  23. package/src/scss/components/_accordion.scss +4 -6
  24. package/src/scss/components/_bottom-section.scss +117 -0
  25. package/src/scss/components/_headline.scss +118 -0
  26. package/src/scss/layout/_banner.scss +50 -13
  27. package/src/scss/layout/_cover-banner.scss +80 -34
  28. package/src/scss/layout/_cover.scss +127 -46
  29. package/src/scss/layout/_default.scss +9 -3
  30. package/src/scss/layout/_sections.scss +7 -3
  31. package/src/scss/main.scss +2 -0
@@ -8,10 +8,15 @@
8
8
 
9
9
  $cover-background: $fallback-background !default;
10
10
  $cover-content-box-shadow: none !default;
11
- /// A value to subtract from the screen height to place the bottom edge of #top.
12
- $cover-2col-offset: $global-margin * 5 !default;
11
+ /// Minimum distance of #top from #main top when there is a background image.
12
+ $cover-1col-offset: min(66vh, $global-margin * 10) !default;
13
+ $cover-2col-offset: min(55vh, 85vw) !default;
13
14
 
14
15
  @mixin -content-padding {
16
+ @include breakpoint(medium) {
17
+ padding-left: 6vw;
18
+ padding-right: 6vw;
19
+ }
15
20
  @include breakpoint(large) {
16
21
  padding-left: $global-padding * 1.5;
17
22
  padding-right: $global-padding * 1.5;
@@ -23,6 +28,10 @@ $cover-2col-offset: $global-margin * 5 !default;
23
28
  }
24
29
 
25
30
  @mixin -reverse-content-padding {
31
+ @include breakpoint(medium) {
32
+ margin-left: -6vw;
33
+ margin-right: -6vw;
34
+ }
26
35
  @include breakpoint(large) {
27
36
  margin-left: $global-padding * -1.5;
28
37
  margin-right: $global-padding * -1.5;
@@ -33,10 +42,22 @@ $cover-2col-offset: $global-margin * 5 !default;
33
42
  }
34
43
  }
35
44
 
45
+ .inner-wrapper {
46
+ @extend .small-reverse-container-padding;
47
+ @extend .small-add-container-padding;
48
+ }
49
+
36
50
  // Fixed background image.
37
51
  #background {
52
+ position: fixed;
53
+ top: 0;
54
+ right: 0;
55
+ bottom: 0;
56
+ left: 0;
57
+ // Required to keep a constant height in mobile browsers with (dis)appearing menus
58
+ height: 100vh;
59
+
38
60
  width: 100%;
39
- height: 75vw;
40
61
  background: $cover-background;
41
62
  z-index: -1;
42
63
 
@@ -46,21 +67,28 @@ $cover-2col-offset: $global-margin * 5 !default;
46
67
  object-fit: cover;
47
68
  }
48
69
 
49
- @include breakpoint(large) {
50
- position: fixed;
51
- top: 0;
52
- right: 0;
53
- bottom: 0;
54
- left: 0;
55
- // Required to keep a constant height in mobile browsers with (dis)appearing menus
56
- height: 100vh;
57
- }
58
-
59
70
  // Remove title padding
60
71
  ~ #main #page-title {
61
72
  padding-top: 0;
62
73
  }
63
74
 
75
+ // Remove gaps on small screens.
76
+ @include breakpoint(small down) {
77
+ ~ #main {
78
+ padding-bottom: 0;
79
+ }
80
+ @if $cover-1col-offset == 0 {
81
+ #page.cover-1col-layout:not(.with-headline) & {
82
+ display: none;
83
+ }
84
+ }
85
+ @if $cover-2col-offset == 0 {
86
+ #page.cover-2col-layout:not(.with-headline) & {
87
+ display: none;
88
+ }
89
+ }
90
+ }
91
+
64
92
  // Make .narrow smaller a little earlier, halfway between large and xlarge.
65
93
  @include breakpoint((map.get($breakpoints, large) + map.get($breakpoints, xlarge)) * 0.5) {
66
94
  ~ section .grid-container.narrow {
@@ -74,18 +102,16 @@ $cover-2col-offset: $global-margin * 5 !default;
74
102
  // Make sure no sections are transparent.
75
103
  #page.cover-1col-layout,
76
104
  #page.cover-2col-layout {
77
- @include breakpoint(large) {
78
- #highlighted,
79
- #main .inner-wrapper,
80
- #bottom {
81
- background: $body-background;
82
- }
105
+ #highlighted,
106
+ #main .inner-wrapper,
107
+ #bottom {
108
+ background: $body-background;
83
109
  }
84
110
  }
85
111
 
86
112
  // 1 column layout specific.
87
113
  #page.cover-1col-layout {
88
- @include breakpoint(large) {
114
+ @include breakpoint(medium) {
89
115
  // Adjust vertical paddings and margins.
90
116
  #top {
91
117
  padding-bottom: $global-padding * 0.5;
@@ -106,6 +132,9 @@ $cover-2col-offset: $global-margin * 5 !default;
106
132
 
107
133
  // Additional page styles when there is a #background.
108
134
  #background ~ #main {
135
+ // Leave extra space on top.
136
+ margin-top: $cover-1col-offset;
137
+
109
138
  // Add padding.
110
139
  .inner-wrapper,
111
140
  #form-outer,
@@ -116,20 +145,17 @@ $cover-2col-offset: $global-margin * 5 !default;
116
145
  .sticky-cta {
117
146
  @include -reverse-content-padding;
118
147
  }
148
+ #top:first-child {
149
+ padding-top: $global-padding * 1.5;
150
+ }
119
151
 
120
- @include breakpoint(large) {
121
- // Leave extra space on top.
122
- margin-top: $global-margin * 12;
123
-
152
+ @include breakpoint(medium) {
124
153
  // Add box-shadow.
125
154
  .inner-wrapper {
126
155
  box-shadow: $cover-content-box-shadow;
127
156
  }
128
157
 
129
158
  // Add vertical padding.
130
- #top:first-child {
131
- padding-top: $global-padding * 1.5;
132
- }
133
159
  #content:last-child {
134
160
  padding-bottom: $global-padding * 1.5;
135
161
  }
@@ -144,6 +170,12 @@ $cover-2col-offset: $global-margin * 5 !default;
144
170
  }
145
171
 
146
172
  // Adjust form container width to negative margin.
173
+ #form-outer {
174
+ min-width: calc(100% + 12vw);
175
+ }
176
+ }
177
+
178
+ @include breakpoint(large) {
147
179
  #form-outer {
148
180
  min-width: calc(100% + #{$global-padding * 3});
149
181
  }
@@ -155,6 +187,17 @@ $cover-2col-offset: $global-margin * 5 !default;
155
187
  }
156
188
  }
157
189
  }
190
+
191
+ // Additional page styles when there is a #headline.
192
+ &.with-headline {
193
+ #background ~ #main {
194
+ margin-top: 0;
195
+
196
+ .grid-container {
197
+ grid-template-rows: minmax($cover-1col-offset, auto) auto;
198
+ }
199
+ }
200
+ }
158
201
  }
159
202
 
160
203
  // 2 column layout specific.
@@ -170,14 +213,26 @@ $cover-2col-offset: $global-margin * 5 !default;
170
213
  }
171
214
  }
172
215
 
173
- @include breakpoint(large) {
174
- // Adjust grid.
175
- .grid-container.with-sidebar {
176
- grid-template-areas:
177
- "top top top top top sidebar sidebar sidebar sidebar"
178
- "content content content content content sidebar sidebar sidebar sidebar"
179
- "sidebar2 sidebar2 sidebar2 sidebar2 sidebar2 sidebar sidebar sidebar sidebar";
216
+ @include breakpoint(small down) {
217
+ #background ~ #main {
218
+ .inner-wrapper {
219
+ @include clearfix;
220
+ }
221
+ #top .inner-wrapper {
222
+ padding-top: $global-padding * 1.5;
223
+ }
224
+ #sidebar + #sidebar2,
225
+ #content + #sidebar2 {
226
+ margin-top: 0;
227
+
228
+ .inner-wrapper {
229
+ padding-top: 2 * $global-margin;
230
+ }
231
+ }
180
232
  }
233
+ }
234
+
235
+ @include breakpoint(medium) {
181
236
  #main .inner-wrapper {
182
237
  // Vertical padding and margins.
183
238
  padding-top: $global-padding * 1.5;
@@ -210,6 +265,11 @@ $cover-2col-offset: $global-margin * 5 !default;
210
265
  }
211
266
  }
212
267
 
268
+ // Remove gap after form.
269
+ #form-outer {
270
+ margin-bottom: 0;
271
+ }
272
+
213
273
  // Add a gap and optional shadow between content section parts.
214
274
  #content .inner-wrapper,
215
275
  #sidebar .sticky-cta {
@@ -220,6 +280,7 @@ $cover-2col-offset: $global-margin * 5 !default;
220
280
  // Fallback background when there is no #background.
221
281
  #main:before {
222
282
  content: "";
283
+ display: block;
223
284
  position: fixed;
224
285
  top: 0;
225
286
  right: 0;
@@ -228,19 +289,20 @@ $cover-2col-offset: $global-margin * 5 !default;
228
289
  background: $cover-background;
229
290
  z-index: -2;
230
291
  }
292
+ }
231
293
 
232
- // Additional page styles when there is a #background.
233
- #background ~ #main > .grid-container {
234
- // Make the first grid row almost as large as the screen
235
- // (we don’t know how large the #header is, whether there are messages,…).
236
- // ATM stylelint does not recognise pure CSS functions:
237
- // https://github.com/stylelint-scss/stylelint-scss/issues/486
238
- // stylelint-disable scss/no-global-function-names
239
- grid-template-rows: min(calc(100vh - #{$cover-2col-offset}), 125vw) 1fr;
240
- // stylelint-enable scss/no-global-function-names
241
- // Show the top section at the bottom of this row.
242
- #top {
243
- margin-top: auto;
294
+ @include breakpoint(large) {
295
+ // Adjust grid.
296
+ .grid-container.with-sidebar {
297
+ grid-template-areas:
298
+ "head head head head head sidebar sidebar sidebar sidebar"
299
+ "top top top top top sidebar sidebar sidebar sidebar"
300
+ "content content content content content sidebar sidebar sidebar sidebar"
301
+ "sidebar2 sidebar2 sidebar2 sidebar2 sidebar2 sidebar sidebar sidebar sidebar";
302
+ }
303
+ &.with-headline {
304
+ #headline {
305
+ padding-bottom: $global-padding;
244
306
  }
245
307
  }
246
308
  }
@@ -251,4 +313,23 @@ $cover-2col-offset: $global-margin * 5 !default;
251
313
  margin-bottom: $global-margin * 2;
252
314
  }
253
315
  }
316
+
317
+ // Move content down when there is a #background.
318
+ @include breakpoint(medium down) {
319
+ #background ~ #main {
320
+ margin-top: $cover-2col-offset;
321
+ }
322
+ &.with-headline #background ~ #main {
323
+ margin-top: 0;
324
+
325
+ .grid-container {
326
+ grid-template-rows: minmax($cover-2col-offset, auto) auto;
327
+ }
328
+ }
329
+ }
330
+ @include breakpoint(large) {
331
+ #background ~ #main > .grid-container {
332
+ grid-template-rows: minmax($cover-2col-offset, auto) auto 1fr auto;
333
+ }
334
+ }
254
335
  }
@@ -34,8 +34,10 @@ section > .grid-container {
34
34
 
35
35
  // Use a 9 column grid.
36
36
  .grid-container {
37
+ display: grid;
38
+ grid-template-rows: auto;
39
+
37
40
  @include breakpoint(large) {
38
- display: grid;
39
41
  column-gap: $global-margin;
40
42
  grid-template-columns: repeat(9, 1fr);
41
43
 
@@ -64,15 +66,19 @@ section > .grid-container {
64
66
  }
65
67
 
66
68
  // CSS grid for two column layout.
67
- // Assuming #top, #main (left column) and #sidebar (second column).
69
+ // Assuming #headline (optional), #top, #main (left column) and #sidebar (second column).
68
70
  .grid-container.with-sidebar {
69
71
  @include breakpoint(large) {
70
72
  grid-template-areas:
73
+ "head head head head head sidebar sidebar sidebar sidebar"
71
74
  "top top top top top sidebar sidebar sidebar sidebar"
72
75
  "content content content content content sidebar sidebar sidebar sidebar"
73
76
  "content content content content content sidebar2 sidebar2 sidebar2 sidebar2";
74
- grid-template-rows: auto 1fr auto;
77
+ grid-template-rows: auto auto 1fr auto;
75
78
 
79
+ #headline {
80
+ grid-area: head;
81
+ }
76
82
  #top {
77
83
  grid-area: top;
78
84
  }
@@ -9,6 +9,10 @@ body {
9
9
  min-height: 100vh;
10
10
  }
11
11
 
12
+ section {
13
+ @include clearfix;
14
+ }
15
+
12
16
  #header {
13
17
  border-bottom: $header-border;
14
18
  }
@@ -20,11 +24,11 @@ body {
20
24
  }
21
25
 
22
26
  #main {
23
- margin-top: 1.5 * $global-margin;
24
- margin-bottom: 3 * $global-margin;
27
+ padding-top: 1.5 * $global-padding;
28
+ padding-bottom: 3 * $global-padding;
25
29
 
26
30
  @include breakpoint(large) {
27
- margin-top: 2 * $global-margin;
31
+ padding-top: 2 * $global-padding;
28
32
  }
29
33
 
30
34
  @include breakpoint(medium down) {
@@ -106,6 +106,7 @@
106
106
  @import "components/footer";
107
107
  @import "components/menu";
108
108
  @import "components/callout";
109
+ @import "components/headline";
109
110
  @import "components/share-button";
110
111
  @import "components/sticky-button";
111
112
  @import "components/progressbar";
@@ -114,6 +115,7 @@
114
115
  @import "components/card";
115
116
  @import "components/reveal";
116
117
  @import "components/cookiebar";
118
+ @import "components/bottom-section";
117
119
 
118
120
  // --------------------------------------------------------------------------
119
121
  // 7. Utilities