2026-01-21 22:08:09 +01:00
|
|
|
<script lang="ts">
|
|
|
|
|
export interface GalleryEntry {
|
|
|
|
|
title: string;
|
|
|
|
|
subtitle: string;
|
|
|
|
|
img: string;
|
|
|
|
|
imgAlt: string;
|
|
|
|
|
link: string;
|
2026-03-07 13:40:28 +01:00
|
|
|
description: string;
|
2026-01-21 22:08:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let {
|
|
|
|
|
entries,
|
|
|
|
|
}: {
|
|
|
|
|
entries: GalleryEntry[];
|
|
|
|
|
} = $props();
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="post-list">
|
|
|
|
|
{#each entries as entry}
|
2026-03-07 20:37:37 +01:00
|
|
|
{@render galleryEntry({entry})}
|
2026-01-21 22:08:09 +01:00
|
|
|
{/each}
|
|
|
|
|
</div>
|
|
|
|
|
|
2026-03-07 20:37:37 +01:00
|
|
|
{#snippet galleryEntry({entry}: {entry: GalleryEntry})}
|
2026-01-21 22:08:09 +01:00
|
|
|
<a class="gallery-container" href="{entry.link}">
|
2026-01-31 20:24:26 +01:00
|
|
|
{#if entry.img && entry.img !== ""}
|
|
|
|
|
<img class="gallery-img" src="{entry.img}" alt="{entry.imgAlt}">
|
|
|
|
|
{:else}
|
|
|
|
|
<div class="gallery-img-placeholder"></div>
|
|
|
|
|
{/if}
|
2026-01-21 22:08:09 +01:00
|
|
|
<div class="gallery-text-container">
|
2026-03-07 20:37:37 +01:00
|
|
|
<p class="gallery-subtitle">{@html entry.subtitle}</p>
|
|
|
|
|
<p class="gallery-title">{entry.title}</p>
|
|
|
|
|
<p class="gallery-description">{entry.description}</p>
|
2026-01-21 22:08:09 +01:00
|
|
|
</div>
|
|
|
|
|
</a>
|
|
|
|
|
{/snippet}
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
:root {
|
|
|
|
|
--color-laura: #C76668CC;
|
|
|
|
|
--color-laura-darker: #A55051CC;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.post-list {
|
|
|
|
|
max-width: 1600px;
|
|
|
|
|
margin-left: auto;
|
|
|
|
|
margin-right: auto;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.gallery-container {
|
|
|
|
|
box-sizing: content-box;
|
2026-03-07 13:40:28 +01:00
|
|
|
height: 120px;
|
2026-01-21 22:08:09 +01:00
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
align-items: center;
|
2026-03-07 13:40:28 +01:00
|
|
|
margin: 0;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
border: var(--border-style) transparent var(--border-dash-size);
|
|
|
|
|
transition: border-color var(--duration-animation) var(--anim-curve);
|
2026-01-21 22:08:09 +01:00
|
|
|
}
|
|
|
|
|
|
2026-01-31 20:24:26 +01:00
|
|
|
.gallery-img, .gallery-img-placeholder {
|
2026-03-07 13:40:28 +01:00
|
|
|
width: 180px;
|
|
|
|
|
min-width: 180px;
|
2026-01-21 22:08:09 +01:00
|
|
|
height: 100%;
|
|
|
|
|
margin: 0;
|
|
|
|
|
object-fit: cover;
|
2026-03-07 13:40:28 +01:00
|
|
|
transition: width var(--duration-animation) var(--anim-curve);
|
2026-01-21 22:08:09 +01:00
|
|
|
}
|
|
|
|
|
|
2026-01-31 20:24:26 +01:00
|
|
|
.gallery-img-placeholder {
|
|
|
|
|
background-color: var(--color-highlight-dark);
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-21 22:08:09 +01:00
|
|
|
.gallery-text-container {
|
2026-03-07 13:40:28 +01:00
|
|
|
display: grid;
|
|
|
|
|
grid-auto-columns: 1fr;
|
|
|
|
|
grid-template-rows: 1fr 1fr 0fr;
|
|
|
|
|
align-items: center;
|
2026-01-21 22:08:09 +01:00
|
|
|
flex-grow: 1;
|
2026-03-07 13:40:28 +01:00
|
|
|
padding: 0 16px;
|
|
|
|
|
transition: background-color var(--duration-animation) var(--anim-curve),
|
|
|
|
|
backdrop-filter var(--duration-blur) var(--anim-curve),
|
|
|
|
|
grid-template-rows var(--duration-blur) var(--anim-curve);
|
2026-01-21 22:08:09 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-07 13:40:28 +01:00
|
|
|
.gallery-title, .gallery-subtitle, .gallery-description {
|
2026-01-21 22:08:09 +01:00
|
|
|
margin: 0;
|
2026-03-07 13:40:28 +01:00
|
|
|
transition: color var(--duration-animation) var(--anim-curve),
|
|
|
|
|
opacity var(--duration-animation) var(--anim-curve);
|
2026-01-21 22:08:09 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.gallery-title {
|
|
|
|
|
font-family: var(--font-mono);
|
|
|
|
|
font-weight: 700;
|
2026-03-07 13:40:28 +01:00
|
|
|
font-size: 1.4rem;
|
|
|
|
|
line-height: 2.0rem;
|
2026-01-21 22:08:09 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-07 13:40:28 +01:00
|
|
|
.gallery-subtitle, .gallery-description {
|
2026-01-23 14:19:20 +01:00
|
|
|
font-size: 1.0rem;
|
2026-01-31 21:44:58 +01:00
|
|
|
line-height: 1.2rem;
|
2026-03-07 13:40:28 +01:00
|
|
|
overflow: hidden;
|
2026-01-23 14:19:20 +01:00
|
|
|
}
|
|
|
|
|
|
2026-03-07 13:40:28 +01:00
|
|
|
.gallery-description {
|
|
|
|
|
font-weight: 500;
|
|
|
|
|
opacity: 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.gallery-container:hover {
|
2026-01-21 22:08:09 +01:00
|
|
|
border-color: var(--color-highlight);
|
2026-02-11 11:59:54 +01:00
|
|
|
background-color: var(--color-background-highlight);
|
2026-02-12 15:47:47 +01:00
|
|
|
backdrop-filter: blur(var(--blur-radius-background));
|
2026-01-21 22:08:09 +01:00
|
|
|
}
|
2026-01-31 20:24:26 +01:00
|
|
|
.gallery-container:hover .gallery-img, .gallery-container:hover .gallery-img-placeholder {
|
2026-02-02 20:59:10 +01:00
|
|
|
/* filter: grayscale(0%); */
|
2026-03-07 13:40:28 +01:00
|
|
|
/* margin-left: 8px; */
|
|
|
|
|
width: 260px;
|
2026-02-02 20:59:10 +01:00
|
|
|
}
|
|
|
|
|
.gallery-container:hover .gallery-text-container {
|
2026-03-07 13:40:28 +01:00
|
|
|
/* padding-right: 8px; */
|
|
|
|
|
grid-template-rows: 0fr 1fr 1fr;
|
2026-01-21 22:08:09 +01:00
|
|
|
}
|
|
|
|
|
.gallery-container:hover p {
|
|
|
|
|
color: var(--color-highlight);
|
|
|
|
|
}
|
2026-03-07 13:40:28 +01:00
|
|
|
.gallery-container:hover .gallery-subtitle {
|
|
|
|
|
opacity: 0;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
.gallery-container:hover .gallery-description {
|
|
|
|
|
opacity: 1;
|
|
|
|
|
}
|
2026-01-23 14:19:20 +01:00
|
|
|
|
|
|
|
|
@media screen and (max-width: 700px) {
|
2026-01-31 21:50:03 +01:00
|
|
|
/* .gallery-title {
|
2026-01-23 14:19:20 +01:00
|
|
|
font-size: 1.0rem;
|
|
|
|
|
line-height: 1.1rem;
|
|
|
|
|
}
|
|
|
|
|
.gallery-subtitle {
|
|
|
|
|
font-size: 0.9rem;
|
|
|
|
|
line-height: 1.1rem;
|
2026-01-31 21:50:03 +01:00
|
|
|
} */
|
2026-01-23 14:19:20 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@media screen and (max-width: 500px) {
|
2026-01-31 21:50:03 +01:00
|
|
|
.gallery-title {
|
|
|
|
|
font-size: 1.0rem;
|
|
|
|
|
line-height: 1.1rem;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-23 14:19:20 +01:00
|
|
|
.gallery-subtitle {
|
2026-01-31 21:44:58 +01:00
|
|
|
font-size: 0.8rem;
|
|
|
|
|
line-height: 1rem;
|
|
|
|
|
/* display: none; */
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.gallery-container {
|
|
|
|
|
height: 64px;
|
|
|
|
|
}
|
2026-01-31 21:50:03 +01:00
|
|
|
|
|
|
|
|
.gallery-text-container {
|
|
|
|
|
padding-left: 8px;
|
|
|
|
|
}
|
2026-01-31 21:44:58 +01:00
|
|
|
|
|
|
|
|
.gallery-img, .gallery-img-placeholder {
|
|
|
|
|
width: 100px;
|
|
|
|
|
min-width: 100px;
|
2026-01-23 14:19:20 +01:00
|
|
|
}
|
|
|
|
|
}
|
2026-01-21 22:08:09 +01:00
|
|
|
</style>
|