@d0rich/esprit-design 0.2.1 → 0.2.3
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/CHANGELOG.md +31 -0
- package/dist/components/DChip.vue.d.ts +2 -0
- package/dist/components/DPagination.vue.d.ts +30 -0
- package/dist/components/DStats.vue.d.ts +27 -0
- package/dist/components/animations/DAnimationAccordion.vue.d.ts +23 -0
- package/dist/components/animations/DAnimationDefLetterD.vue.d.ts +2 -0
- package/dist/components/animations/DAnimationFloatingLetter.vue.d.ts +23 -0
- package/dist/components/animations/DAnimationHypnosis.vue.d.ts +23 -0
- package/dist/components/animations/DAnimationSpinner.vue.d.ts +23 -0
- package/dist/components/animations/index.d.ts +5 -0
- package/dist/components/buttons/DBigBangButton.vue.d.ts +35 -0
- package/dist/components/buttons/DBigBangButtonAnimation.vue.d.ts +2 -0
- package/dist/components/buttons/DBtn.vue.d.ts +97 -0
- package/dist/components/buttons/index.d.ts +4 -0
- package/dist/components/cards/DCard.vue.d.ts +24 -0
- package/dist/components/cards/DCardTitle.vue.d.ts +2 -0
- package/dist/components/cards/index.d.ts +3 -0
- package/dist/components/content/DAlert.vue.d.ts +21 -0
- package/dist/components/content/DQuote.vue.d.ts +21 -0
- package/dist/components/content/index.d.ts +3 -0
- package/dist/components/index.d.ts +10 -0
- package/dist/components/lists/DActionsFan.vue.d.ts +55 -0
- package/dist/components/lists/DActionsList.vue.d.ts +50 -0
- package/dist/components/lists/index.d.ts +3 -0
- package/dist/components/utils/DWrapBackground.vue.d.ts +68 -0
- package/dist/components/utils/DWrapFocusHighlight.vue.d.ts +67 -0
- package/dist/components/utils/DWrapShape.vue.d.ts +33 -0
- package/dist/components/utils/index.d.ts +4 -0
- package/dist/composables/big-bang-button-utils.d.ts +3 -0
- package/dist/composables/index.d.ts +2 -0
- package/dist/composables/router.d.ts +17 -0
- package/dist/composables/utils.d.ts +4 -0
- package/dist/esprit-design.js +4595 -0
- package/dist/esprit-design.umd.cjs +17 -0
- package/dist/index.d.ts +3 -0
- package/dist/style.css +1 -0
- package/dist/utils/boundings.d.ts +16 -0
- package/dist/utils/index.d.ts +3 -0
- package/dist/utils/pagination.d.ts +1 -0
- package/dist/utils/polygon-animation.d.ts +53 -0
- package/index.html +13 -0
- package/package.json +1 -4
- package/plugins/shadows.js +87 -0
- package/src/components/DChip.vue +32 -0
- package/src/components/DPagination.vue +91 -0
- package/src/components/DStats.vue +502 -0
- package/src/components/animations/DAnimationAccordion.vue +103 -0
- package/src/components/animations/DAnimationDefLetterD.vue +11 -0
- package/src/components/animations/DAnimationFloatingLetter.vue +58 -0
- package/src/components/animations/DAnimationHypnosis.vue +102 -0
- package/src/components/animations/DAnimationSpinner.vue +114 -0
- package/src/components/animations/index.ts +11 -0
- package/src/components/buttons/DBigBangButton.vue +70 -0
- package/src/components/buttons/DBigBangButtonAnimation.vue +117 -0
- package/src/components/buttons/DBtn.vue +106 -0
- package/src/components/buttons/index.ts +5 -0
- package/src/components/cards/DCard.vue +98 -0
- package/src/components/cards/DCardTitle.vue +67 -0
- package/src/components/cards/index.ts +4 -0
- package/src/components/content/DAlert.vue +112 -0
- package/src/components/content/DQuote.vue +71 -0
- package/src/components/content/index.ts +4 -0
- package/src/components/index.ts +12 -0
- package/src/components/lists/DActionsFan.vue +153 -0
- package/src/components/lists/DActionsList.vue +100 -0
- package/src/components/lists/index.ts +4 -0
- package/src/components/utils/DWrapBackground.vue +76 -0
- package/src/components/utils/DWrapFocusHighlight.vue +241 -0
- package/src/components/utils/DWrapShape.vue +170 -0
- package/src/components/utils/index.ts +7 -0
- package/src/composables/big-bang-button-utils.ts +7 -0
- package/src/composables/index.ts +2 -0
- package/src/composables/router.ts +66 -0
- package/src/composables/utils.ts +5 -0
- package/src/index.ts +3 -0
- package/src/style.css +3 -0
- package/src/utils/boundings.ts +35 -0
- package/src/utils/index.ts +3 -0
- package/src/utils/pagination.ts +4 -0
- package/src/utils/polygon-animation.ts +139 -0
- package/src/vite-env.d.ts +1 -0
- package/tailwind.config.js +22 -0
- package/tsconfig.json +25 -0
- package/tsconfig.node.json +10 -0
- package/vite.config.ts +35 -0
|
@@ -0,0 +1,91 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { computed } from 'vue'
|
|
3
|
+
import { Icon } from '@iconify/vue'
|
|
4
|
+
import { useDPaginationUtils } from '../composables/utils'
|
|
5
|
+
import DBtn from './buttons/DBtn.vue'
|
|
6
|
+
|
|
7
|
+
export default {
|
|
8
|
+
name: 'DPagination',
|
|
9
|
+
components: {
|
|
10
|
+
DBtn,
|
|
11
|
+
Icon
|
|
12
|
+
}
|
|
13
|
+
}
|
|
14
|
+
</script>
|
|
15
|
+
|
|
16
|
+
<script setup lang="ts">
|
|
17
|
+
const props = defineProps({
|
|
18
|
+
currentPage: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 1
|
|
21
|
+
},
|
|
22
|
+
allPages: {
|
|
23
|
+
type: Number,
|
|
24
|
+
required: true
|
|
25
|
+
},
|
|
26
|
+
baseLink: {
|
|
27
|
+
type: String,
|
|
28
|
+
required: true
|
|
29
|
+
}
|
|
30
|
+
})
|
|
31
|
+
|
|
32
|
+
const { getLinkToPaginatedPage } = useDPaginationUtils()
|
|
33
|
+
|
|
34
|
+
function getLinkToPage(page: number) {
|
|
35
|
+
return getLinkToPaginatedPage(props.baseLink, page)
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const visiblePages = computed(() => {
|
|
39
|
+
return Array.from({ length: 7 }, (_, i) => i - 3 + props.currentPage).filter(
|
|
40
|
+
(num) => num >= 1 && num <= props.allPages
|
|
41
|
+
)
|
|
42
|
+
})
|
|
43
|
+
</script>
|
|
44
|
+
|
|
45
|
+
<template>
|
|
46
|
+
<nav class="w-fit text-2xl font-bold">
|
|
47
|
+
<DBtn
|
|
48
|
+
v-if="currentPage > 1"
|
|
49
|
+
class="inline-block mx-1"
|
|
50
|
+
:to="getLinkToPage(currentPage - 1)"
|
|
51
|
+
aria-label="Previous page"
|
|
52
|
+
>
|
|
53
|
+
<Icon icon="ic:baseline-arrow-back-ios" />
|
|
54
|
+
</DBtn>
|
|
55
|
+
<DBtn
|
|
56
|
+
v-if="!visiblePages.includes(1)"
|
|
57
|
+
class="inline-block mx-1"
|
|
58
|
+
:to="getLinkToPage(1)"
|
|
59
|
+
aria-label="First page"
|
|
60
|
+
>
|
|
61
|
+
1
|
|
62
|
+
</DBtn>
|
|
63
|
+
<span v-if="!visiblePages.includes(1)" class="mx-1"> ... </span>
|
|
64
|
+
<DBtn
|
|
65
|
+
v-for="number in visiblePages"
|
|
66
|
+
:key="number"
|
|
67
|
+
class="inline-block mx-1"
|
|
68
|
+
:to="getLinkToPage(number)"
|
|
69
|
+
:aria-label="`Page ${number}`"
|
|
70
|
+
>
|
|
71
|
+
{{ number }}
|
|
72
|
+
</DBtn>
|
|
73
|
+
<span v-if="!visiblePages.includes(allPages)" class="mx-1"> ... </span>
|
|
74
|
+
<DBtn
|
|
75
|
+
v-if="!visiblePages.includes(allPages)"
|
|
76
|
+
class="inline-block mx-1"
|
|
77
|
+
:to="getLinkToPage(allPages)"
|
|
78
|
+
:aria-label="`Last page (${allPages})`"
|
|
79
|
+
>
|
|
80
|
+
{{ allPages }}
|
|
81
|
+
</DBtn>
|
|
82
|
+
<DBtn
|
|
83
|
+
v-if="currentPage < allPages"
|
|
84
|
+
class="inline-block mx-1"
|
|
85
|
+
:to="getLinkToPage(currentPage + 1)"
|
|
86
|
+
aria-label="Next page"
|
|
87
|
+
>
|
|
88
|
+
<Icon icon="ic:baseline-arrow-forward-ios" />
|
|
89
|
+
</DBtn>
|
|
90
|
+
</nav>
|
|
91
|
+
</template>
|
|
@@ -0,0 +1,502 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import { ref, computed } from 'vue'
|
|
3
|
+
import { Icon } from '@iconify/vue'
|
|
4
|
+
|
|
5
|
+
export default {
|
|
6
|
+
name: 'DStats',
|
|
7
|
+
components: {
|
|
8
|
+
Icon
|
|
9
|
+
}
|
|
10
|
+
}
|
|
11
|
+
</script>
|
|
12
|
+
|
|
13
|
+
<script setup lang="ts">
|
|
14
|
+
export type StatsProps = {
|
|
15
|
+
groupTitle?: string
|
|
16
|
+
titles: string[]
|
|
17
|
+
values: number[]
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const props = defineProps<StatsProps>()
|
|
21
|
+
|
|
22
|
+
const fullStarPoints = ref<number[][]>([
|
|
23
|
+
[500, 0], // 1
|
|
24
|
+
[630, 330], // 1-2
|
|
25
|
+
[980, 350], // 2
|
|
26
|
+
[700, 590], // 2-3
|
|
27
|
+
[790, 910], // 3
|
|
28
|
+
[500, 720], // 3-4
|
|
29
|
+
[210, 910], // 4
|
|
30
|
+
[300, 590], // 4-5
|
|
31
|
+
[20, 350], // 5
|
|
32
|
+
[370, 330] // 5-1
|
|
33
|
+
])
|
|
34
|
+
const scales = ref<number[]>([1, 0.8, 0.6, 0.4, 0.27])
|
|
35
|
+
const posToIndex = {
|
|
36
|
+
'1': 0,
|
|
37
|
+
'1-2': 1,
|
|
38
|
+
'2': 2,
|
|
39
|
+
'2-3': 3,
|
|
40
|
+
'3': 4,
|
|
41
|
+
'3-4': 5,
|
|
42
|
+
'4': 6,
|
|
43
|
+
'4-5': 7,
|
|
44
|
+
'5': 8,
|
|
45
|
+
'5-1': 9
|
|
46
|
+
}
|
|
47
|
+
const center = [500, 500]
|
|
48
|
+
function pointsToString(points: number[][]) {
|
|
49
|
+
return points.map((pair) => pair.join(',')).join(' ')
|
|
50
|
+
}
|
|
51
|
+
function shrinkStar(points: number[][], scale: number, cx = 500, cy = 500) {
|
|
52
|
+
return points.map((coords) => {
|
|
53
|
+
return [
|
|
54
|
+
coords[0] - (coords[0] - cx) * (1 - scale),
|
|
55
|
+
coords[1] - (coords[1] - cy) * (1 - scale)
|
|
56
|
+
]
|
|
57
|
+
})
|
|
58
|
+
}
|
|
59
|
+
const scaledStars = computed(() => {
|
|
60
|
+
return scales.value.map((scale) => shrinkStar(fullStarPoints.value, scale))
|
|
61
|
+
})
|
|
62
|
+
function starFromValue(value: number) {
|
|
63
|
+
return scaledStars.value[5 - value]
|
|
64
|
+
}
|
|
65
|
+
function statFromIndex(index: number) {
|
|
66
|
+
return {
|
|
67
|
+
value: props.values ? props.values[index] ?? 1 : 1,
|
|
68
|
+
title: props.titles ? props.titles[index] ?? '' : ''
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
const firstStat = computed(() => statFromIndex(0))
|
|
72
|
+
const secondStat = computed(() => statFromIndex(1))
|
|
73
|
+
const thirdStat = computed(() => statFromIndex(2))
|
|
74
|
+
const forthStat = computed(() => statFromIndex(3))
|
|
75
|
+
const fifthStat = computed(() => statFromIndex(4))
|
|
76
|
+
</script>
|
|
77
|
+
|
|
78
|
+
<template>
|
|
79
|
+
<figure class="max-w-full">
|
|
80
|
+
<div class="stats__print-value">
|
|
81
|
+
<div class="stats__print-value__group-title">{{ groupTitle }}</div>
|
|
82
|
+
<div>
|
|
83
|
+
<div
|
|
84
|
+
v-for="(skill, index) in titles"
|
|
85
|
+
:key="skill"
|
|
86
|
+
class="stats__print-value__skill"
|
|
87
|
+
>
|
|
88
|
+
<div>{{ skill }}</div>
|
|
89
|
+
<div>
|
|
90
|
+
<Icon v-for="n in values[index]" :key="n" icon="ic:sharp-star" />
|
|
91
|
+
<Icon
|
|
92
|
+
v-for="n in 5 - values[index]"
|
|
93
|
+
:key="n"
|
|
94
|
+
icon="ic:sharp-star-border"
|
|
95
|
+
/>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</div>
|
|
99
|
+
</div>
|
|
100
|
+
<div class="stats__print-value--small">
|
|
101
|
+
<span
|
|
102
|
+
v-for="(skill, index) in titles"
|
|
103
|
+
:key="skill"
|
|
104
|
+
class="stats__print-value--small__skill"
|
|
105
|
+
:class="{
|
|
106
|
+
'stats__print-value--small__skill--hidden': values[index] < 3,
|
|
107
|
+
'stats__print-value--small__skill--3': values[index] === 3,
|
|
108
|
+
'stats__print-value--small__skill--4': values[index] === 4,
|
|
109
|
+
'stats__print-value--small__skill--5': values[index] === 5
|
|
110
|
+
}"
|
|
111
|
+
>
|
|
112
|
+
{{ skill }}
|
|
113
|
+
</span>
|
|
114
|
+
</div>
|
|
115
|
+
<div class="stats">
|
|
116
|
+
<svg viewBox="-500 -500 2000 2000" xmlns="http://www.w3.org/2000/svg">
|
|
117
|
+
<polygon
|
|
118
|
+
points="100,-350 1500,-500 1000,1350 -500,1500"
|
|
119
|
+
class="stats__bg"
|
|
120
|
+
/>
|
|
121
|
+
<polygon
|
|
122
|
+
:points="pointsToString(shrinkStar(fullStarPoints, 2))"
|
|
123
|
+
class="stats__bg-star--odd"
|
|
124
|
+
/>
|
|
125
|
+
<!-- Stats bg -->
|
|
126
|
+
<g>
|
|
127
|
+
<polygon
|
|
128
|
+
v-for="(star, index) in scaledStars"
|
|
129
|
+
:key="index"
|
|
130
|
+
:points="pointsToString(star)"
|
|
131
|
+
:class="{
|
|
132
|
+
'stats__bg-star--odd': index % 2,
|
|
133
|
+
'stats__bg-star--even': !(index % 2)
|
|
134
|
+
}"
|
|
135
|
+
/>
|
|
136
|
+
</g>
|
|
137
|
+
<!-- Stats value -->
|
|
138
|
+
<g>
|
|
139
|
+
<!-- 1 -->
|
|
140
|
+
<g class="stats__single-stat">
|
|
141
|
+
<polygon
|
|
142
|
+
:points="
|
|
143
|
+
pointsToString([
|
|
144
|
+
starFromValue(firstStat.value)[posToIndex['1']],
|
|
145
|
+
starFromValue(Math.min(firstStat.value, fifthStat.value))[
|
|
146
|
+
posToIndex['5-1']
|
|
147
|
+
],
|
|
148
|
+
center
|
|
149
|
+
])
|
|
150
|
+
"
|
|
151
|
+
class="stats__star--dark"
|
|
152
|
+
/>
|
|
153
|
+
<polygon
|
|
154
|
+
:points="
|
|
155
|
+
pointsToString([
|
|
156
|
+
starFromValue(firstStat.value)[posToIndex['1']],
|
|
157
|
+
starFromValue(Math.min(firstStat.value, secondStat.value))[
|
|
158
|
+
posToIndex['1-2']
|
|
159
|
+
],
|
|
160
|
+
center
|
|
161
|
+
])
|
|
162
|
+
"
|
|
163
|
+
class="stats__star--light"
|
|
164
|
+
/>
|
|
165
|
+
</g>
|
|
166
|
+
<!-- 2 -->
|
|
167
|
+
<g class="stats__single-stat">
|
|
168
|
+
<polygon
|
|
169
|
+
:points="
|
|
170
|
+
pointsToString([
|
|
171
|
+
starFromValue(secondStat.value)[posToIndex['2']],
|
|
172
|
+
starFromValue(Math.min(firstStat.value, secondStat.value))[
|
|
173
|
+
posToIndex['1-2']
|
|
174
|
+
],
|
|
175
|
+
center
|
|
176
|
+
])
|
|
177
|
+
"
|
|
178
|
+
class="stats__star--light"
|
|
179
|
+
/>
|
|
180
|
+
<polygon
|
|
181
|
+
:points="
|
|
182
|
+
pointsToString([
|
|
183
|
+
starFromValue(secondStat.value)[posToIndex['2']],
|
|
184
|
+
starFromValue(Math.min(thirdStat.value, secondStat.value))[
|
|
185
|
+
posToIndex['2-3']
|
|
186
|
+
],
|
|
187
|
+
center
|
|
188
|
+
])
|
|
189
|
+
"
|
|
190
|
+
class="stats__star--dark"
|
|
191
|
+
/>
|
|
192
|
+
</g>
|
|
193
|
+
<!-- 3 -->
|
|
194
|
+
<g class="stats__single-stat">
|
|
195
|
+
<polygon
|
|
196
|
+
:points="
|
|
197
|
+
pointsToString([
|
|
198
|
+
starFromValue(thirdStat.value)[posToIndex['3']],
|
|
199
|
+
starFromValue(Math.min(secondStat.value, thirdStat.value))[
|
|
200
|
+
posToIndex['2-3']
|
|
201
|
+
],
|
|
202
|
+
center
|
|
203
|
+
])
|
|
204
|
+
"
|
|
205
|
+
class="stats__star--light"
|
|
206
|
+
/>
|
|
207
|
+
<polygon
|
|
208
|
+
:points="
|
|
209
|
+
pointsToString([
|
|
210
|
+
starFromValue(thirdStat.value)[posToIndex['3']],
|
|
211
|
+
starFromValue(Math.min(thirdStat.value, forthStat.value))[
|
|
212
|
+
posToIndex['3-4']
|
|
213
|
+
],
|
|
214
|
+
center
|
|
215
|
+
])
|
|
216
|
+
"
|
|
217
|
+
class="stats__star--dark"
|
|
218
|
+
/>
|
|
219
|
+
</g>
|
|
220
|
+
<!-- 4 -->
|
|
221
|
+
<g class="stats__single-stat">
|
|
222
|
+
<polygon
|
|
223
|
+
:points="
|
|
224
|
+
pointsToString([
|
|
225
|
+
starFromValue(forthStat.value)[posToIndex['4']],
|
|
226
|
+
starFromValue(Math.min(thirdStat.value, forthStat.value))[
|
|
227
|
+
posToIndex['3-4']
|
|
228
|
+
],
|
|
229
|
+
center
|
|
230
|
+
])
|
|
231
|
+
"
|
|
232
|
+
class="stats__star--light"
|
|
233
|
+
/>
|
|
234
|
+
<polygon
|
|
235
|
+
:points="
|
|
236
|
+
pointsToString([
|
|
237
|
+
starFromValue(forthStat.value)[posToIndex['4']],
|
|
238
|
+
starFromValue(Math.min(forthStat.value, fifthStat.value))[
|
|
239
|
+
posToIndex['4-5']
|
|
240
|
+
],
|
|
241
|
+
center
|
|
242
|
+
])
|
|
243
|
+
"
|
|
244
|
+
class="stats__star--dark"
|
|
245
|
+
/>
|
|
246
|
+
</g>
|
|
247
|
+
<!-- 5 -->
|
|
248
|
+
<g class="stats__single-stat">
|
|
249
|
+
<polygon
|
|
250
|
+
:points="
|
|
251
|
+
pointsToString([
|
|
252
|
+
starFromValue(fifthStat.value)[posToIndex['5']],
|
|
253
|
+
starFromValue(Math.min(forthStat.value, fifthStat.value))[
|
|
254
|
+
posToIndex['4-5']
|
|
255
|
+
],
|
|
256
|
+
center
|
|
257
|
+
])
|
|
258
|
+
"
|
|
259
|
+
class="stats__star--dark"
|
|
260
|
+
/>
|
|
261
|
+
<polygon
|
|
262
|
+
:points="
|
|
263
|
+
pointsToString([
|
|
264
|
+
starFromValue(fifthStat.value)[posToIndex['5']],
|
|
265
|
+
starFromValue(Math.min(fifthStat.value, firstStat.value))[
|
|
266
|
+
posToIndex['5-1']
|
|
267
|
+
],
|
|
268
|
+
center
|
|
269
|
+
])
|
|
270
|
+
"
|
|
271
|
+
class="stats__star--light"
|
|
272
|
+
/>
|
|
273
|
+
</g>
|
|
274
|
+
</g>
|
|
275
|
+
</svg>
|
|
276
|
+
<div class="stats__images">
|
|
277
|
+
<div class="stats__image"><slot name="icon-1" /></div>
|
|
278
|
+
<div class="stats__image"><slot name="icon-2" /></div>
|
|
279
|
+
<div class="stats__image"><slot name="icon-3" /></div>
|
|
280
|
+
<div class="stats__image"><slot name="icon-4" /></div>
|
|
281
|
+
<div class="stats__image"><slot name="icon-5" /></div>
|
|
282
|
+
</div>
|
|
283
|
+
<svg
|
|
284
|
+
viewBox="-500 -500 2000 2000"
|
|
285
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
286
|
+
class="stats_titles-layer"
|
|
287
|
+
>
|
|
288
|
+
<text x="-500" y="-300" class="stats__group-title">
|
|
289
|
+
{{ groupTitle }}
|
|
290
|
+
</text>
|
|
291
|
+
<g>
|
|
292
|
+
<text
|
|
293
|
+
:x="fullStarPoints[posToIndex['1']][0]"
|
|
294
|
+
:y="fullStarPoints[posToIndex['1']][1] - 100"
|
|
295
|
+
:transform-origin="`${fullStarPoints[posToIndex['1']][0]} ${
|
|
296
|
+
fullStarPoints[posToIndex['1']][1] - 100
|
|
297
|
+
}`"
|
|
298
|
+
class="stats__title"
|
|
299
|
+
>
|
|
300
|
+
{{ firstStat.title }}
|
|
301
|
+
<tspan class="stats__title__value">{{ firstStat.value }}</tspan>
|
|
302
|
+
</text>
|
|
303
|
+
<text
|
|
304
|
+
:x="fullStarPoints[posToIndex['2']][0] + 100"
|
|
305
|
+
:y="fullStarPoints[posToIndex['2']][1] - 100"
|
|
306
|
+
:transform-origin="`${fullStarPoints[posToIndex['2']][0] + 100} ${
|
|
307
|
+
fullStarPoints[posToIndex['2']][1] - 100
|
|
308
|
+
}`"
|
|
309
|
+
class="stats__title"
|
|
310
|
+
>
|
|
311
|
+
{{ secondStat.title }}
|
|
312
|
+
<tspan class="stats__title__value">{{ secondStat.value }}</tspan>
|
|
313
|
+
</text>
|
|
314
|
+
<text
|
|
315
|
+
dominant-baseline="hanging"
|
|
316
|
+
:x="fullStarPoints[posToIndex['3']][0] + 150"
|
|
317
|
+
:y="fullStarPoints[posToIndex['3']][1] + 150"
|
|
318
|
+
:transform-origin="`${fullStarPoints[posToIndex['3']][0] + 150} ${
|
|
319
|
+
fullStarPoints[posToIndex['3']][1] + 150
|
|
320
|
+
}`"
|
|
321
|
+
class="stats__title"
|
|
322
|
+
>
|
|
323
|
+
{{ thirdStat.title }}
|
|
324
|
+
<tspan class="stats__title__value">{{ thirdStat.value }}</tspan>
|
|
325
|
+
</text>
|
|
326
|
+
<text
|
|
327
|
+
dominant-baseline="hanging"
|
|
328
|
+
:x="fullStarPoints[posToIndex['4']][0] - 150"
|
|
329
|
+
:y="fullStarPoints[posToIndex['4']][1] + 150"
|
|
330
|
+
:transform-origin="`${fullStarPoints[posToIndex['4']][0] - 150} ${
|
|
331
|
+
fullStarPoints[posToIndex['4']][1] + 150
|
|
332
|
+
}`"
|
|
333
|
+
class="stats__title"
|
|
334
|
+
>
|
|
335
|
+
{{ forthStat.title }}
|
|
336
|
+
<tspan class="stats__title__value">{{ forthStat.value }}</tspan>
|
|
337
|
+
</text>
|
|
338
|
+
<text
|
|
339
|
+
:x="fullStarPoints[posToIndex['5']][0] - 100"
|
|
340
|
+
:y="fullStarPoints[posToIndex['5']][1] - 100"
|
|
341
|
+
:transform-origin="`${fullStarPoints[posToIndex['5']][0] - 100} ${
|
|
342
|
+
fullStarPoints[posToIndex['5']][1] - 100
|
|
343
|
+
}`"
|
|
344
|
+
class="stats__title"
|
|
345
|
+
>
|
|
346
|
+
{{ fifthStat.title }}
|
|
347
|
+
<tspan class="stats__title__value">{{ fifthStat.value }}</tspan>
|
|
348
|
+
</text>
|
|
349
|
+
</g>
|
|
350
|
+
</svg>
|
|
351
|
+
</div>
|
|
352
|
+
</figure>
|
|
353
|
+
</template>
|
|
354
|
+
|
|
355
|
+
<style>
|
|
356
|
+
.stats {
|
|
357
|
+
@apply relative print:hidden;
|
|
358
|
+
}
|
|
359
|
+
|
|
360
|
+
.stats__bg {
|
|
361
|
+
@apply fill-neutral-900;
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
.stats__bg-star--odd {
|
|
365
|
+
@apply fill-neutral-500;
|
|
366
|
+
}
|
|
367
|
+
|
|
368
|
+
.stats__bg-star--even {
|
|
369
|
+
@apply fill-neutral-800;
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
.stats__single-stat:hover {
|
|
373
|
+
animation: single-stat-hover 1.5s ease-in-out infinite;
|
|
374
|
+
}
|
|
375
|
+
.stats__star--light {
|
|
376
|
+
@apply fill-yellow-400;
|
|
377
|
+
}
|
|
378
|
+
|
|
379
|
+
.stats__star--dark {
|
|
380
|
+
@apply fill-yellow-600;
|
|
381
|
+
}
|
|
382
|
+
@keyframes single-stat-hover {
|
|
383
|
+
0% {
|
|
384
|
+
filter: brightness(1);
|
|
385
|
+
}
|
|
386
|
+
50% {
|
|
387
|
+
filter: brightness(1.35);
|
|
388
|
+
}
|
|
389
|
+
100% {
|
|
390
|
+
filter: brightness(1);
|
|
391
|
+
}
|
|
392
|
+
}
|
|
393
|
+
|
|
394
|
+
.stats__images {
|
|
395
|
+
@apply absolute inset-0 pointer-events-none;
|
|
396
|
+
}
|
|
397
|
+
|
|
398
|
+
.stats__image {
|
|
399
|
+
width: 20%;
|
|
400
|
+
height: 20%;
|
|
401
|
+
@apply absolute;
|
|
402
|
+
}
|
|
403
|
+
|
|
404
|
+
.stats__image:nth-child(1) {
|
|
405
|
+
top: 2%;
|
|
406
|
+
left: 50%;
|
|
407
|
+
}
|
|
408
|
+
|
|
409
|
+
.stats__image:nth-child(2) {
|
|
410
|
+
top: 20%;
|
|
411
|
+
right: 6%;
|
|
412
|
+
}
|
|
413
|
+
|
|
414
|
+
.stats__image:nth-child(3) {
|
|
415
|
+
bottom: 8%;
|
|
416
|
+
right: 30%;
|
|
417
|
+
}
|
|
418
|
+
|
|
419
|
+
.stats__image:nth-child(4) {
|
|
420
|
+
bottom: 4%;
|
|
421
|
+
left: 10%;
|
|
422
|
+
}
|
|
423
|
+
|
|
424
|
+
.stats__image:nth-child(5) {
|
|
425
|
+
top: 30%;
|
|
426
|
+
left: 6%;
|
|
427
|
+
}
|
|
428
|
+
|
|
429
|
+
.stats_titles-layer {
|
|
430
|
+
@apply absolute inset-0 pointer-events-none;
|
|
431
|
+
}
|
|
432
|
+
|
|
433
|
+
.stats__group-title {
|
|
434
|
+
font-size: 150px;
|
|
435
|
+
paint-order: stroke;
|
|
436
|
+
text-anchor: start;
|
|
437
|
+
dominant-baseline: text-bottom;
|
|
438
|
+
font-weight: 900;
|
|
439
|
+
stroke-width: 20;
|
|
440
|
+
@apply fill-black font-sans stroke-yellow-500;
|
|
441
|
+
}
|
|
442
|
+
|
|
443
|
+
.stats__title {
|
|
444
|
+
font-size: 100px;
|
|
445
|
+
paint-order: stroke;
|
|
446
|
+
text-anchor: middle;
|
|
447
|
+
dominant-baseline: text-top;
|
|
448
|
+
font-weight: 900;
|
|
449
|
+
stroke-width: 20;
|
|
450
|
+
rotate: 5deg;
|
|
451
|
+
@apply fill-black font-sans stroke-yellow-500;
|
|
452
|
+
}
|
|
453
|
+
|
|
454
|
+
.stats__title__value {
|
|
455
|
+
font-size: 80px;
|
|
456
|
+
stroke-width: 20;
|
|
457
|
+
stroke-linejoin: round;
|
|
458
|
+
}
|
|
459
|
+
</style>
|
|
460
|
+
|
|
461
|
+
<style>
|
|
462
|
+
.stats__print-value {
|
|
463
|
+
@apply hidden print:block;
|
|
464
|
+
}
|
|
465
|
+
.stats__print-value__group-title {
|
|
466
|
+
@apply text-lg font-bold;
|
|
467
|
+
}
|
|
468
|
+
.stats__print-value__skill {
|
|
469
|
+
@apply grid grid-cols-[1fr_auto] items-center gap-x-4 gap-y-1;
|
|
470
|
+
}
|
|
471
|
+
.stats__print-value--small {
|
|
472
|
+
@apply hidden flex-wrap gap-2 items-center;
|
|
473
|
+
}
|
|
474
|
+
|
|
475
|
+
.stats__print-value--small__skill {
|
|
476
|
+
@apply rounded text-white p-[.3em];
|
|
477
|
+
}
|
|
478
|
+
|
|
479
|
+
.stats__print-value--small__skill--hidden {
|
|
480
|
+
@apply hidden;
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
.stats__print-value--small__skill--3 {
|
|
484
|
+
@apply bg-blue-500 text-xs;
|
|
485
|
+
}
|
|
486
|
+
|
|
487
|
+
.stats__print-value--small__skill--4 {
|
|
488
|
+
@apply bg-blue-600 text-sm;
|
|
489
|
+
}
|
|
490
|
+
|
|
491
|
+
.stats__print-value--small__skill--5 {
|
|
492
|
+
@apply bg-blue-700 text-base;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
.small-print-stats .stats__print-value {
|
|
496
|
+
@apply print:hidden;
|
|
497
|
+
}
|
|
498
|
+
|
|
499
|
+
.small-print-stats .stats__print-value--small {
|
|
500
|
+
@apply print:flex;
|
|
501
|
+
}
|
|
502
|
+
</style>
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
import DAnimationDefLetterD from './DAnimationDefLetterD.vue'
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
name: 'DAnimationAccordion',
|
|
6
|
+
components: {
|
|
7
|
+
DAnimationDefLetterD
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
</script>
|
|
11
|
+
|
|
12
|
+
<script setup lang="ts">
|
|
13
|
+
defineProps({
|
|
14
|
+
wigglePeriod: {
|
|
15
|
+
type: Number,
|
|
16
|
+
default: 10
|
|
17
|
+
},
|
|
18
|
+
delay: {
|
|
19
|
+
type: Number,
|
|
20
|
+
default: 1
|
|
21
|
+
}
|
|
22
|
+
})
|
|
23
|
+
</script>
|
|
24
|
+
|
|
25
|
+
<template>
|
|
26
|
+
<svg
|
|
27
|
+
viewBox="0 0 630 210"
|
|
28
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
29
|
+
class="d-animation-accordion"
|
|
30
|
+
:style="{
|
|
31
|
+
'--d-accordion-wiggle-period': wigglePeriod + 's',
|
|
32
|
+
'--d-accordion-delay': delay + 's'
|
|
33
|
+
}"
|
|
34
|
+
>
|
|
35
|
+
<defs>
|
|
36
|
+
<DAnimationDefLetterD id="d-letter" />
|
|
37
|
+
<use id="d-accordion-section" href="#d-letter" transform="scale(0.33)" />
|
|
38
|
+
</defs>
|
|
39
|
+
<use href="#d-accordion-section" class="d-animation-accordion__section" />
|
|
40
|
+
<use href="#d-accordion-section" class="d-animation-accordion__section" />
|
|
41
|
+
<use href="#d-accordion-section" class="d-animation-accordion__section" />
|
|
42
|
+
<use href="#d-accordion-section" class="d-animation-accordion__section" />
|
|
43
|
+
<use href="#d-accordion-section" class="d-animation-accordion__section" />
|
|
44
|
+
<use href="#d-accordion-section" class="d-animation-accordion__section" />
|
|
45
|
+
</svg>
|
|
46
|
+
</template>
|
|
47
|
+
|
|
48
|
+
<style>
|
|
49
|
+
.d-animation-accordion > .d-animation-accordion__section {
|
|
50
|
+
--accordion-section-min-posion: translate(
|
|
51
|
+
calc(var(--accordion-section-count) * 50px),
|
|
52
|
+
0
|
|
53
|
+
);
|
|
54
|
+
--accordion-section-max-posion: translate(
|
|
55
|
+
calc(var(--accordion-section-count) * 70px),
|
|
56
|
+
0
|
|
57
|
+
);
|
|
58
|
+
transform: var(--accordion-section-min-posion);
|
|
59
|
+
animation: d-animation-accordion-section-wiggle
|
|
60
|
+
var(--d-accordion-wiggle-period) ease-in-out infinite alternate
|
|
61
|
+
calc((var(--accordion-section-count) - 1) * var(--d-accordion-delay));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
.d-animation-accordion > .d-animation-accordion__section:nth-child(2n + 1) {
|
|
65
|
+
@apply fill-white;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
.d-animation-accordion > .d-animation-accordion__section:nth-child(2) {
|
|
69
|
+
--accordion-section-count: 1;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
.d-animation-accordion > .d-animation-accordion__section:nth-child(3) {
|
|
73
|
+
--accordion-section-count: 2;
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
.d-animation-accordion > .d-animation-accordion__section:nth-child(4) {
|
|
77
|
+
--accordion-section-count: 3;
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
.d-animation-accordion > .d-animation-accordion__section:nth-child(5) {
|
|
81
|
+
--accordion-section-count: 4;
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
.d-animation-accordion > .d-animation-accordion__section:nth-child(6) {
|
|
85
|
+
--accordion-section-count: 5;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
.d-animation-accordion > .d-animation-accordion__section:nth-child(7) {
|
|
89
|
+
--accordion-section-count: 6;
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
@keyframes d-animation-accordion-section-wiggle {
|
|
93
|
+
0% {
|
|
94
|
+
transform: var(--accordion-section-min-posion);
|
|
95
|
+
}
|
|
96
|
+
50% {
|
|
97
|
+
transform: var(--accordion-section-max-posion);
|
|
98
|
+
}
|
|
99
|
+
100% {
|
|
100
|
+
transform: var(--accordion-section-min-posion);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
</style>
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
<script lang="ts">
|
|
2
|
+
export default {
|
|
3
|
+
name: 'DAnimationDefLetterD'
|
|
4
|
+
}
|
|
5
|
+
</script>
|
|
6
|
+
|
|
7
|
+
<template>
|
|
8
|
+
<path
|
|
9
|
+
d="M200.242,139.244l137.207,-0c66.136,-0 112.859,17.192 140.169,51.576c27.31,34.384 33.562,84.973 18.755,151.767c-22.045,98.711 -85.878,148.066 -191.498,148.066l-179.16,-0l74.527,-351.409Zm184.588,179.159c12.175,-57.581 -7.732,-86.372 -59.72,-86.372l-33.068,0l-35.042,165.834l44.42,0c23.69,0 42.034,-6.169 55.031,-18.508c12.997,-12.339 22.457,-32.657 28.379,-60.954Z"
|
|
10
|
+
/>
|
|
11
|
+
</template>
|