@@ -47,15 +47,9 @@ const logos = [
4747]
4848
4949const colors = [
50- { key: ' background' , hex: ' #0a0a0a' , oklch: ' oklch(0.171 0 0)' , swatch: ' #0a0a0a' , light: false },
51- { key: ' foreground' , hex: ' #fafafa' , oklch: ' oklch(0.982 0 0)' , swatch: ' #fafafa' , light: true },
52- {
53- key: ' accent' ,
54- hex: ' #51c8fc' ,
55- oklch: ' oklch(0.787 0.128 230.318)' ,
56- swatch: ' #51c8fc' ,
57- light: true ,
58- },
50+ { name : () => $t (' brand.colors.background' ), hex: ' #0a0a0a' , oklch: ' oklch(0.171 0 0)' },
51+ { name : () => $t (' brand.colors.foreground' ), hex: ' #fafafa' , oklch: ' oklch(0.982 0 0)' },
52+ { name : () => $t (' brand.colors.accent' ), hex: ' #51c8fc' , oklch: ' oklch(0.787 0.128 230.318)' },
5953]
6054
6155const { copy, copied, text : lastCopied } = useClipboard ({ copiedDuring: 2000 })
@@ -206,25 +200,23 @@ async function handlePngDownload(logo: (typeof logos)[number]) {
206200 <div class =" grid grid-cols-2 sm:grid-cols-3 gap-4" >
207201 <div
208202 v-for =" color in colors"
209- :key =" color.key "
203+ :key =" color.hex "
210204 class =" group"
211205 role =" group"
212- :aria-label =" $t(`brand.colors.${ color.key}` )"
206+ :aria-label =" color.name( )"
213207 >
214208 <div
215209 class =" rounded-lg h-20 sm:h-24 mb-3 border border-border"
216210 :style =" { backgroundColor: color.hex }"
217211 />
218212 <p class =" font-mono text-sm text-fg mb-1 m-0" >
219- {{ $t(`brand.colors.${ color.key}` ) }}
213+ {{ color.name( ) }}
220214 </p >
221215 <div class =" flex flex-col gap-1" >
222216 <ButtonBase
223217 size =" sm"
224218 class =" !border-none !px-0 !justify-start"
225- :aria-label ="
226- $t('brand.colors.copy_hex', { name: $t(`brand.colors.${color.key}`) })
227- "
219+ :aria-label =" $t('brand.colors.copy_hex', { name: color.name() })"
228220 @click =" copy(color.hex)"
229221 >
230222 <code class =" text-fg-muted" >{{ color.hex }}</code >
@@ -241,9 +233,7 @@ async function handlePngDownload(logo: (typeof logos)[number]) {
241233 <ButtonBase
242234 size =" sm"
243235 class =" !border-none !px-0 !justify-start"
244- :aria-label ="
245- $t('brand.colors.copy_oklch', { name: $t(`brand.colors.${color.key}`) })
246- "
236+ :aria-label =" $t('brand.colors.copy_oklch', { name: color.name() })"
247237 @click =" copy(color.oklch)"
248238 >
249239 <code class =" text-fg-subtle" >{{ color.oklch }}</code >
0 commit comments