2026-01-21 22:08:09 +01:00
|
|
|
<script lang="ts">
|
|
|
|
|
export interface GalleryEntry {
|
|
|
|
|
title: string;
|
|
|
|
|
subtitle: string;
|
|
|
|
|
img: string;
|
|
|
|
|
imgAlt: string;
|
|
|
|
|
link: string;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let {
|
|
|
|
|
entries,
|
|
|
|
|
reverseTextOrder,
|
|
|
|
|
}: {
|
|
|
|
|
entries: GalleryEntry[];
|
|
|
|
|
reverseTextOrder?: boolean;
|
|
|
|
|
} = $props();
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
<div class="post-list">
|
|
|
|
|
{#each entries as entry}
|
|
|
|
|
{@render galleryEntry({entry, reverseTextOrder})}
|
|
|
|
|
{/each}
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
{#snippet galleryEntry({entry, reverseTextOrder}: {entry: GalleryEntry, reverseTextOrder?: boolean})}
|
|
|
|
|
<!-- {#snippet galleryEntry({key, post, index}: {key: string, post: DevlogPost, index: number})} -->
|
|
|
|
|
<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">
|
|
|
|
|
{#if reverseTextOrder}
|
2026-01-23 14:19:20 +01:00
|
|
|
<p class="gallery-subtitle">{@html entry.subtitle}</p>
|
2026-01-21 22:08:09 +01:00
|
|
|
<p class="gallery-title">{entry.title}</p>
|
|
|
|
|
{:else}
|
|
|
|
|
<p class="gallery-title">{entry.title}</p>
|
2026-01-23 14:19:20 +01:00
|
|
|
<p class="gallery-subtitle">{@html entry.subtitle}</p>
|
2026-01-21 22:08:09 +01:00
|
|
|
{/if}
|
|
|
|
|
</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;
|
|
|
|
|
height: 80px;
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: row;
|
|
|
|
|
text-decoration: none;
|
|
|
|
|
align-items: center;
|
|
|
|
|
margin: 6px 0;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-31 20:24:26 +01:00
|
|
|
.gallery-img, .gallery-img-placeholder {
|
2026-01-21 22:08:09 +01:00
|
|
|
width: 145px;
|
2026-01-23 14:19:20 +01:00
|
|
|
min-width: 145px;
|
2026-01-21 22:08:09 +01:00
|
|
|
height: 100%;
|
|
|
|
|
margin: 0;
|
|
|
|
|
object-fit: cover;
|
2026-02-02 20:59:10 +01:00
|
|
|
/* filter: grayscale(60%); */
|
|
|
|
|
transition: margin 0.1s ease-out;
|
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 {
|
|
|
|
|
display: flex;
|
|
|
|
|
flex-direction: column;
|
|
|
|
|
flex-grow: 1;
|
|
|
|
|
height: 100%;
|
|
|
|
|
padding-left: 16px;
|
2026-02-02 20:59:10 +01:00
|
|
|
padding-right: 16px;
|
2026-01-21 22:08:09 +01:00
|
|
|
border-style: dashed;
|
|
|
|
|
justify-content: center;
|
|
|
|
|
border-color: transparent;
|
|
|
|
|
border-width: 2px;
|
|
|
|
|
border-left: none;
|
2026-02-02 20:59:10 +01:00
|
|
|
transition: border-color 0.1s ease-out, padding-right 0.1s ease-out;
|
2026-01-21 22:08:09 +01:00
|
|
|
}
|
|
|
|
|
|
2026-01-23 14:19:20 +01:00
|
|
|
.gallery-title, .gallery-subtitle {
|
2026-01-21 22:08:09 +01:00
|
|
|
margin: 0;
|
|
|
|
|
transition: color 0.1s ease-out;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.gallery-title {
|
|
|
|
|
font-family: var(--font-mono);
|
|
|
|
|
font-weight: 700;
|
|
|
|
|
}
|
|
|
|
|
|
2026-01-23 14:19:20 +01:00
|
|
|
.gallery-subtitle {
|
|
|
|
|
font-size: 1.0rem;
|
2026-01-31 21:44:58 +01:00
|
|
|
line-height: 1.2rem;
|
2026-01-23 14:19:20 +01:00
|
|
|
}
|
|
|
|
|
|
2026-01-21 22:08:09 +01:00
|
|
|
.gallery-container:hover .gallery-text-container {
|
|
|
|
|
border-color: var(--color-highlight);
|
|
|
|
|
}
|
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%); */
|
|
|
|
|
margin-left: 8px;
|
|
|
|
|
}
|
|
|
|
|
.gallery-container:hover .gallery-text-container {
|
|
|
|
|
padding-right: 8px;
|
2026-01-21 22:08:09 +01:00
|
|
|
}
|
|
|
|
|
.gallery-container:hover p {
|
|
|
|
|
color: var(--color-highlight);
|
|
|
|
|
}
|
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>
|