Rename the site to CorralitoComing and switch the UI to English
The name and tagline live in one place, shared/utils/site.ts, and feed the header, the footer, the home page and the title template.
This commit is contained in:
@@ -12,7 +12,7 @@ const page = computed(() => {
|
||||
const { data: category } = await useFetch<Category>(`/api/categories/${slug}`)
|
||||
|
||||
if (!category.value) {
|
||||
throw createError({ statusCode: 404, statusMessage: 'Categoria non trovata', fatal: true })
|
||||
throw createError({ statusCode: 404, statusMessage: 'Category not found', fatal: true })
|
||||
}
|
||||
|
||||
const { data, error } = await useFetch<Paginated<ArticleSummary>>('/api/articles', {
|
||||
@@ -25,8 +25,8 @@ const canonical = computed(
|
||||
)
|
||||
|
||||
useSeoMeta({
|
||||
title: `${category.value.name} — Articoli`,
|
||||
description: `Tutti gli articoli nella categoria ${category.value.name}.`,
|
||||
title: category.value.name,
|
||||
description: `Every article in the ${category.value.name} category.`,
|
||||
ogType: 'website',
|
||||
})
|
||||
|
||||
@@ -36,14 +36,14 @@ useHead({ link: [{ rel: 'canonical', href: canonical }] })
|
||||
<template>
|
||||
<div>
|
||||
<p class="breadcrumb muted">
|
||||
<NuxtLink to="/blog">Articoli</NuxtLink>
|
||||
<NuxtLink to="/blog">Articles</NuxtLink>
|
||||
</p>
|
||||
|
||||
<h1>{{ category?.name }}</h1>
|
||||
|
||||
<p v-if="error">Non è stato possibile caricare gli articoli. Riprova più tardi.</p>
|
||||
<p v-if="error">Articles could not be loaded. Please try again later.</p>
|
||||
|
||||
<p v-else-if="!data?.items.length">Non ci sono articoli in questa categoria.</p>
|
||||
<p v-else-if="!data?.items.length">There are no articles in this category.</p>
|
||||
|
||||
<template v-else>
|
||||
<ul class="card-grid">
|
||||
@@ -52,17 +52,17 @@ useHead({ link: [{ rel: 'canonical', href: canonical }] })
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<nav v-if="data.pageCount > 1" class="pagination" aria-label="Paginazione">
|
||||
<nav v-if="data.pageCount > 1" class="pagination" aria-label="Pagination">
|
||||
<NuxtLink v-if="data.page > 1" :to="{ query: { page: data.page - 1 } }" rel="prev">
|
||||
Pagina precedente
|
||||
Previous page
|
||||
</NuxtLink>
|
||||
<span class="muted">Pagina {{ data.page }} di {{ data.pageCount }}</span>
|
||||
<span class="muted">Page {{ data.page }} of {{ data.pageCount }}</span>
|
||||
<NuxtLink
|
||||
v-if="data.page < data.pageCount"
|
||||
:to="{ query: { page: data.page + 1 } }"
|
||||
rel="next"
|
||||
>
|
||||
Pagina successiva
|
||||
Next page
|
||||
</NuxtLink>
|
||||
</nav>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user