PR Check / Security scan (Snyk) (pull_request) Skipped
PR Check / Lint + typecheck (pull_request) Successful in 1m7s
PR Check / Secret scan (gitleaks) (pull_request) Successful in 6s
PR Check / Dependency audit (pull_request) Successful in 9s
PR Check / Dockerfile lint (droast) (pull_request) Successful in 5s
PR Check / AI code review (opencode) (pull_request) Successful in 55s
AppNav, AppLogo and AppBottomNav used NuxtLink to "/", which resolves to the English root under prefix_except_default; they now use NuxtLinkLocale and drop the hardcoded aria-current. Bottom-nav labels go through $t as well. The switcher's accessible name now contains the visible locale code, aria-haspopup is gone in favour of a plain disclosure with aria-controls, and Escape returns focus to the trigger.
65 lines
1.5 KiB
Vue
65 lines
1.5 KiB
Vue
<script setup lang="ts">
|
|
import { AVATAR_PALETTE, AVATAR_SPRITE } from '~/utils/avatar'
|
|
|
|
const palette: Record<string, string> = AVATAR_PALETTE
|
|
|
|
const flat = AVATAR_SPRITE
|
|
.flatMap((row) => [...row])
|
|
.map((cell) => palette[cell] ?? 'transparent')
|
|
</script>
|
|
|
|
<template>
|
|
<NuxtLinkLocale to="/" class="group flex items-center gap-3">
|
|
<span class="flex items-center justify-center w-8 h-8 rounded bg-surface-container-high transition-colors">
|
|
<span class="pixel-avatar" aria-hidden="true">
|
|
<span
|
|
v-for="(color, i) in flat"
|
|
:key="i"
|
|
class="pixel"
|
|
:style="{ backgroundColor: color }"
|
|
/>
|
|
</span>
|
|
</span>
|
|
<div class="flex flex-col">
|
|
<span class="font-headline-sm text-headline-sm tracking-tight text-on-surface font-medium">Noel Sabia</span>
|
|
<span class="font-label-mono text-label-mono text-on-surface-variant tracking-wider uppercase text-[0.625rem]">Im using Arch btw</span>
|
|
</div>
|
|
</NuxtLinkLocale>
|
|
</template>
|
|
|
|
<style scoped>
|
|
.pixel-avatar {
|
|
display: grid;
|
|
grid-template-columns: repeat(32, 1px);
|
|
width: 32px;
|
|
height: 32px;
|
|
transform-origin: bottom center;
|
|
}
|
|
|
|
/* Breathing only while the logo link is hovered. */
|
|
.group:hover .pixel-avatar {
|
|
animation: breathe 3s ease-in-out infinite;
|
|
}
|
|
|
|
.pixel {
|
|
width: 1px;
|
|
height: 1px;
|
|
}
|
|
|
|
@keyframes breathe {
|
|
0%,
|
|
100% {
|
|
transform: scale(1);
|
|
}
|
|
50% {
|
|
transform: scale(1.06);
|
|
}
|
|
}
|
|
|
|
@media (prefers-reduced-motion: reduce) {
|
|
.group:hover .pixel-avatar {
|
|
animation: none;
|
|
}
|
|
}
|
|
</style>
|