comand-component-library 4.3.28 → 5.0.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.
- package/dist/comand-component-library.css +1 -1
- package/dist/comand-component-library.js +9587 -9482
- package/dist/styles/demopage-only.css +12 -2
- package/package.json +47 -46
- package/src/ComponentLibrary.vue +2697 -2688
- package/src/assets/data/component-structure.json +1 -1
- package/src/assets/data/form-elements.json +224 -224
- package/src/assets/data/social-networks-page-by-json.json +43 -43
- package/src/assets/styles/component-library-global-styles.scss +296 -295
- package/src/componentSettingsDataAndControls.vue +1 -18
- package/src/components/CmdAccordion.vue +1 -1
- package/src/components/CmdAddressData.vue +6 -1
- package/src/components/CmdAddressDataItem.vue +6 -1
- package/src/components/CmdBasicForm.vue +2 -2
- package/src/components/CmdBox.vue +1103 -1092
- package/src/components/CmdBoxWrapper.vue +7 -1
- package/src/components/CmdBreadcrumbs.vue +2 -2
- package/src/components/CmdCodeOutput.vue +1 -1
- package/src/components/CmdCookieDisclaimer.vue +480 -480
- package/src/components/CmdFakeSelect.vue +930 -916
- package/src/components/CmdFlexibleScrollContainer.vue +42 -42
- package/src/components/CmdForm.vue +481 -481
- package/src/components/CmdFormElement.vue +1110 -1091
- package/src/components/CmdFormFilters.vue +146 -146
- package/src/components/CmdGoogleMaps.vue +1 -1
- package/src/components/CmdHeadline.vue +21 -4
- package/src/components/CmdIcon.vue +8 -2
- package/src/components/CmdImage.vue +14 -16
- package/src/components/CmdImageZoom.vue +9 -8
- package/src/components/CmdInputGroup.vue +436 -435
- package/src/components/CmdLink.vue +1 -1
- package/src/components/CmdList.vue +1 -1
- package/src/components/CmdListOfRequirements.vue +192 -192
- package/src/components/CmdLoginForm.vue +618 -618
- package/src/components/CmdMailToolFilter.vue +217 -217
- package/src/components/CmdMainNavigation.vue +581 -572
- package/src/components/CmdMultistepFormProgressBar.vue +9 -9
- package/src/components/CmdNewsletterSubscription.vue +199 -199
- package/src/components/CmdPagination.vue +4 -2
- package/src/components/CmdParagraph.vue +10 -4
- package/src/components/CmdProgressBar.vue +72 -72
- package/src/components/CmdSiteHeader.vue +382 -389
- package/src/components/CmdSiteSearch.vue +420 -420
- package/src/components/CmdSiteWrapper.vue +12 -5
- package/src/components/CmdSlideshow.vue +519 -519
- package/src/components/CmdSmartSearch.vue +291 -291
- package/src/components/CmdSystemMessage.vue +3 -2
- package/src/components/CmdTable.vue +401 -401
- package/src/components/CmdTabs.vue +262 -262
- package/src/components/CmdTag.vue +1 -1
- package/src/components/CmdTextImageBlock.vue +8 -2
- package/src/components/CmdThumbnailScroller.vue +0 -7
- package/src/components/CmdToggleDarkMode.vue +13 -11
- package/src/components/CmdTooltip.vue +305 -301
- package/src/components/CmdUploadForm.vue +1299 -1305
- package/src/components/CmdWidthLimitationWrapper.vue +1 -1
- package/src/components/EditComponentWrapper.vue +5 -5
- package/src/index.js +5 -0
- package/src/main.js +4 -3
- package/src/utils/template.js +57 -0
- package/src/assets/styles/template.css +0 -1
|
@@ -1,389 +1,382 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<!-- begin CmdSiteHeader ---------------------------------------------------------------------------------------- -->
|
|
3
|
-
<div ref="site-header" :class="[
|
|
4
|
-
'cmd-site-header site-header',
|
|
5
|
-
{
|
|
6
|
-
sticky: sticky,
|
|
7
|
-
'navigation-inline': navigationInline,
|
|
8
|
-
'off-canvas-right': cmdMainNavigation?.offcanvasPosition === 'right'
|
|
9
|
-
}
|
|
10
|
-
]"
|
|
11
|
-
<!-- begin slot for elements above header -->
|
|
12
|
-
<div v-if="$slots.topheader" class="top-header">
|
|
13
|
-
<slot name="topheader"></slot>
|
|
14
|
-
</div>
|
|
15
|
-
<!-- end slot for elements above header -->
|
|
16
|
-
|
|
17
|
-
<!-- begin (inner) header -->
|
|
18
|
-
<header :class="[
|
|
19
|
-
useGrid ? 'grid-container-create-columns' : 'flex-container',
|
|
20
|
-
{ 'has-navigation': (cmdMainNavigation?.navigationEntries?.length && navigationInline) || $slots.navigation }
|
|
21
|
-
]">
|
|
22
|
-
<!-- begin slots for logo and other header elements -->
|
|
23
|
-
<template v-if="$slots.logo || $slots.header || $slots.navigation">
|
|
24
|
-
<slot name="logo"></slot>
|
|
25
|
-
<slot name="header"></slot>
|
|
26
|
-
<slot name="navigation"></slot>
|
|
27
|
-
</template>
|
|
28
|
-
<!-- end slots for logo and other header elements -->
|
|
29
|
-
|
|
30
|
-
<!-- begin content given by data -->
|
|
31
|
-
<template v-if="cmdCompanyLogo || cmdMainNavigation?.navigationEntries?.length">
|
|
32
|
-
<!-- begin CmdCompanyLogo -->
|
|
33
|
-
<CmdCompanyLogo v-if="cmdCompanyLogo" v-bind="cmdCompanyLogo" @image-loaded="onImageLoaded" />
|
|
34
|
-
<!-- end CmdCompanyLogo -->
|
|
35
|
-
|
|
36
|
-
<!-- begin CmdMainNavigation -->
|
|
37
|
-
<CmdMainNavigation v-if="cmdMainNavigation?.navigationEntries?.length && navigationInline"
|
|
38
|
-
v-bind="cmdMainNavigation"
|
|
39
|
-
<!-- end CmdMainNavigation -->
|
|
40
|
-
</template>
|
|
41
|
-
<!-- end content given by data -->
|
|
42
|
-
</header>
|
|
43
|
-
<!-- end (inner) header -->
|
|
44
|
-
|
|
45
|
-
<!-- begin CmdMainNavigation -->
|
|
46
|
-
<CmdMainNavigation v-if="cmdMainNavigation?.navigationEntries?.length && !navigationInline"
|
|
47
|
-
v-bind="cmdMainNavigation"
|
|
48
|
-
<!-- end CmdMainNavigation -->
|
|
49
|
-
</div>
|
|
50
|
-
<!-- end CmdSiteHeader ---------------------------------------------------------------------------------------- -->
|
|
51
|
-
</template>
|
|
52
|
-
|
|
53
|
-
<script>
|
|
54
|
-
export default {
|
|
55
|
-
name: "CmdSiteHeader",
|
|
56
|
-
emits: ["offcanvas"],
|
|
57
|
-
data() {
|
|
58
|
-
return {
|
|
59
|
-
defaultLogoHeight: ""
|
|
60
|
-
}
|
|
61
|
-
},
|
|
62
|
-
props: {
|
|
63
|
-
/**
|
|
64
|
-
*
|
|
65
|
-
*/
|
|
66
|
-
|
|
67
|
-
type:
|
|
68
|
-
|
|
69
|
-
},
|
|
70
|
-
/**
|
|
71
|
-
*
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
*
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
*
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
*
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
*
|
|
108
|
-
*/
|
|
109
|
-
|
|
110
|
-
type:
|
|
111
|
-
|
|
112
|
-
},
|
|
113
|
-
/**
|
|
114
|
-
* properties for
|
|
115
|
-
*/
|
|
116
|
-
|
|
117
|
-
type: Object,
|
|
118
|
-
required: false
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
.cmd-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
/*
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
.
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
}
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
grid-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
--logo-width-on-scroll: 100%;
|
|
384
|
-
}
|
|
385
|
-
}
|
|
386
|
-
}
|
|
387
|
-
|
|
388
|
-
/* end cmd-site-header ------------------------------------------------------------------------------------------ */
|
|
389
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<!-- begin CmdSiteHeader ---------------------------------------------------------------------------------------- -->
|
|
3
|
+
<div ref="site-header" :class="[
|
|
4
|
+
'cmd-site-header site-header',
|
|
5
|
+
{
|
|
6
|
+
sticky: sticky,
|
|
7
|
+
'navigation-inline': navigationInline,
|
|
8
|
+
'off-canvas-right': cmdMainNavigation?.offcanvasPosition === 'right'
|
|
9
|
+
}
|
|
10
|
+
]">
|
|
11
|
+
<!-- begin slot for elements above header -->
|
|
12
|
+
<div v-if="$slots.topheader" class="top-header">
|
|
13
|
+
<slot name="topheader"></slot>
|
|
14
|
+
</div>
|
|
15
|
+
<!-- end slot for elements above header -->
|
|
16
|
+
|
|
17
|
+
<!-- begin (inner) header -->
|
|
18
|
+
<header :class="[
|
|
19
|
+
useGrid ? 'grid-container-create-columns' : 'flex-container',
|
|
20
|
+
{ 'has-navigation': (cmdMainNavigation?.navigationEntries?.length && navigationInline) || $slots.navigation }
|
|
21
|
+
]">
|
|
22
|
+
<!-- begin slots for logo and other header elements -->
|
|
23
|
+
<template v-if="$slots.logo || $slots.header || $slots.navigation">
|
|
24
|
+
<slot name="logo"></slot>
|
|
25
|
+
<slot name="header"></slot>
|
|
26
|
+
<slot name="navigation"></slot>
|
|
27
|
+
</template>
|
|
28
|
+
<!-- end slots for logo and other header elements -->
|
|
29
|
+
|
|
30
|
+
<!-- begin content given by data -->
|
|
31
|
+
<template v-if="cmdCompanyLogo || cmdMainNavigation?.navigationEntries?.length">
|
|
32
|
+
<!-- begin CmdCompanyLogo -->
|
|
33
|
+
<CmdCompanyLogo v-if="cmdCompanyLogo" v-bind="cmdCompanyLogo" @image-loaded="onImageLoaded" />
|
|
34
|
+
<!-- end CmdCompanyLogo -->
|
|
35
|
+
|
|
36
|
+
<!-- begin CmdMainNavigation -->
|
|
37
|
+
<CmdMainNavigation v-if="cmdMainNavigation?.navigationEntries?.length && navigationInline"
|
|
38
|
+
v-bind="cmdMainNavigation" @offcanvas="emitOffcanvasStatus" />
|
|
39
|
+
<!-- end CmdMainNavigation -->
|
|
40
|
+
</template>
|
|
41
|
+
<!-- end content given by data -->
|
|
42
|
+
</header>
|
|
43
|
+
<!-- end (inner) header -->
|
|
44
|
+
|
|
45
|
+
<!-- begin CmdMainNavigation -->
|
|
46
|
+
<CmdMainNavigation v-if="cmdMainNavigation?.navigationEntries?.length && !navigationInline"
|
|
47
|
+
v-bind="cmdMainNavigation" @offcanvas="emitOffcanvasStatus" />
|
|
48
|
+
<!-- end CmdMainNavigation -->
|
|
49
|
+
</div>
|
|
50
|
+
<!-- end CmdSiteHeader ---------------------------------------------------------------------------------------- -->
|
|
51
|
+
</template>
|
|
52
|
+
|
|
53
|
+
<script>
|
|
54
|
+
export default {
|
|
55
|
+
name: "CmdSiteHeader",
|
|
56
|
+
emits: ["offcanvas"],
|
|
57
|
+
data() {
|
|
58
|
+
return {
|
|
59
|
+
defaultLogoHeight: ""
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
props: {
|
|
63
|
+
/**
|
|
64
|
+
* activated sticky-header (stays on top if page is scrolled)
|
|
65
|
+
*/
|
|
66
|
+
sticky: {
|
|
67
|
+
type: Boolean,
|
|
68
|
+
default: true
|
|
69
|
+
},
|
|
70
|
+
/**
|
|
71
|
+
* activate if navigation should be displayed inline to logo (otherwise it will be displayed below)
|
|
72
|
+
*
|
|
73
|
+
* @affectsStyling: true
|
|
74
|
+
*/
|
|
75
|
+
navigationInline: {
|
|
76
|
+
type: Boolean,
|
|
77
|
+
default: false
|
|
78
|
+
},
|
|
79
|
+
/**
|
|
80
|
+
* set if header (incl. logo) should be resized if user scrolls page
|
|
81
|
+
*
|
|
82
|
+
* scrollContainerToResizeHeader-property must be defined
|
|
83
|
+
*/
|
|
84
|
+
resizeHeaderOnScroll: {
|
|
85
|
+
type: Boolean,
|
|
86
|
+
default: false
|
|
87
|
+
},
|
|
88
|
+
/**
|
|
89
|
+
* set selector for element that scrolls content to resize header
|
|
90
|
+
*
|
|
91
|
+
* resizeHeaderOnScroll-property must be activated
|
|
92
|
+
*/
|
|
93
|
+
scrollContainerToResizeHeader: {
|
|
94
|
+
type: String,
|
|
95
|
+
default: ".site-wrapper"
|
|
96
|
+
},
|
|
97
|
+
/**
|
|
98
|
+
* use a grid for positioning of inner-elements (else a flex-container will be used)
|
|
99
|
+
*
|
|
100
|
+
* @affectsStyling: true
|
|
101
|
+
*/
|
|
102
|
+
useGrid: {
|
|
103
|
+
type: Boolean,
|
|
104
|
+
default: true
|
|
105
|
+
},
|
|
106
|
+
/**
|
|
107
|
+
* properties for CmdCompanyLogo-component
|
|
108
|
+
*/
|
|
109
|
+
cmdCompanyLogo: {
|
|
110
|
+
type: Object,
|
|
111
|
+
required: false
|
|
112
|
+
},
|
|
113
|
+
/**
|
|
114
|
+
* properties for CmdMainNavigation-component
|
|
115
|
+
*/
|
|
116
|
+
cmdMainNavigation: {
|
|
117
|
+
type: Object,
|
|
118
|
+
required: false
|
|
119
|
+
}
|
|
120
|
+
},
|
|
121
|
+
mounted() {
|
|
122
|
+
if (this.resizeHeaderOnScroll) {
|
|
123
|
+
const scrollContainer = document.querySelector(this.scrollContainerToResizeHeader);
|
|
124
|
+
if (scrollContainer) {
|
|
125
|
+
scrollContainer.addEventListener("scroll", function () {
|
|
126
|
+
const header = document.querySelector(".cmd-site-header > header");
|
|
127
|
+
|
|
128
|
+
if (scrollContainer.scrollTop > 0) {
|
|
129
|
+
header.classList.add("resize-on-scroll");
|
|
130
|
+
} else {
|
|
131
|
+
header.classList.remove("resize-on-scroll");
|
|
132
|
+
}
|
|
133
|
+
});
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
methods: {
|
|
138
|
+
onImageLoaded(event) {
|
|
139
|
+
if (!this.useGrid) {
|
|
140
|
+
// image should must have height to bi visible as flex-item (else size is 0x0)
|
|
141
|
+
this.defaultLogoHeight = (event.target.height / 10) + "rem"
|
|
142
|
+
}
|
|
143
|
+
},
|
|
144
|
+
emitOffcanvasStatus(event) {
|
|
145
|
+
this.$emit("offcanvas", event)
|
|
146
|
+
}
|
|
147
|
+
},
|
|
148
|
+
watch: {
|
|
149
|
+
defaultLogoHeight() {
|
|
150
|
+
const logo = this.$refs["site-header"].querySelector(".cmd-company-logo img")
|
|
151
|
+
logo.style.height = this.defaultLogoHeight
|
|
152
|
+
}
|
|
153
|
+
}
|
|
154
|
+
}
|
|
155
|
+
</script>
|
|
156
|
+
|
|
157
|
+
<style>
|
|
158
|
+
/* begin cmd-site-header ---------------------------------------------------------------------------------------- */
|
|
159
|
+
.cmd-site-header {
|
|
160
|
+
--logo-width-on-scroll: 50%;
|
|
161
|
+
--header-scroll-animation: var(--default-transition);
|
|
162
|
+
|
|
163
|
+
grid-area: site-header;
|
|
164
|
+
display: flex;
|
|
165
|
+
flex-direction: column;
|
|
166
|
+
flex: none;
|
|
167
|
+
|
|
168
|
+
&.sticky {
|
|
169
|
+
position: sticky;
|
|
170
|
+
z-index: 300;
|
|
171
|
+
|
|
172
|
+
header {
|
|
173
|
+
.cmd-company-logo {
|
|
174
|
+
figure {
|
|
175
|
+
img {
|
|
176
|
+
transform-origin: top left;
|
|
177
|
+
transition: var(--header-scroll-animation);
|
|
178
|
+
margin: 0;
|
|
179
|
+
width: 100%;
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
&.resize-on-scroll {
|
|
185
|
+
padding-top: var(--default-padding);
|
|
186
|
+
padding-bottom: var(--default-padding);
|
|
187
|
+
transition: var(--header-scroll-animation);
|
|
188
|
+
|
|
189
|
+
.cmd-company-logo {
|
|
190
|
+
figure {
|
|
191
|
+
img {
|
|
192
|
+
transition: var(--header-scroll-animation);
|
|
193
|
+
width: var(--logo-width-on-scroll);
|
|
194
|
+
}
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
li a {
|
|
202
|
+
text-decoration: none;
|
|
203
|
+
}
|
|
204
|
+
|
|
205
|
+
header,
|
|
206
|
+
.cmd-main-navigation nav,
|
|
207
|
+
.cmd-list-of-links {
|
|
208
|
+
max-width: var(--max-width);
|
|
209
|
+
width: 100%;
|
|
210
|
+
/* stretch flex-item */
|
|
211
|
+
padding: 0 var(--default-padding);
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
.cmd-main-navigation nav {
|
|
215
|
+
width: auto;
|
|
216
|
+
margin: 0 0 0 auto;
|
|
217
|
+
/* align nav to right */
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
.top-header {
|
|
221
|
+
.cmd-list-of-links {
|
|
222
|
+
padding-top: calc(var(--default-padding) / 2);
|
|
223
|
+
padding-bottom: calc(var(--default-padding) / 2);
|
|
224
|
+
}
|
|
225
|
+
}
|
|
226
|
+
|
|
227
|
+
.main-navigation-wrapper {
|
|
228
|
+
grid-column: span var(--grid-columns);
|
|
229
|
+
border-bottom: 0;
|
|
230
|
+
}
|
|
231
|
+
|
|
232
|
+
&+.main-navigation-wrapper {
|
|
233
|
+
nav {
|
|
234
|
+
border-left: 0;
|
|
235
|
+
border-right: 0;
|
|
236
|
+
}
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
/* use id to ensure high specificity */
|
|
240
|
+
>.cmd-main-navigation.main-navigation-wrapper:last-child {
|
|
241
|
+
border-bottom: 0;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
header {
|
|
245
|
+
padding-top: var(--default-padding);
|
|
246
|
+
padding-bottom: var(--default-padding);
|
|
247
|
+
row-gap: 0;
|
|
248
|
+
|
|
249
|
+
&.has-navigation {
|
|
250
|
+
grid-template-rows: 1fr min-content;
|
|
251
|
+
grid-template-areas: "company-logo" "main-navigation";
|
|
252
|
+
padding-bottom: 0;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
&.flex-container {
|
|
256
|
+
width: 100%;
|
|
257
|
+
|
|
258
|
+
.cmd-company-logo {
|
|
259
|
+
grid-area: company-logo;
|
|
260
|
+
flex: none;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.cmd-main-navigation nav {
|
|
265
|
+
padding: 0;
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.cmd-main-navigation,
|
|
269
|
+
nav ul li {
|
|
270
|
+
border-bottom: 0;
|
|
271
|
+
}
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
/* begin inline-navigation (shares spaces with company-logo) */
|
|
275
|
+
&.navigation-inline {
|
|
276
|
+
header {
|
|
277
|
+
&.has-navigation {
|
|
278
|
+
grid-template-rows: 1fr;
|
|
279
|
+
grid-template-areas: "company-logo main-navigation";
|
|
280
|
+
padding-bottom: var(--default-padding);
|
|
281
|
+
}
|
|
282
|
+
|
|
283
|
+
.cmd-company-logo {
|
|
284
|
+
grid-area: company-logo;
|
|
285
|
+
grid-column: span var(--grid-small-span);
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
.main-navigation-wrapper {
|
|
289
|
+
grid-area: main-navigation;
|
|
290
|
+
display: flex;
|
|
291
|
+
align-items: center;
|
|
292
|
+
justify-content: flex-end;
|
|
293
|
+
grid-column: span var(--grid-large-span);
|
|
294
|
+
|
|
295
|
+
&:not(.persist-on-mobile) {
|
|
296
|
+
padding-left: 0 !important;
|
|
297
|
+
}
|
|
298
|
+
}
|
|
299
|
+
}
|
|
300
|
+
|
|
301
|
+
&.off-canvas-right {
|
|
302
|
+
header {
|
|
303
|
+
&.has-navigation {
|
|
304
|
+
grid-template-areas: "company-logo main-navigation";
|
|
305
|
+
}
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
/* end inline-navigation (shares spaces with company-logo */
|
|
311
|
+
}
|
|
312
|
+
</style>
|
|
313
|
+
|
|
314
|
+
<style lang="scss">
|
|
315
|
+
@import '../assets/styles/variables';
|
|
316
|
+
|
|
317
|
+
@media only screen and (max-width: $medium-max-width) {
|
|
318
|
+
.cmd-site-header {
|
|
319
|
+
header {
|
|
320
|
+
grid-auto-rows: auto;
|
|
321
|
+
/* items should be as large as their content */
|
|
322
|
+
|
|
323
|
+
.cmd-main-navigation.main-navigation-wrapper {
|
|
324
|
+
&:not(.persist-on-mobile) {
|
|
325
|
+
padding: 0;
|
|
326
|
+
}
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
/* main-navigation below logo */
|
|
330
|
+
&+.cmd-main-navigation.main-navigation-wrapper {
|
|
331
|
+
padding-bottom: var(--default-padding);
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
|
|
335
|
+
/* main-navigation inline with logo */
|
|
336
|
+
&.navigation-inline {
|
|
337
|
+
.cmd-main-navigation.main-navigation-wrapper {
|
|
338
|
+
&:not(.persist-on-mobile) {
|
|
339
|
+
padding-left: var(--default-padding);
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
|
|
343
|
+
&.off-canvas-right {
|
|
344
|
+
.cmd-main-navigation.main-navigation-wrapper {
|
|
345
|
+
&:not(.persist-on-mobile) {
|
|
346
|
+
padding: 0;
|
|
347
|
+
}
|
|
348
|
+
}
|
|
349
|
+
}
|
|
350
|
+
}
|
|
351
|
+
}
|
|
352
|
+
}
|
|
353
|
+
|
|
354
|
+
@media only screen and (max-width: $small-max-width) {
|
|
355
|
+
.cmd-site-header {
|
|
356
|
+
gap: calc(var(--default-gap) / 2);
|
|
357
|
+
|
|
358
|
+
.top-header {
|
|
359
|
+
.cmd-list-of-links {
|
|
360
|
+
padding: 0;
|
|
361
|
+
}
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
&.navigation-inline {
|
|
365
|
+
header {
|
|
366
|
+
|
|
367
|
+
.cmd-company-logo,
|
|
368
|
+
.main-navigation-wrapper {
|
|
369
|
+
grid-column: span calc(var(--grid-small-span) / 2);
|
|
370
|
+
}
|
|
371
|
+
}
|
|
372
|
+
}
|
|
373
|
+
|
|
374
|
+
header {
|
|
375
|
+
--header-scroll-animation: none;
|
|
376
|
+
--logo-width-on-scroll: 100%;
|
|
377
|
+
}
|
|
378
|
+
}
|
|
379
|
+
}
|
|
380
|
+
|
|
381
|
+
/* end cmd-site-header ------------------------------------------------------------------------------------------ */
|
|
382
|
+
</style>
|