neue Komponente für Artikellisten. Möglichkeit, Artikel Seiten zuzuweisen.

This commit is contained in:
2022-06-13 13:58:04 +02:00
parent 60bd5d21c9
commit 7c712ee7c8
6 changed files with 85 additions and 37 deletions

View File

@@ -0,0 +1,25 @@
<script lang="ts">
import { currentLang } from "../../store"
import { getArticles } from "../../api"
import Article from "../widgets/Article.svelte"
export let tag: string
let articleEntries: CollectionEntry[] = []
$: if ($currentLang) {
getArticles("articles", {
filter: {
"article.general.locale": $currentLang,
"article.general.tags": { $in: [tag] },
},
}).then((response) => {
articleEntries = response
})
}
</script>
{#each articleEntries || [] as entry}
<Article entry="{entry}" />
{/each}