Skip to content
This repository was archived by the owner on Nov 5, 2023. It is now read-only.

Commit 64c3bd3

Browse files
authored
Minified stats (#30)
1 parent 3a84964 commit 64c3bd3

File tree

1 file changed

+33
-1
lines changed

1 file changed

+33
-1
lines changed

components/d/Stats.vue

Lines changed: 33 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ const fifthStat = computed(() => statFromIndex(4))
7171

7272
<template>
7373
<figure class="max-w-full">
74-
<div class="hidden print:block">
74+
<div class="stats__print-value">
7575
<div class="text-lg font-bold">{{ groupTitle }}</div>
7676
<div>
7777
<div
@@ -91,6 +91,21 @@ const fifthStat = computed(() => statFromIndex(4))
9191
</div>
9292
</div>
9393
</div>
94+
<div class="stats__print-value--small">
95+
<span
96+
v-for="(skill, index) in titles"
97+
:key="skill"
98+
class="rounded text-white p-[.3em]"
99+
:class="{
100+
'hidden': values[index] < 3,
101+
'bg-blue-500 text-xs': values[index] === 3,
102+
'bg-blue-600 text-sm': values[index] === 4,
103+
'bg-blue-700 text-base': values[index] === 5
104+
}"
105+
>
106+
{{ skill }}
107+
</span>
108+
</div>
94109
<div class="relative print:hidden">
95110
<svg viewBox="-500 -500 2000 2000" xmlns="http://www.w3.org/2000/svg">
96111
<polygon
@@ -416,3 +431,20 @@ const fifthStat = computed(() => statFromIndex(4))
416431
stroke-linejoin: round;
417432
}
418433
</style>
434+
435+
<style>
436+
.stats__print-value {
437+
@apply hidden print:block;
438+
}
439+
.stats__print-value--small {
440+
@apply hidden flex-wrap gap-2 items-center;
441+
}
442+
443+
.small-print-stats .stats__print-value {
444+
@apply print:hidden;
445+
}
446+
447+
.small-print-stats .stats__print-value--small {
448+
@apply print:flex;
449+
}
450+
</style>

0 commit comments

Comments
 (0)