That's the icon in the background.
This commit is contained in:
@@ -43,20 +43,33 @@ const scoreData = computed(() => {
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
const panelBorderClass = computed(() => {
|
||||
if (props.score >= 10) return 'border-green-500/20'
|
||||
if (props.score >= 5) return 'border-amber-500/20'
|
||||
if (props.score >= 1) return 'border-red-500/20'
|
||||
return 'border-white/10'
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<div v-if="visible" class="inline-flex items-center gap-3">
|
||||
<div
|
||||
v-if="visible"
|
||||
class="inline-flex items-center gap-3 bg-white/5 backdrop-blur-sm border rounded-xl px-5 py-3 transition-all duration-500"
|
||||
:class="panelBorderClass"
|
||||
>
|
||||
<div class="flex items-baseline gap-2">
|
||||
<span class="text-4xl font-bold" :class="scoreData.textClass">
|
||||
<span class="text-3xl font-bold" :class="scoreData.textClass">
|
||||
{{ score }}
|
||||
</span>
|
||||
<span class="text-sm text-gray-400">points</span>
|
||||
<span class="text-xs uppercase tracking-wider text-gray-500">
|
||||
points
|
||||
</span>
|
||||
</div>
|
||||
<div
|
||||
:class="[
|
||||
scoreData.bgClass,
|
||||
'px-4 py-2 rounded-lg text-white font-semibold text-sm',
|
||||
'px-3 py-1 rounded-full text-xs font-bold uppercase tracking-wider text-white shadow-sm',
|
||||
]"
|
||||
>
|
||||
{{ scoreData.label }}
|
||||
|
||||
Reference in New Issue
Block a user