Skip to content

Commit

Permalink
chore: improve lighthouse score
Browse files Browse the repository at this point in the history
  • Loading branch information
zAlweNy26 committed Jan 8, 2025
1 parent 62ee534 commit 7b782ea
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 19 deletions.
5 changes: 3 additions & 2 deletions app/components/NavFooter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ const error = useError()
<template>
<div class="relative mt-12 md:mt-24">
<div class="absolute bottom-0 left-0 w-full overflow-hidden leading-0 rotate-180">
<svg data-name="Layer 1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1200 120"
preserveAspectRatio="none" class="relative block w-full h-12 md:h-24">
<defs>
<linearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="0%">
Expand Down Expand Up @@ -38,13 +38,14 @@ const error = useError()
</div>
<div class="grid grid-flow-col gap-4">
<NuLink class="!text-[var(--ui-bg)] hover:scale-110 transition-transform" to="https://github.com/zAlweNy26/LivingDexTracker"
external target="_blank" aria-label="GitHub Link">
external target="_blank" aria-label="GitHub Repository">
<NuIcon name="i-tabler-brand-github" class="size-8" />
</NuLink>
</div>
<div class="text-sm flex justify-between items-center gap-4 w-full">
<div class="size-8" />
<i18n-t keypath="footer.copyright" tag="p">
<span>{{ new Date().getFullYear() }}</span>
<strong>{{ title }}</strong>
</i18n-t>
<LanguageSwitch />
Expand Down
4 changes: 4 additions & 0 deletions app/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ useHead({
lang,
dir,
},
link: [{
rel: 'canonical',
href: () => route.path,
}],
})
useSeoMeta({
Expand Down
8 changes: 6 additions & 2 deletions app/pages/(info)/contacts.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ interface Member {
description: string
links: {
icon: string
name: string
url: string
}[]
}
Expand All @@ -17,14 +18,17 @@ const devTeam: Member[] = [
links: [
{
icon: 'i-tabler-world',
name: 'Website',
url: 'https://zalweny26.github.io',
},
{
icon: 'i-tabler-brand-linkedin',
name: 'LinkedIn',
url: 'https://www.linkedin.com/in/daniele-nicosia',
},
{
icon: 'i-tabler-brand-github',
name: 'GitHub',
url: 'https://github.com/zAlweNy26',
},
],
Expand All @@ -45,7 +49,7 @@ const { title } = useAppConfig()
<div class="flex flex-wrap gap-8 w-full items-center justify-evenly">
<NuCard v-for="member in devTeam" :key="member.name" class="text-center" :ui="{ header: 'grid place-content-center' }">
<template v-if="member.avatar" #header>
<NuxtImg :alt="member.name" :src="member.avatar" class="rounded-2xl" width="128" height="128" loading="eager" />
<NuxtImg :alt="member.name" :src="member.avatar" class="rounded-2xl" sizes="96px md:128px" loading="eager" />
</template>
<h3 class="font-bold">
{{ member.name }}
Expand All @@ -55,7 +59,7 @@ const { title } = useAppConfig()
</p>
<template #footer>
<NuButtonGroup>
<NuButton v-for="link in member.links" :key="link.icon" size="xl" variant="subtle"
<NuButton v-for="link in member.links" :key="link.icon" size="xl" variant="subtle" :aria-label="`${link.name} - ${member.name}`"
:icon="link.icon" square external :to="link.url" target="_blank" />
</NuButtonGroup>
</template>
Expand Down
4 changes: 2 additions & 2 deletions app/pages/board.vue
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function extractNumber() {
<p class="text-xl space-x-2">
<span class="font-semibold">{{ $t('game.id') }}:</span>
<span>{{ gameId }}</span>
<NuButton class="align-sub" icon="i-tabler-clipboard" square color="neutral"
<NuButton class="align-sub" icon="i-tabler-clipboard" square color="neutral" :aria-label="$t('aria.copy')"
variant="soft" size="xl" @click="copy(gameId)" />
</p>
<p class="italic text-sm">
Expand Down Expand Up @@ -152,7 +152,7 @@ function extractNumber() {
</div>
</div>
<NuSelect v-model="smirk" :placeholder="$t('board.smirk')" color="primary" variant="subtle"
size="xl" :aria-label="$t('board.smirk')" :items="smirkOptions" />
size="xl" highlight :aria-label="$t('board.smirk')" :items="smirkOptions" />
<NuSwitch v-model="autoAnnounce" :disabled="!smirk" size="xl" :label="$t('board.announcer')"
uncheckedIcon="i-tabler-x" checkedIcon="i-tabler-check" defaultValue />
<NuButton icon="i-tabler-numbers" :disabled="remaining === 0 || !smirk" size="xl"
Expand Down
2 changes: 1 addition & 1 deletion app/pages/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const gameId = ref('')

<template>
<section class="mx-auto flex max-w-6xl gap-2 text-center justify-center items-center grow flex-col">
<h1 class="text-4xl font-bold">
<h1 class="text-3xl font-bold">
{{ $t('home.welcome', [title]) }}
</h1>
<p class="text-sm font-medium text-base-content">
Expand Down
Binary file modified bun.lockb
Binary file not shown.
3 changes: 2 additions & 1 deletion i18n/locales/en-GB.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"aria": {
"toggle": "Toggle",
"copy": "Copy",
"goTop": "Go to the top",
"more": "More"
},
Expand Down Expand Up @@ -28,7 +29,7 @@
"terms": "Terms & Conditions",
"attributions": "Attributions",
"contacts": "Contact Us",
"copyright": "Copyright © 2023-2025 {0} - All Rights Reserved."
"copyright": "Copyright © 2023-{0} {1} - All Rights Reserved."
},
"error": {
"routes": {
Expand Down
3 changes: 2 additions & 1 deletion i18n/locales/it-IT.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"aria": {
"toggle": "Cambia",
"copy": "Copia",
"goTop": "Vai in alto",
"more": "Altro"
},
Expand Down Expand Up @@ -28,7 +29,7 @@
"terms": "Termini di Servizio",
"attributions": "Attribuzioni",
"contacts": "Contattaci",
"copyright": "Copyright © 2023-2025 {0} - Tutti i diritti riservati."
"copyright": "Copyright © 2023-{0} {1} - Tutti i diritti riservati."
},
"error": {
"routes": {
Expand Down
20 changes: 10 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,37 +20,37 @@
},
"dependencies": {
"@formkit/auto-animate": "^0.8.2",
"@iconify-json/lucide": "^1.2.20",
"@nuxt/image": "1.8.1",
"@iconify-json/lucide": "^1.2.22",
"@nuxt/image": "1.9.0",
"@nuxt/ui": "3.0.0-alpha.10",
"@nuxthub/core": "0.8.10",
"@nuxtjs/i18n": "9.1.1",
"@nuxtjs/seo": "2.0.2",
"@pinia/nuxt": "0.9.0",
"@vite-pwa/nuxt": "0.10.6",
"@vueuse/nuxt": "12.2.0",
"@vueuse/router": "^12.2.0",
"@vueuse/nuxt": "12.3.0",
"@vueuse/router": "^12.3.0",
"dinero.js": "^1.9.1",
"nuxt": "^3.15.0",
"nuxt": "^3.15.1",
"nuxt-lodash": "2.5.3",
"pinia": "^2.3.0",
"uncrypto": "^0.1.3",
"unenv": "^1.10.0"
},
"devDependencies": {
"@antfu/eslint-config": "^3.12.1",
"@iconify-json/tabler": "^1.2.13",
"@antfu/eslint-config": "^3.12.2",
"@iconify-json/tabler": "^1.2.14",
"@nuxt/devtools": "latest",
"@nuxt/eslint": "^0.7.4",
"@tailwindcss/typography": "^0.5.15",
"@tailwindcss/typography": "^0.5.16",
"@types/dinero.js": "^1.9.4",
"@vite-pwa/assets-generator": "^0.2.6",
"changelogen": "^0.5.7",
"eslint": "^9.17.0",
"typescript": "^5.7.2",
"unlighthouse": "^0.14.1",
"unlighthouse": "^0.15.0",
"vitest": "^2.1.8",
"vue-tsc": "^2.2.0",
"wrangler": "^3.99.0"
"wrangler": "^3.100.0"
}
}

0 comments on commit 7b782ea

Please sign in to comment.