feat(home): show only last 15 notes with link to /pub

This commit is contained in:
Julien Calixte
2026-05-23 16:52:04 +02:00
parent 3153200eb3
commit d0175025ad

View File

@@ -1,16 +1,17 @@
<script setup lang="ts">
import { fetchNotes } from "@/api/fetch-notes"
const notes = await fetchNotes()
const notes = (await fetchNotes()).slice(0, 15)
</script>
<template>
<div class="blog-notes" v-if="notes.length > 0">
<h2>Last notes</h2>
<ul>
<li v-for="note in notes" :key="note.href">
<li v-for="note in notes" :key="note.path">
<a :href="note.path">{{ note.title }}</a>
</li>
</ul>
<p><a href="/pub">See all articles </a></p>
</div>
</template>