comand-component-library 3.2.3 → 3.2.5
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.umd.min.js +1 -1
- package/package.json +1 -1
- package/src/App.vue +5 -5
- package/src/components/CmdCookieDisclaimer.vue +8 -2
- package/src/components/CmdFancyBox.vue +207 -148
- package/src/components/CmdIcon.vue +39 -0
- package/src/components/CmdListOfLinks.vue +9 -8
- package/src/components/CmdSiteHeader.vue +27 -28
- package/src/components/CmdThumbnailScroller.vue +47 -9
- package/src/components/CmdWidthLimitationWrapper.vue +1 -1
- package/src/documentation/generated/CmdFancyBoxPropertyDescriptions.json +5 -0
package/package.json
CHANGED
package/src/App.vue
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
<!-- end site-header --------------------------------------------------------------------------------------------------------------------------------------------------->
|
30
30
|
<main>
|
31
31
|
<!-- begin width-limitation-wrapper (with table of contents) --------------------------------------------------------------------------------------------------------------------------------------------------->
|
32
|
-
<CmdWidthLimitationWrapper>
|
32
|
+
<CmdWidthLimitationWrapper :cmdHeadline="{headlineText: 'Table of contents', headlineLevel: 2}">
|
33
33
|
<div class="flex-container">
|
34
34
|
<ul>
|
35
35
|
<li><a href="#section-advanced-form-elements">Advanced Form Elements</a></li>
|
@@ -66,7 +66,6 @@
|
|
66
66
|
<li><a href="#section-upload-form">Upload-Form</a></li>
|
67
67
|
</ul>
|
68
68
|
</div>
|
69
|
-
<hr/>
|
70
69
|
</CmdWidthLimitationWrapper>
|
71
70
|
<!-- end width-limitation-wrapper (with table of contents) --------------------------------------------------------------------------------------------------------------------------------------------------->
|
72
71
|
|
@@ -933,9 +932,10 @@
|
|
933
932
|
<h2 class="headline-demopage">Fancybox</h2>
|
934
933
|
<a href="#" @click.prevent="showFancyBox('text','Some text')">Open FancyBox with text</a>
|
935
934
|
<a href="#"
|
936
|
-
@click.prevent="showFancyBox('image', 'media/images/content-images/
|
937
|
-
title="Open FancyBox with large image"
|
938
|
-
|
935
|
+
@click.prevent="showFancyBox('image', 'media/images/content-images/landscape-large.jpg', 'Alternative text')"
|
936
|
+
title="Open FancyBox with large image"
|
937
|
+
>
|
938
|
+
<img src="media/images/content-images/landscape-small.jpg" alt="Alternative text"/>
|
939
939
|
</a>
|
940
940
|
</CmdWidthLimitationWrapper>
|
941
941
|
<!-- end fancybox ------------------------------------------------------------------------------------------------------------------------------------------------------->
|
@@ -274,7 +274,7 @@ export default {
|
|
274
274
|
event.preventDefault()
|
275
275
|
fetch(event.target.href).then((response) =>
|
276
276
|
response.text()
|
277
|
-
).then((content) => { /* use arrow function to get access to dataPrivacy by 'this' = vue-instance (otherwise 'this' wouldn't be vue-instance in this
|
277
|
+
).then((content) => { /* use arrow function to get access to dataPrivacy by 'this' = vue-instance (otherwise 'this' wouldn't be vue-instance in this fetch-method) */
|
278
278
|
this.dataPrivacyContent = content
|
279
279
|
})
|
280
280
|
}
|
@@ -295,9 +295,12 @@ export default {
|
|
295
295
|
|
296
296
|
.cmd-box {
|
297
297
|
.box-header {
|
298
|
+
padding: 0;
|
298
299
|
justify-content: unset; /* overwrite setting for collapsible boxes */
|
299
300
|
|
300
301
|
label {
|
302
|
+
padding: calc(var(--default-padding) / 2) var(--default-padding);
|
303
|
+
|
301
304
|
&.disabled {
|
302
305
|
.label-text span {
|
303
306
|
color: var(--pure-white) !important; /* required to set label-text in header to white */
|
@@ -305,6 +308,7 @@ export default {
|
|
305
308
|
}
|
306
309
|
|
307
310
|
& + .toggle-icon {
|
311
|
+
padding: calc(var(--default-padding) / 2) var(--default-padding);
|
308
312
|
width: 100%;
|
309
313
|
justify-content: flex-end;
|
310
314
|
text-align: right;
|
@@ -312,8 +316,10 @@ export default {
|
|
312
316
|
}
|
313
317
|
|
314
318
|
&:hover, &:active, &:focus {
|
319
|
+
background: var(--hyperlink-color);
|
320
|
+
|
315
321
|
label.disabled .label-text span {
|
316
|
-
color: var(--
|
322
|
+
color: var(--pure-white) !important; /* required to set label-text on hover back to disabled-color */
|
317
323
|
}
|
318
324
|
}
|
319
325
|
}
|
@@ -1,87 +1,99 @@
|
|
1
1
|
<template>
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
2
|
+
<teleport to="body">
|
3
|
+
<dialog
|
4
|
+
ref="dialog"
|
5
|
+
:class="['cmd-fancybox', {'show-overlay': showOverlay, 'image' : fancyBoxImageUrl || fancyBoxGallery}]"
|
6
|
+
:aria-label="ariaLabelText"
|
7
|
+
>
|
8
|
+
<header class="flex-container">
|
9
|
+
<!-- begin CmdHeadline -->
|
10
|
+
<CmdHeadline
|
11
|
+
v-if="cmdHeadline?.show"
|
12
|
+
:headlineText="cmdHeadline?.headlineText"
|
13
|
+
:headlineLevel="cmdHeadline?.headlineLevel"
|
14
|
+
:id="htmlId"
|
15
|
+
/>
|
16
|
+
<!-- end CmdHeadline -->
|
17
|
+
|
18
|
+
<!-- begin button-wrapper -->
|
19
|
+
<div
|
20
|
+
v-if="(fancyboxOptions.printButtons && (fancyboxOptions.printButtons.color || fancyboxOptions.printButtons.grayscale)) || fancyboxOptions.closeIcon"
|
21
|
+
class="button-wrapper no-flex"
|
22
|
+
> <!-- begin print buttons -->
|
23
|
+
<a v-if="fancyboxOptions.printButtons && fancyboxOptions.printButtons.color && fancyboxOptions.printButtons.color.show"
|
24
|
+
href="#"
|
25
|
+
class="button primary"
|
26
|
+
:class="fancyboxOptions.printButtons.color.iconClass"
|
27
|
+
:title="fancyboxOptions.printButtons.color.tooltip"
|
28
|
+
id="print-color"
|
29
|
+
@click.prevent="printInGrayscale = false">
|
30
|
+
</a>
|
31
|
+
<a v-if="fancyboxOptions.printButtons && fancyboxOptions.printButtons.grayscale && fancyboxOptions.printButtons.grayscale.show"
|
32
|
+
href="#"
|
33
|
+
class="button primary"
|
34
|
+
:class="fancyboxOptions.printButtons.grayscale.iconClass"
|
35
|
+
:title="fancyboxOptions.printButtons.grayscale.tooltip"
|
36
|
+
id="print-grayscale"
|
37
|
+
@click.prevent="printInGrayscale = true">
|
38
|
+
</a>
|
39
|
+
<!-- end print buttons -->
|
40
|
+
|
41
|
+
<!-- begin close-icon -->
|
42
|
+
<a v-if="fancyboxOptions.closeIcon"
|
43
|
+
href="#"
|
44
|
+
class="button primary"
|
45
|
+
id="close-dialog"
|
46
|
+
:class="fancyboxOptions.closeIcon.iconClass"
|
47
|
+
:title="fancyboxOptions.closeIcon.tooltip"
|
48
|
+
@click.prevent="close">
|
49
|
+
</a>
|
50
|
+
<!-- end close-icon -->
|
51
|
+
</div>
|
52
|
+
<!-- end button-wrapper -->
|
53
|
+
</header>
|
54
|
+
<div :class="['outer-content-wrapper', {'grayscale' : printInGrayscale}]">
|
55
|
+
<div v-if="fancyBoxImageUrl" class="content">
|
56
|
+
<figure>
|
57
|
+
<img :src="fancyBoxImageUrl" :alt="altText" />#
|
58
|
+
<figcaption v-if="figcaption">{{ figcaption }}</figcaption>
|
59
|
+
</figure>
|
60
|
+
</div>
|
61
|
+
<div v-else-if="fancyBoxContent" class="content" v-html="fancyBoxContent"></div>
|
62
|
+
<div v-else-if="fancyBoxElements" class="content"></div>
|
63
|
+
<div v-else-if="fancyBoxGallery" class="content">
|
64
|
+
|
65
|
+
<!-- begin CmdSlideButton -->
|
66
|
+
<CmdSlideButton @click.prevent="showPrevItem" slideButtonType="prev"/>
|
67
|
+
<!-- end CmdSlideButton -->
|
68
|
+
|
69
|
+
<!-- begin enlarged image -->
|
70
|
+
<figure>
|
71
|
+
<img :src="fancyBoxGallery[index].srcImageLarge" :alt="fancyBoxGallery[index].alt"/>
|
72
|
+
<figcaption>{{ fancyBoxGallery[index].figcaption }}</figcaption>
|
73
|
+
</figure>
|
74
|
+
<!-- end enlarged image -->
|
75
|
+
|
76
|
+
<!-- begin CmdSlideButton -->
|
77
|
+
<CmdSlideButton @click.prevent="showNextItem"/>
|
78
|
+
<!-- end CmdSlideButton -->
|
79
|
+
</div>
|
80
|
+
<div v-else class="content">
|
81
|
+
<!-- begin slot-content -->
|
82
|
+
<slot></slot>
|
83
|
+
<!-- end slot-content -->
|
84
|
+
</div>
|
72
85
|
</div>
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
<!-- </transition>-->
|
86
|
+
<!-- begin CmdThumbnailScroller -->
|
87
|
+
<CmdThumbnailScroller
|
88
|
+
v-if="fancyBoxGallery"
|
89
|
+
:thumbnailScrollerItems="[...fancyBoxGallery]"
|
90
|
+
:allowOpenFancyBox="false"
|
91
|
+
@click="showItem"
|
92
|
+
:imgIndex="index"
|
93
|
+
/>
|
94
|
+
<!-- end CmdThumbnailScroller -->
|
95
|
+
</dialog>
|
96
|
+
</teleport>
|
85
97
|
</template>
|
86
98
|
|
87
99
|
<script>
|
@@ -142,6 +154,13 @@ const FancyBox = defineComponent({
|
|
142
154
|
type: String,
|
143
155
|
required: false
|
144
156
|
},
|
157
|
+
/**
|
158
|
+
* figcaption if image is given by url
|
159
|
+
*/
|
160
|
+
figcaption: {
|
161
|
+
type: String,
|
162
|
+
required: false
|
163
|
+
},
|
145
164
|
/**
|
146
165
|
* options to show at top (closeIcon, printButtons)
|
147
166
|
*/
|
@@ -239,21 +258,16 @@ const FancyBox = defineComponent({
|
|
239
258
|
}
|
240
259
|
},
|
241
260
|
created() {
|
261
|
+
// enable closing dialog by escape-key
|
242
262
|
if (this.allowEscapeKey) {
|
243
263
|
this.$_FancyBox_escapeKeyHandler = e => (e.key === "Escape" || e.key === "Esc") && this.close()
|
244
264
|
document.querySelector("body").addEventListener("keyup", this.$_FancyBox_escapeKeyHandler)
|
245
265
|
}
|
246
266
|
|
247
|
-
|
248
|
-
/* register new properties for vue-instance */
|
249
|
-
/* get current vertical scroll position */
|
250
|
-
// this.$_FancyBox_verticalScrollPosition = window.scrollY
|
251
|
-
//
|
252
|
-
|
267
|
+
// scroll content to initial position
|
253
268
|
this.$_FancyBox_scrollHandler = () => {
|
254
269
|
window.scrollTo(0, this.$_FancyBox_verticalScrollPosition)
|
255
270
|
}
|
256
|
-
/* end avoid scrolling if fancybox is shown */
|
257
271
|
|
258
272
|
this.$watch(
|
259
273
|
() => [
|
@@ -266,12 +280,14 @@ const FancyBox = defineComponent({
|
|
266
280
|
)
|
267
281
|
},
|
268
282
|
mounted() {
|
283
|
+
// avoid scrolling if fancybox is shown
|
269
284
|
if (this.showFancyBox) {
|
270
285
|
document.querySelector("body").classList.add("avoid-scrolling")
|
271
286
|
this.$refs.dialog.showModal()
|
272
287
|
}
|
273
288
|
},
|
274
289
|
beforeUnmount() {
|
290
|
+
// remove event-listener for escape-key
|
275
291
|
if (this.allowEscapeKey) {
|
276
292
|
document.querySelector("body").removeEventListener("keyup", this.$_FancyBox_escapeKeyHandler)
|
277
293
|
}
|
@@ -308,7 +324,6 @@ const FancyBox = defineComponent({
|
|
308
324
|
this.index = this.fancyBoxGallery.length - 1;
|
309
325
|
}
|
310
326
|
},
|
311
|
-
|
312
327
|
showItem(imgId) {
|
313
328
|
for (let i = 0; i < this.fancyBoxGallery.length; i++) {
|
314
329
|
if (this.fancyBoxGallery[i].imgId === imgId) {
|
@@ -317,7 +332,6 @@ const FancyBox = defineComponent({
|
|
317
332
|
}
|
318
333
|
}
|
319
334
|
},
|
320
|
-
|
321
335
|
showNextItem() {
|
322
336
|
if (this.index < this.fancyBoxGallery.length - 1) {
|
323
337
|
this.index++;
|
@@ -325,7 +339,6 @@ const FancyBox = defineComponent({
|
|
325
339
|
this.index = 0;
|
326
340
|
}
|
327
341
|
},
|
328
|
-
|
329
342
|
close() {
|
330
343
|
if (this.$options.el) {
|
331
344
|
this.$destroy()
|
@@ -335,6 +348,7 @@ const FancyBox = defineComponent({
|
|
335
348
|
this.$emit("update:show", false)
|
336
349
|
}
|
337
350
|
|
351
|
+
// remove class to re-enable scrolling
|
338
352
|
document.querySelector("body").classList.remove("avoid-scrolling")
|
339
353
|
}
|
340
354
|
},
|
@@ -351,7 +365,7 @@ const FancyBox = defineComponent({
|
|
351
365
|
// window.addEventListener("scroll", this.$_FancyBox_scrollHandler)
|
352
366
|
this.$refs.dialog.showModal()
|
353
367
|
} else {
|
354
|
-
// remove
|
368
|
+
// remove class to re-enable scrolling
|
355
369
|
document.querySelector("body").classList.remove("avoid-scrolling")
|
356
370
|
// window.removeEventListener("scroll", this.$_FancyBox_scrollHandler)
|
357
371
|
// console.log("$_FancyBox_verticalScrollPosition", this.$_FancyBox_verticalScrollPosition)
|
@@ -365,11 +379,11 @@ const FancyBox = defineComponent({
|
|
365
379
|
})
|
366
380
|
|
367
381
|
async function getContentType(url) {
|
368
|
-
const response = await fetch(url, {method:
|
382
|
+
const response = await fetch(url, {method: "HEAD"})
|
369
383
|
if (response.ok) {
|
370
|
-
return (response.headers.get(
|
384
|
+
return (response.headers.get("Content-Type") || "").split(";")[0]
|
371
385
|
}
|
372
|
-
return
|
386
|
+
return "text/html"
|
373
387
|
}
|
374
388
|
|
375
389
|
export {openFancyBox}
|
@@ -378,19 +392,18 @@ export default FancyBox
|
|
378
392
|
|
379
393
|
<style lang="scss">
|
380
394
|
/* begin cmd-fancybox ---------------------------------------------------------------------------------------- */
|
381
|
-
@import
|
395
|
+
@import "../assets/styles/variables";
|
382
396
|
|
383
397
|
.cmd-fancybox {
|
384
|
-
overflow-x: hidden;
|
385
398
|
z-index: 500;
|
386
399
|
flex-direction: column;
|
387
400
|
padding: var(--default-padding);
|
388
|
-
min-width:
|
389
|
-
|
390
|
-
min-height: 30%;
|
391
|
-
max-height: 80%;
|
401
|
+
min-width: 30vw;
|
402
|
+
min-height: 30vh;
|
392
403
|
background: var(--pure-white);
|
393
404
|
border-radius: var(--border-radius);
|
405
|
+
overflow: hidden;
|
406
|
+
gap: calc(var(--default-gap) / 2);
|
394
407
|
|
395
408
|
// detect open-attribute (will be added to dom automatically)
|
396
409
|
&[open] {
|
@@ -402,6 +415,10 @@ export default FancyBox
|
|
402
415
|
background: rgba(0, 0, 0, var(--reduced-opacity));
|
403
416
|
}
|
404
417
|
|
418
|
+
> header {
|
419
|
+
display: flex;
|
420
|
+
}
|
421
|
+
|
405
422
|
.cmd-cookie-disclaimer {
|
406
423
|
padding: 0;
|
407
424
|
}
|
@@ -411,7 +428,9 @@ export default FancyBox
|
|
411
428
|
}
|
412
429
|
|
413
430
|
&.image {
|
414
|
-
|
431
|
+
.outer-content-wrapper {
|
432
|
+
overflow-y: hidden;
|
433
|
+
}
|
415
434
|
|
416
435
|
img {
|
417
436
|
display: block;
|
@@ -422,76 +441,111 @@ export default FancyBox
|
|
422
441
|
}
|
423
442
|
}
|
424
443
|
|
425
|
-
>
|
426
|
-
|
427
|
-
flex-direction: row;
|
444
|
+
> header {
|
445
|
+
justify-content: space-between;
|
428
446
|
|
429
|
-
|
430
|
-
|
447
|
+
> .cmd-headline {
|
448
|
+
max-width: 80%;
|
449
|
+
flex-shrink: 1;
|
450
|
+
margin-bottom: 0;
|
431
451
|
}
|
432
452
|
|
433
|
-
|
434
|
-
|
435
|
-
|
436
|
-
|
437
|
-
|
453
|
+
> .button-wrapper {
|
454
|
+
flex-shrink: 0;
|
455
|
+
flex-direction: row;
|
456
|
+
align-items: flex-start;
|
457
|
+
gap: calc(var(--default-gap) / 2);
|
458
|
+
margin-left: auto;
|
438
459
|
|
439
|
-
|
440
|
-
|
441
|
-
|
442
|
-
|
460
|
+
> .button {
|
461
|
+
display: block;
|
462
|
+
border: var(--default-border);
|
463
|
+
padding: .2rem;
|
464
|
+
min-width: 0;
|
465
|
+
min-height: 0;
|
443
466
|
|
444
|
-
|
445
|
-
|
446
|
-
|
447
|
-
|
467
|
+
&[class*="icon"] {
|
468
|
+
color: var(--text-color);
|
469
|
+
background: var(--pure-white);
|
470
|
+
}
|
448
471
|
|
449
|
-
|
450
|
-
|
451
|
-
}
|
452
|
-
}
|
472
|
+
&.icon-print {
|
473
|
+
background: linear-gradient(135deg, #009fe3 0%, #009fe3 25%, #e6007e 25%, #e6007e 50%, #ffed00 50%, #ffed00 50%, #ffed00 75%, var(--medium-gray) 75%, var(--medium-gray) 100%);
|
453
474
|
|
454
|
-
|
455
|
-
|
456
|
-
|
457
|
-
|
458
|
-
|
459
|
-
|
460
|
-
|
461
|
-
|
462
|
-
background: var(--pure-black);
|
463
|
-
|
464
|
-
li:not(.active) {
|
465
|
-
img {
|
466
|
-
opacity: var(--reduced-opacity);
|
467
|
-
}
|
475
|
+
&#print-grayscale {
|
476
|
+
background: linear-gradient(135deg, var(--medium-gray) 0%, var(--medium-gray) 50%, var(--pure-white) 50%, var(--pure-white) 100%);
|
477
|
+
|
478
|
+
&:hover, &:active, &:focus {
|
479
|
+
background: var(--pure-white);
|
480
|
+
}
|
481
|
+
}
|
482
|
+
}
|
468
483
|
|
469
|
-
a {
|
470
484
|
&:hover, &:active, &:focus {
|
471
|
-
|
472
|
-
|
485
|
+
border: var(--primary-border);
|
486
|
+
background: var(--pure-white);
|
487
|
+
|
488
|
+
&[class*="icon"] {
|
489
|
+
color: var(--primary-color);
|
473
490
|
}
|
474
491
|
}
|
475
492
|
}
|
493
|
+
}
|
494
|
+
}
|
495
|
+
|
496
|
+
.outer-content-wrapper {
|
497
|
+
max-height: 85vh;
|
498
|
+
overflow-x: hidden;
|
499
|
+
max-width: var(--max-width);
|
500
|
+
|
501
|
+
.content {
|
502
|
+
> img, > video {
|
503
|
+
&:only-child {
|
504
|
+
margin: auto;
|
505
|
+
max-height: 80vmin;
|
506
|
+
max-width: 80vmax;
|
507
|
+
}
|
508
|
+
}
|
476
509
|
|
477
510
|
figcaption {
|
478
|
-
|
479
|
-
|
511
|
+
font-size: 2rem;
|
512
|
+
padding: calc(var(--default-padding) / 2) 0;
|
480
513
|
}
|
481
514
|
}
|
482
515
|
}
|
483
516
|
|
484
517
|
@media only screen and (max-width: $medium-max-width) {
|
485
|
-
.
|
486
|
-
|
518
|
+
.outer-content-wrapper {
|
519
|
+
.content {
|
520
|
+
> img, > video {
|
521
|
+
&:only-child {
|
522
|
+
margin: auto;
|
523
|
+
max-height: 60vmin;
|
524
|
+
}
|
525
|
+
}
|
526
|
+
}
|
487
527
|
}
|
488
528
|
|
489
|
-
|
490
|
-
|
529
|
+
> header {
|
530
|
+
flex-direction: row;
|
531
|
+
|
532
|
+
.button:not(#close-dialog) {
|
533
|
+
display: none;
|
534
|
+
}
|
491
535
|
}
|
492
536
|
}
|
493
537
|
|
494
538
|
@media only screen and (max-width: $small-max-width) {
|
539
|
+
.outer-content-wrapper {
|
540
|
+
.content {
|
541
|
+
> img, > video {
|
542
|
+
&:only-child {
|
543
|
+
max-height: 50vmin;
|
544
|
+
}
|
545
|
+
}
|
546
|
+
}
|
547
|
+
}
|
548
|
+
|
495
549
|
[class*="switch-button-"] {
|
496
550
|
width: 3rem;
|
497
551
|
|
@@ -503,5 +557,10 @@ export default FancyBox
|
|
503
557
|
}
|
504
558
|
}
|
505
559
|
|
560
|
+
@media only screen and (max-width: $medium-max-width) {
|
561
|
+
dialog {
|
562
|
+
top: var(--default-margin);
|
563
|
+
}
|
564
|
+
}
|
506
565
|
/* end cmd-fancybox ------------------------------------------------------------------------------------------ */
|
507
566
|
</style>
|
@@ -0,0 +1,39 @@
|
|
1
|
+
<template>
|
2
|
+
<span v-if="fontSource === 'iconify'" :title="tooltip"></span>
|
3
|
+
<span v-if="fontSource === 'local'" :class="iconClass" :title="tooltip"></span>
|
4
|
+
</template>
|
5
|
+
|
6
|
+
<script>
|
7
|
+
export default {
|
8
|
+
name: "CmdIcon",
|
9
|
+
props: {
|
10
|
+
/**
|
11
|
+
* font-source where to load the icons from
|
12
|
+
* 'local' is for using an implemented icon-fonts by using class 'icon-name'
|
13
|
+
* 'iconify' is for using icons from iconify-dependency (https://iconify.design/)
|
14
|
+
*
|
15
|
+
* @allowedValues: 'dependency', 'local'
|
16
|
+
*/
|
17
|
+
fontSource: {
|
18
|
+
type: String,
|
19
|
+
default: 'local'
|
20
|
+
},
|
21
|
+
/**
|
22
|
+
* icon-class for icon
|
23
|
+
*/
|
24
|
+
iconClass: {
|
25
|
+
type: String,
|
26
|
+
required: true
|
27
|
+
},
|
28
|
+
/**
|
29
|
+
* tooltip text for icon
|
30
|
+
*
|
31
|
+
* @requiredForAccessibility: true
|
32
|
+
*/
|
33
|
+
tooltip: {
|
34
|
+
type: String,
|
35
|
+
required: false
|
36
|
+
}
|
37
|
+
}
|
38
|
+
}
|
39
|
+
</script>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div :class="['cmd-list-of-links',
|
2
|
+
<div :class="['cmd-list-of-links', {box: styleAsBox, horizontal: orientation === 'horizontal', 'section-anchors': sectionAnchors}]">
|
3
3
|
<!-- begin CmdHeadline -->
|
4
4
|
<CmdHeadline
|
5
5
|
v-if="cmdHeadline"
|
@@ -8,7 +8,7 @@
|
|
8
8
|
<!-- end CmdHeadline -->
|
9
9
|
|
10
10
|
<!-- begin list of links -->
|
11
|
-
<ul :class="['flex-container', {'no-gap': !useGap}]">
|
11
|
+
<ul :class="['flex-container', {'no-gap': !useGap},'align-' + align]">
|
12
12
|
<li v-for="(link, index) in links" :key="index" :class="{'active': sectionAnchors && activeSection === index}">
|
13
13
|
<!-- begin use href -->
|
14
14
|
<a v-if="link.type === 'href' || link.type === undefined"
|
@@ -156,15 +156,16 @@ export default {
|
|
156
156
|
flex: none;
|
157
157
|
display: flex;
|
158
158
|
}
|
159
|
-
}
|
160
159
|
|
161
|
-
|
162
|
-
|
163
|
-
|
160
|
+
&.align-center {
|
161
|
+
justify-content: center;
|
162
|
+
}
|
164
163
|
|
165
|
-
|
166
|
-
|
164
|
+
&.align-right {
|
165
|
+
justify-content: flex-end;
|
166
|
+
}
|
167
167
|
}
|
168
|
+
|
168
169
|
}
|
169
170
|
}
|
170
171
|
/* end cmd-list-of-links------------------------------------------------------------------------------------------ */
|