2024-08-17 19:29:10 +02:00
|
|
|
<script lang="ts">
|
2024-08-20 19:17:05 +02:00
|
|
|
import BlogHead from "./common/BlogHead.svelte";
|
|
|
|
|
import BlogNav from "./common/BlogNav.svelte";
|
|
|
|
|
import BlogFooter from "./common/BlogFooter.svelte";
|
|
|
|
|
|
|
|
|
|
const {
|
|
|
|
|
title,
|
|
|
|
|
logoType,
|
|
|
|
|
logo,
|
|
|
|
|
mainContent,
|
|
|
|
|
articles,
|
|
|
|
|
footerAdditionalText
|
|
|
|
|
}: {
|
2024-08-17 19:29:10 +02:00
|
|
|
title: string;
|
|
|
|
|
logoType: "text" | "image";
|
|
|
|
|
logo: string;
|
|
|
|
|
mainContent: string;
|
2024-08-20 19:17:05 +02:00
|
|
|
articles: { title: string; publication_date: string; meta_description: string }[];
|
2024-08-17 19:29:10 +02:00
|
|
|
footerAdditionalText: string;
|
2024-08-20 19:17:05 +02:00
|
|
|
} = $props();
|
2024-08-17 19:29:10 +02:00
|
|
|
</script>
|
|
|
|
|
|
2024-08-20 19:17:05 +02:00
|
|
|
<BlogHead {title} />
|
2024-08-17 19:29:10 +02:00
|
|
|
|
2024-08-20 19:17:05 +02:00
|
|
|
<BlogNav {logoType} {logo} />
|
2024-08-17 19:29:10 +02:00
|
|
|
|
|
|
|
|
<header>
|
2024-08-18 18:17:59 +02:00
|
|
|
<div class="container">
|
|
|
|
|
<h1>{title}</h1>
|
|
|
|
|
</div>
|
2024-08-17 19:29:10 +02:00
|
|
|
</header>
|
|
|
|
|
|
|
|
|
|
<main>
|
2024-08-18 18:17:59 +02:00
|
|
|
<div class="container">
|
2024-08-17 19:29:10 +02:00
|
|
|
{@html mainContent}
|
2024-08-18 18:17:59 +02:00
|
|
|
{#if articles.length > 0}
|
2024-08-24 20:34:06 +02:00
|
|
|
<section class="articles" id="articles">
|
|
|
|
|
<h2>
|
|
|
|
|
<a href="#articles">Articles</a>
|
|
|
|
|
</h2>
|
2024-08-17 19:29:10 +02:00
|
|
|
|
2024-08-23 18:43:52 +02:00
|
|
|
<ul class="unpadded">
|
2024-08-18 20:12:27 +02:00
|
|
|
{#each articles as article}
|
|
|
|
|
{@const articleFileName = article.title.toLowerCase().split(" ").join("-")}
|
|
|
|
|
<li>
|
|
|
|
|
<p>{article.publication_date}</p>
|
2024-08-20 19:17:05 +02:00
|
|
|
<p>
|
|
|
|
|
<strong>
|
|
|
|
|
<a href="./articles/{articleFileName}.html">{article.title}</a>
|
|
|
|
|
</strong>
|
|
|
|
|
</p>
|
2024-08-18 20:12:27 +02:00
|
|
|
{#if article.meta_description}
|
|
|
|
|
<p>{article.meta_description}</p>
|
|
|
|
|
{/if}
|
|
|
|
|
</li>
|
|
|
|
|
{/each}
|
|
|
|
|
</ul>
|
2024-08-18 18:17:59 +02:00
|
|
|
</section>
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|
2024-08-17 19:29:10 +02:00
|
|
|
</main>
|
|
|
|
|
|
2024-08-20 19:17:05 +02:00
|
|
|
<BlogFooter text={footerAdditionalText} />
|