Simplify home page and nav to a single latest-article link
Home now shows only the latest article, pointing to the full list on /blog instead of duplicating recent articles in a grid. Nav trims to Home, Tutti gli articoli, and the corralito page; the footer drops the now-redundant Categorie column.
This commit is contained in:
@@ -1,10 +1,4 @@
|
||||
<script setup lang="ts">
|
||||
import type { Category } from '#shared/types/blog'
|
||||
|
||||
const { data: categories } = await useFetch<Category[]>('/api/categories', {
|
||||
key: 'nav-categories',
|
||||
default: () => [],
|
||||
})
|
||||
</script>
|
||||
|
||||
<template>
|
||||
@@ -24,12 +18,8 @@ const { data: categories } = await useFetch<Category[]>('/api/categories', {
|
||||
<nav class="site-nav" aria-label="Navigazione principale">
|
||||
<div class="container nav-inner">
|
||||
<ul>
|
||||
<li><NuxtLink to="/">Home</NuxtLink></li>
|
||||
<li><NuxtLink to="/blog">Tutti gli articoli</NuxtLink></li>
|
||||
<li v-for="category in categories" :key="category.slug">
|
||||
<NuxtLink :to="`/category/${category.slug}`">
|
||||
{{ category.name }}
|
||||
</NuxtLink>
|
||||
</li>
|
||||
<li><NuxtLink to="/come-difendersi-dal-corralito">Come difendersi dal corralito</NuxtLink></li>
|
||||
</ul>
|
||||
</div>
|
||||
@@ -51,18 +41,6 @@ const { data: categories } = await useFetch<Category[]>('/api/categories', {
|
||||
</address>
|
||||
</div>
|
||||
|
||||
<nav class="footer-block" aria-label="Categorie">
|
||||
<p class="kicker">Categorie</p>
|
||||
<ul>
|
||||
<li v-for="category in categories" :key="category.slug">
|
||||
<NuxtLink :to="`/category/${category.slug}`">
|
||||
{{ category.name }}
|
||||
</NuxtLink>
|
||||
</li>
|
||||
<li v-if="!categories.length" class="muted">Ancora nessuna pubblicazione</li>
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<nav class="footer-block" aria-label="Naviga">
|
||||
<p class="kicker">Naviga</p>
|
||||
<ul>
|
||||
|
||||
Reference in New Issue
Block a user