Files
pages/src/lib/banner-title-alt.svelte

94 lines
1.8 KiB
Svelte
Raw Normal View History

<script lang="ts">
import SeparatorLine from "./separator-line.svelte";
let {
title,
2025-04-18 16:15:00 +02:00
date = "",
subtitle = "",
banner = "",
}: {
title: string;
2025-04-18 16:15:00 +02:00
date?: string;
subtitle?: string;
banner?: string;
} = $props();
</script>
<div class="container">
2025-04-18 13:57:24 +02:00
<div class="subcontainer">
<div class="img-container">
<img src="{banner}">
</div>
<div class="text-container">
<h1 class="title">{title}</h1>
{#if subtitle}
<p class="subtitle">[ {subtitle} ]</p>
{/if}
{#if date}
<p class="date">» {date}</p>
2025-04-18 13:57:24 +02:00
{/if}
</div>
</div>
</div>
<SeparatorLine />
<style>
.container {
width: 100%;
2025-04-18 13:57:24 +02:00
background-color: var(--color-background-highlight);
}
.subcontainer {
max-width: 1600px;
height: 600px;
display: flex;
flex-direction: row;
2025-04-18 13:57:24 +02:00
margin-left: auto;
margin-right: auto;
}
.img-container {
flex-grow: 1;
width: 50%;
}
.text-container {
width: 48%;
2025-04-18 16:15:00 +02:00
margin: auto 24px;
}
.container img {
height: 100%;
width: 100%;
object-fit: cover;
}
.title {
width: 100%;
box-sizing: border-box;
height: fit-content;
left: 0;
right: 0;
bottom: 0px;
2025-04-18 16:15:00 +02:00
font-weight: 900;
/* font-style: italic; */
}
.date {
font-family: var(--font-title);
font-weight: 800;
font-size: 1.3rem;
margin-top: 0;
color: var(--color-highlight);
}
.subtitle {
font-style: italic;
font-family: var(--font-mono);
font-weight: 800;
font-size: 1.3rem;
margin-top: 0;
}
</style>