Files
pages/src/lib/components/changelog-entry.svelte

87 lines
1.9 KiB
Svelte
Raw Normal View History

2026-02-02 21:30:21 +01:00
<script lang="ts">
export interface ChangelogEntry {
date: string;
time: string;
content: string;
link?: string;
}
let {
entry,
}: {
entry: ChangelogEntry;
} = $props();
</script>
<div class="changelog-entry">
<div class="changelog-entry-timestamp-container">
<span>{entry.date}</span>
<span class="changelog-entry-timestamp-comma">,&nbsp;</span>
<span>{entry.time}</span>
</div>
<span class="changelog-entry-timestamp-divider">::</span>
2026-02-02 21:30:21 +01:00
<p>
{entry.content}
{#if entry.link}
<a class="changelog-entry-link" href="{entry.link}">»</a>
{/if}
</p>
</div>
<style>
.changelog-entry * {
margin: 0;
}
.changelog-entry {
display: flex;
flex-direction: row;
gap: 8px;
margin: 4px 0;
}
.changelog-entry p {
font-size: 1.0rem;
line-height: 1.3rem;
}
.changelog-entry-timestamp-container {
display: flex;
flex-direction: row;
}
.changelog-entry-timestamp-container *, .changelog-entry-timestamp-divider {
2026-02-02 21:30:21 +01:00
font-family: var(--font-mono);
font-size: 0.8rem;
line-height: 1.3rem;
font-weight: 500;
2026-02-02 21:30:21 +01:00
color: var(--color-highlight);
min-width: fit-content;
}
.changelog-entry-link {
font-family: var(--font-mono);
font-size: 1.2rem;
2026-02-02 21:30:21 +01:00
color: var(--color-highlight);
text-decoration: none;
line-height: 1.3rem;
2026-02-02 21:30:21 +01:00
}
.changelog-entry-link:hover {
font-weight: 700;
}
@media screen and (max-width: 550px) {
/* Align timestamp texts vertically */
.changelog-entry-timestamp-container {
flex-direction: column;
align-items: end;
}
/* Hide separating comma */
.changelog-entry-timestamp-comma {
display: none;
}
}
2026-02-02 21:30:21 +01:00
</style>