Enable four MiniBlog articles as preview

This commit is contained in:
Wolfgang Huß 2026-03-03 17:51:56 +01:00
parent 44a29e594b
commit f3438baa9a
5 changed files with 22 additions and 5 deletions

View File

@ -56,16 +56,29 @@ const locale = useRouteLocale()
const lang = usePageLang().value || 'de-DE' // Ref<string>, e.g. "de-DE" or "en-US"
const props = defineProps({
title: { type: String},
readMoreLinkTitle: { type: String},
showAllPostsButtonTitle: { type: String},
title: {
type: String,
required: true
},
readMoreLinkTitle: {
type: String,
required: true
},
showAllPostsButtonTitle: {
type: String,
required: true
},
topArticlesCount: {
type: Number,
required: true
},
});
// Nur Artikel des aktuellen Locales + Top 3
// Nur Artikel des aktuellen Locales + Top X
const items = computed(() => {
const loc = locale.value || "/";
const list = (articles || []).filter(a => a.locale === loc);
return list.slice(0, 3);
return list.slice(0, props.topArticlesCount);
});
const articleIndex = computed(() =>

View File

@ -291,6 +291,7 @@ XXX -->
:title="'Neueste Beiträge'"
:readMoreLinkTitle="'Weiterlesen'"
:show-all-posts-button-title="'Alle Beiträge ansehen'"
:topArticlesCount="4"
/>
<h2 class="large-header">Spenden</h2>

View File

@ -292,6 +292,7 @@ XXX -->
:title="'Latest posts'"
:readMoreLinkTitle="'Read more'"
:show-all-posts-button-title="'Show all posts'"
:topArticlesCount="4"
/>
<h2 class="large-header">Donate</h2>

View File

@ -260,6 +260,7 @@ XXX -->
:title="'Últimas publicaciones'"
:readMoreLinkTitle="'Seguir leyendo'"
:show-all-posts-button-title="'Mostrar todas las publicaciones'"
:topArticlesCount="4"
/>
<h2 class="large-header">Donar</h2>

View File

@ -292,6 +292,7 @@ XXX -->
:title="'Derniers articles'"
:readMoreLinkTitle="'Continuer la lecture'"
:show-all-posts-button-title="'Afficher tous les messages'"
:topArticlesCount="4"
/>
<h2 class="large-header">Faire un don</h2>