2025-12-30 19:03:57 +00:00
|
|
|
<script lang="ts">
|
|
|
|
|
let {
|
|
|
|
|
title,
|
2026-04-02 15:50:30 +02:00
|
|
|
date = "", // date posted
|
|
|
|
|
dateUpdated = "",
|
2026-04-08 14:01:58 +02:00
|
|
|
dateIndeterminate = "", // raw date without an explanation marker next to it
|
2025-12-30 19:03:57 +00:00
|
|
|
subtitle = "",
|
|
|
|
|
banner = "",
|
|
|
|
|
bannerAlt = "",
|
2026-04-02 16:15:02 +02:00
|
|
|
tags = [],
|
2025-12-30 19:03:57 +00:00
|
|
|
pixelated,
|
|
|
|
|
}: {
|
|
|
|
|
title: string;
|
|
|
|
|
date?: string;
|
2026-04-02 15:50:30 +02:00
|
|
|
dateUpdated?: string;
|
2026-04-08 14:01:58 +02:00
|
|
|
dateIndeterminate?: string;
|
2025-12-30 19:03:57 +00:00
|
|
|
subtitle?: string;
|
|
|
|
|
banner?: string;
|
|
|
|
|
bannerAlt?: string;
|
2026-04-02 16:15:02 +02:00
|
|
|
tags?: string[];
|
2025-12-30 19:03:57 +00:00
|
|
|
pixelated?: boolean;
|
|
|
|
|
} = $props();
|
|
|
|
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
{#snippet titles({title, subtitle, date}: {title: string, subtitle: string, date: string})}
|
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-12 07:19:44 +02:00
|
|
|
<h1 class="title">{title}</h1>
|
2026-04-02 15:50:30 +02:00
|
|
|
{#if subtitle}
|
|
|
|
|
<p class="subtitle">[ {subtitle} ]</p>
|
|
|
|
|
{/if}
|
2026-04-02 16:21:30 +02:00
|
|
|
{#if tags.length}
|
2026-04-02 16:15:02 +02:00
|
|
|
<div class="tag-container">
|
|
|
|
|
{#each tags as tag}
|
|
|
|
|
<span class="post-tag">{tag}</span>
|
|
|
|
|
{/each}
|
|
|
|
|
</div>
|
|
|
|
|
{/if}
|
2026-04-02 15:50:30 +02:00
|
|
|
</div>
|
2026-04-08 14:01:58 +02:00
|
|
|
{#if date || dateIndeterminate}
|
2026-04-02 15:50:30 +02:00
|
|
|
<div class="date-container">
|
2026-04-08 14:01:58 +02:00
|
|
|
{#if dateIndeterminate}
|
|
|
|
|
<p class="date">:: {dateIndeterminate}</p>
|
|
|
|
|
{/if}
|
|
|
|
|
{#if date}
|
|
|
|
|
<p class="date">posted :: {date}</p>
|
|
|
|
|
{/if}
|
2026-04-02 15:50:30 +02:00
|
|
|
{#if dateUpdated}
|
|
|
|
|
<p class="date">last updated :: {dateUpdated}</p>
|
|
|
|
|
{/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-01-31 20:24:26 +01:00
|
|
|
{#if banner && banner !== ""}
|
2026-04-08 21:38:13 +02:00
|
|
|
<div class="banner-container">
|
|
|
|
|
{#if pixelated}
|
|
|
|
|
<img class="banner pixelated-img" src="{banner}" alt="{bannerAlt}">
|
|
|
|
|
{:else}
|
|
|
|
|
<img class="banner" src="{banner}" alt="{bannerAlt}">
|
|
|
|
|
{/if}
|
|
|
|
|
</div>
|
2026-01-21 15:21:21 +01:00
|
|
|
{/if}
|
|
|
|
|
{@render titles({title, subtitle, date})}
|
|
|
|
|
<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;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.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-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>
|