2025-12-30 19:03:57 +00:00
|
|
|
<script lang="ts">
|
2026-04-26 22:13:15 +02:00
|
|
|
import { type BannerContent } from './components/banner-content';
|
|
|
|
|
|
2025-12-30 19:03:57 +00:00
|
|
|
let {
|
2026-04-26 22:13:15 +02:00
|
|
|
content,
|
2025-12-30 19:03:57 +00:00
|
|
|
}: {
|
2026-04-26 22:13:15 +02:00
|
|
|
content: BannerContent;
|
2025-12-30 19:03:57 +00:00
|
|
|
} = $props();
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
2026-04-26 22:13:15 +02:00
|
|
|
{#snippet titles()}
|
2026-01-21 15:21:21 +01:00
|
|
|
<div class="title-container">
|
2026-04-02 15:50:30 +02:00
|
|
|
<div class="title-text-container">
|
2026-04-26 22:13:15 +02:00
|
|
|
<h1 class="title">{content.title}</h1>
|
2026-04-15 16:27:44 +02:00
|
|
|
|
2026-04-26 22:13:15 +02:00
|
|
|
{#if content.subtitle}
|
|
|
|
|
<p class="subtitle">[ {content.subtitle} ]</p>
|
2026-04-02 15:50:30 +02:00
|
|
|
{/if}
|
2026-04-15 16:27:44 +02:00
|
|
|
|
2026-04-26 22:13:15 +02:00
|
|
|
{#if content.tags && content.tags.length > 0}
|
2026-04-02 16:15:02 +02:00
|
|
|
<div class="tag-container">
|
2026-04-26 22:13:15 +02:00
|
|
|
{#each content.tags as tag}
|
2026-04-02 16:15:02 +02:00
|
|
|
<span class="post-tag">{tag}</span>
|
|
|
|
|
{/each}
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
2026-04-02 15:50:30 +02:00
|
|
|
</div>
|
2026-04-26 22:13:15 +02:00
|
|
|
{#if content.date || content.dateUpdated || content.dateIndeterminate}
|
2026-04-02 15:50:30 +02:00
|
|
|
<div class="date-container">
|
2026-04-26 22:13:15 +02:00
|
|
|
{#if content.dateIndeterminate && content.dateIndeterminate != "undefined"}
|
|
|
|
|
<p class="date">:: {content.dateIndeterminate}</p>
|
2026-04-08 14:01:58 +02:00
|
|
|
{/if}
|
2026-04-15 16:27:44 +02:00
|
|
|
|
2026-04-26 22:13:15 +02:00
|
|
|
{#if content.date && content.date != "undefined"}
|
|
|
|
|
<p class="date">posted :: {content.date}</p>
|
2026-04-08 14:01:58 +02:00
|
|
|
{/if}
|
2026-04-15 16:27:44 +02:00
|
|
|
|
2026-04-26 22:13:15 +02:00
|
|
|
{#if content.dateUpdated && content.dateUpdated != "undefined"}
|
|
|
|
|
<p class="date">last updated :: {content.dateUpdated}</p>
|
2026-04-02 15:50:30 +02:00
|
|
|
{/if}
|
|
|
|
|
</div>
|
2026-01-21 15:21:21 +01:00
|
|
|
{/if}
|
|
|
|
|
</div>
|
2025-12-30 19:03:57 +00:00
|
|
|
{/snippet}
|
|
|
|
|
|
2026-01-21 15:21:21 +01:00
|
|
|
<div class="container">
|
2026-04-26 22:13:15 +02:00
|
|
|
{#if content.banner && content.banner !== ""}
|
|
|
|
|
<a class="banner-container" href={content.banner}>
|
|
|
|
|
<img class="banner {content.pixelated ? "pixelated-img" : ""}" src={content.banner} alt={content.bannerAlt}>
|
2026-04-13 22:24:07 +02:00
|
|
|
</a>
|
2026-01-21 15:21:21 +01:00
|
|
|
{/if}
|
2026-04-15 16:27:44 +02:00
|
|
|
|
2026-04-26 22:13:15 +02:00
|
|
|
{@render titles()}
|
2026-01-21 15:21:21 +01:00
|
|
|
<hr>
|
|
|
|
|
</div>
|
2025-12-30 19:03:57 +00:00
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
.container {
|
|
|
|
|
width: 100%;
|
|
|
|
|
}
|
|
|
|
|
|
2026-04-08 21:38:13 +02:00
|
|
|
.banner-container {
|
2026-01-21 15:21:21 +01:00
|
|
|
max-height: 300px;
|
2026-04-08 21:38:13 +02:00
|
|
|
height: 300px;
|
|
|
|
|
width: 100%;
|
|
|
|
|
overflow: hidden;
|
2026-04-13 22:24:07 +02:00
|
|
|
margin: 0;
|
|
|
|
|
display: block;
|
2026-04-08 21:38:13 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.banner {
|
2025-12-30 19:03:57 +00:00
|
|
|
width: 100%;
|
2026-04-08 21:38:13 +02:00
|
|
|
height: 100%;
|
2025-12-30 19:03:57 +00:00
|
|
|
object-fit: cover;
|
2026-04-08 21:38:13 +02:00
|
|
|
transition: scale var(--duration-animation) var(--anim-curve);
|
2026-01-21 15:21:21 +01:00
|
|
|
}
|
|
|
|
|
|
2026-04-08 21:38:13 +02:00
|
|
|
.banner-container:hover .banner {
|
|
|
|
|
scale: 1.04;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-21 15:21:21 +01:00
|
|
|
.title-container {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
2026-04-02 15:50:30 +02:00
|
|
|
/* align-items: flex-end; */
|
|
|
|
|
gap: 16px;
|
2026-04-02 16:32:12 +02:00
|
|
|
margin: 4px 0 8px;
|
2025-12-30 19:03:57 +00:00
|
|
|
}
|
|
|
|
|
|
2026-04-02 15:50:30 +02:00
|
|
|
.title-text-container {
|
|
|
|
|
width: fit-content;
|
2026-04-02 16:15:02 +02:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
2026-04-02 15:50:30 +02:00
|
|
|
flex: 1;
|
2026-04-02 16:15:02 +02:00
|
|
|
gap: 8px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.tag-container {
|
|
|
|
|
display: flex;
|
|
|
|
|
gap: 4px;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
margin-bottom: 4px;
|
2026-04-14 10:33:53 +02:00
|
|
|
|
|
|
|
|
--color-tag-filters-bg: var(--color-background-highlight-alt);
|
2026-04-02 15:50:30 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.date-container {
|
|
|
|
|
width: fit-content;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: flex-end;
|
2026-04-12 07:19:44 +02:00
|
|
|
align-self: flex-end;
|
|
|
|
|
margin-top: 16px;
|
2026-04-02 15:50:30 +02:00
|
|
|
}
|
|
|
|
|
|
2025-12-30 19:03:57 +00:00
|
|
|
.title {
|
|
|
|
|
box-sizing: border-box;
|
|
|
|
|
height: fit-content;
|
2026-01-21 17:42:59 +01:00
|
|
|
margin: 0;
|
2026-04-02 16:15:02 +02:00
|
|
|
margin-top: var(--margin-header-top);
|
2025-12-30 19:03:57 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.date {
|
2026-04-02 15:50:30 +02:00
|
|
|
font-weight: 500;
|
|
|
|
|
font-family: var(--font-mono);
|
|
|
|
|
font-size: 1.0rem;
|
|
|
|
|
line-height: 1.4rem;
|
|
|
|
|
font-style: italic;
|
|
|
|
|
margin: 0;
|
2025-12-30 19:03:57 +00:00
|
|
|
color: var(--color-highlight);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.subtitle {
|
|
|
|
|
font-family: var(--font-mono);
|
2026-01-21 15:21:21 +01:00
|
|
|
font-weight: 500;
|
|
|
|
|
font-size: 1.0rem;
|
2026-04-02 16:21:30 +02:00
|
|
|
line-height: 1.4rem;
|
2026-01-21 17:42:59 +01:00
|
|
|
margin: 0;
|
2025-12-30 19:03:57 +00:00
|
|
|
}
|
2026-01-23 15:30:08 +01:00
|
|
|
|
|
|
|
|
@media screen and (max-width: 800px) {
|
|
|
|
|
.title-container {
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
align-items: flex-start;
|
2026-04-02 16:31:10 +02:00
|
|
|
gap: 4px;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.date-container {
|
|
|
|
|
align-items: flex-start;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.date {
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
line-height: 1.2rem;
|
2026-01-23 15:30:08 +01:00
|
|
|
}
|
2026-04-03 21:47:41 +02:00
|
|
|
|
2026-04-08 21:38:13 +02:00
|
|
|
.banner-container {
|
2026-04-03 21:47:41 +02:00
|
|
|
height: 180px;
|
|
|
|
|
max-height: 180px;
|
|
|
|
|
}
|
2026-01-23 15:30:08 +01:00
|
|
|
}
|
2025-12-30 19:03:57 +00:00
|
|
|
</style>
|