srcdev-nuxt-components 2.3.2 → 2.4.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.
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<component :is="tag" class="display-banner" :class="[elementClasses]">
|
|
3
|
+
<div v-if="$slots.canvas" class="canvas">
|
|
4
|
+
<slot name="canvas"></slot>
|
|
5
|
+
</div>
|
|
6
|
+
<div v-if="$slots.content" class="content">
|
|
7
|
+
<slot name="content"></slot>
|
|
8
|
+
</div>
|
|
9
|
+
</component>
|
|
10
|
+
</template>
|
|
11
|
+
|
|
12
|
+
<script lang="ts">
|
|
13
|
+
const TAGS_ALLOWED = <string[]>['div', 'p', 'span', 'section', 'article', 'aside', 'header', 'footer', 'main', 'nav', 'ul', 'ol'];
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
|
|
18
|
+
const props = defineProps({
|
|
19
|
+
tag: {
|
|
20
|
+
type: String,
|
|
21
|
+
default: 'div',
|
|
22
|
+
validator(value: string) {
|
|
23
|
+
return TAGS_ALLOWED.includes(value);
|
|
24
|
+
},
|
|
25
|
+
},
|
|
26
|
+
styleClassPassthrough: {
|
|
27
|
+
type: Array as PropType<string[]>,
|
|
28
|
+
default: () => [],
|
|
29
|
+
},
|
|
30
|
+
});
|
|
31
|
+
|
|
32
|
+
const { elementClasses, resetElementClasses } = useStyleClassPassthrough(props.styleClassPassthrough);
|
|
33
|
+
|
|
34
|
+
watch(
|
|
35
|
+
() => props.styleClassPassthrough,
|
|
36
|
+
() => {
|
|
37
|
+
resetElementClasses(props.styleClassPassthrough);
|
|
38
|
+
}
|
|
39
|
+
);
|
|
40
|
+
</script>
|
|
41
|
+
|
|
42
|
+
<style lang="css">
|
|
43
|
+
.display-banner {
|
|
44
|
+
display: grid;
|
|
45
|
+
grid-template-areas: 'banner';
|
|
46
|
+
container-type: inline-size;
|
|
47
|
+
|
|
48
|
+
.canvas {
|
|
49
|
+
grid-area: banner;
|
|
50
|
+
|
|
51
|
+
.image {
|
|
52
|
+
object-fit: cover;
|
|
53
|
+
width: 100%;
|
|
54
|
+
height: 100%;
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
.content {
|
|
59
|
+
grid-area: banner;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
</style>
|
|
@@ -8,7 +8,8 @@
|
|
|
8
8
|
<div v-if="showGallery" class="gallery-content" :class="[{ galleryLoaded: !galleryLoaded }]">
|
|
9
9
|
<div class="list" ref="sliderGalleryImagesList">
|
|
10
10
|
<div v-for="(item, index) in galleryData" :key="index" class="item">
|
|
11
|
-
<NuxtImg :src="item.src" :alt="item.alt" @load="handleImageLoad(index)" @error="handleImageError(index)"
|
|
11
|
+
<NuxtImg :src="item.src" :alt="item.alt" @load="handleImageLoad(index)" @error="handleImageError(index)"
|
|
12
|
+
loading="lazy" />
|
|
12
13
|
<div class="content">
|
|
13
14
|
<div class="author">{{ item.stylist }}</div>
|
|
14
15
|
<div class="title">{{ item.title }}</div>
|
|
@@ -27,15 +28,20 @@
|
|
|
27
28
|
<img :src="item.src" :alt="item.alt" loading="lazy" />
|
|
28
29
|
<div class="content">
|
|
29
30
|
<div class="title" v-show="item.thumbnail?.title !== ''">{{ item.thumbnail?.title }}</div>
|
|
30
|
-
<div class="description" v-show="item.thumbnail?.description !== ''">{{ item.thumbnail?.description }}
|
|
31
|
+
<div class="description" v-show="item.thumbnail?.description !== ''">{{ item.thumbnail?.description }}
|
|
32
|
+
</div>
|
|
31
33
|
</div>
|
|
32
34
|
</div>
|
|
33
35
|
</div>
|
|
34
36
|
</div>
|
|
35
37
|
|
|
36
38
|
<div class="arrows">
|
|
37
|
-
<button id="prev" ref="prevDom" @click.prevent="doPrevious()"
|
|
38
|
-
|
|
39
|
+
<button id="prev" ref="prevDom" @click.prevent="doPrevious()">
|
|
40
|
+
<Icon name="ic:outline-keyboard-arrow-left" class="arrows-icon" />
|
|
41
|
+
</button>
|
|
42
|
+
<button id="next" ref="nextDom" @click.prevent="doNext()">
|
|
43
|
+
<Icon name="ic:outline-keyboard-arrow-right" class="arrows-icon" />
|
|
44
|
+
</button>
|
|
39
45
|
</div>
|
|
40
46
|
|
|
41
47
|
<div class="time"></div>
|
|
@@ -474,24 +480,46 @@ onBeforeUnmount(() => {
|
|
|
474
480
|
width: 300px;
|
|
475
481
|
max-width: 30%;
|
|
476
482
|
display: flex;
|
|
477
|
-
gap:
|
|
483
|
+
gap: 20px;
|
|
478
484
|
align-items: center;
|
|
479
485
|
|
|
480
486
|
button {
|
|
487
|
+
display: grid;
|
|
488
|
+
justify-content: center;
|
|
489
|
+
align-items: center;
|
|
481
490
|
width: 40px;
|
|
482
491
|
height: 40px;
|
|
483
492
|
border-radius: 50%;
|
|
484
493
|
background-color: #eee4;
|
|
485
|
-
border: none;
|
|
486
494
|
color: #fff;
|
|
487
495
|
font-family: monospace;
|
|
488
496
|
font-weight: bold;
|
|
489
497
|
transition: 0.5s;
|
|
490
498
|
|
|
499
|
+
border-width: 2px;
|
|
500
|
+
border-style: solid;
|
|
501
|
+
border-color: white;
|
|
502
|
+
|
|
503
|
+
&#prev {
|
|
504
|
+
--_translateX: -2px;
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
&#next {
|
|
508
|
+
--_translateX: 2px;
|
|
509
|
+
}
|
|
510
|
+
|
|
491
511
|
&:hover {
|
|
492
512
|
background-color: #fff;
|
|
493
513
|
color: #000;
|
|
494
514
|
}
|
|
515
|
+
|
|
516
|
+
.arrows-icon {
|
|
517
|
+
color: currentColor;
|
|
518
|
+
font-weight: 900;
|
|
519
|
+
height: 40px;
|
|
520
|
+
width: 40px;
|
|
521
|
+
translate: var(--_translateX) -3px;
|
|
522
|
+
}
|
|
495
523
|
}
|
|
496
524
|
}
|
|
497
525
|
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "srcdev-nuxt-components",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "2.
|
|
4
|
+
"version": "2.4.0",
|
|
5
5
|
"main": "nuxt.config.ts",
|
|
6
6
|
"scripts": {
|
|
7
7
|
"clean": "rm -rf .nuxt && rm -rf .output && rm -rf .playground/.nuxt && rm -rf .playground/.output",
|
|
@@ -27,18 +27,18 @@
|
|
|
27
27
|
"devDependencies": {
|
|
28
28
|
"@iconify-json/akar-icons": "1.2.2",
|
|
29
29
|
"@iconify-json/bitcoin-icons": "1.2.2",
|
|
30
|
-
"@nuxt/eslint": "
|
|
31
|
-
"@nuxt/eslint-config": "1.
|
|
32
|
-
"@nuxt/icon": "1.
|
|
30
|
+
"@nuxt/eslint": "1.3.0",
|
|
31
|
+
"@nuxt/eslint-config": "1.3.0",
|
|
32
|
+
"@nuxt/icon": "1.12.0",
|
|
33
33
|
"@nuxt/image": "1.10.0",
|
|
34
34
|
"happy-dom": "16.8.1",
|
|
35
|
-
"nuxt": "3.
|
|
35
|
+
"nuxt": "3.17.2",
|
|
36
36
|
"release-it": "18.1.2",
|
|
37
|
-
"typescript": "5.8.
|
|
37
|
+
"typescript": "5.8.3"
|
|
38
38
|
},
|
|
39
39
|
"dependencies": {
|
|
40
|
-
"@oddbird/css-anchor-positioning": "0.
|
|
41
|
-
"@vueuse/core": "13.
|
|
40
|
+
"@oddbird/css-anchor-positioning": "0.6.0",
|
|
41
|
+
"@vueuse/core": "13.1.0",
|
|
42
42
|
"focus-trap-vue": "4.0.3",
|
|
43
43
|
"modern-normalize": "3.0.1"
|
|
44
44
|
},
|