2024-06-29 20:23:56 +02:00
|
|
|
<script lang="ts">
|
|
|
|
export let version: string;
|
|
|
|
export let title: string;
|
2024-07-17 11:07:25 +02:00
|
|
|
export let date: string | undefined;
|
2024-07-17 10:04:53 +02:00
|
|
|
export let banner: { file: string; alt: string } | undefined;
|
2024-07-17 11:07:25 +02:00
|
|
|
|
|
|
|
const formatDate = (dateString: string) => {
|
|
|
|
const date = new Date(dateString);
|
|
|
|
|
|
|
|
const months = ['January', 'February', 'March', 'April', 'May',
|
|
|
|
'June', 'July', 'August', 'September', 'October',
|
|
|
|
'November', 'December'];
|
|
|
|
|
|
|
|
return [
|
|
|
|
months[date.getUTCMonth()],
|
|
|
|
(date.getUTCDate() + 1) + ',',
|
|
|
|
date.getUTCFullYear()
|
|
|
|
].join(' ');
|
|
|
|
}
|
2024-06-29 20:23:56 +02:00
|
|
|
</script>
|
2024-07-17 09:32:07 +02:00
|
|
|
|
|
|
|
<main>
|
2024-07-21 10:45:24 +02:00
|
|
|
<div id="changelog-header" class:no-padding={!banner}>
|
2024-07-17 10:04:53 +02:00
|
|
|
<div class="changelog-info">
|
|
|
|
<div class="changelog-version">{version}</div>
|
2024-07-17 11:07:25 +02:00
|
|
|
{#if date}
|
|
|
|
<div class="changelog-date">{formatDate(date)}</div>
|
|
|
|
{/if}
|
2024-07-17 10:04:53 +02:00
|
|
|
</div>
|
|
|
|
<h1 class="changelog-title">{title}</h1>
|
|
|
|
</div>
|
2024-07-17 09:32:07 +02:00
|
|
|
<div class="changelog-content">
|
|
|
|
{#if banner}
|
|
|
|
<img
|
|
|
|
src={`/update-banners/${banner.file}`}
|
|
|
|
alt={banner.alt}
|
|
|
|
class="changelog-banner"
|
|
|
|
/>
|
|
|
|
{/if}
|
|
|
|
<div class="contents">
|
|
|
|
<slot></slot>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</main>
|
|
|
|
|
2024-06-29 20:23:56 +02:00
|
|
|
<style>
|
2024-07-16 19:19:17 +02:00
|
|
|
main {
|
2024-07-17 10:04:53 +02:00
|
|
|
overflow-x: hidden;
|
2024-06-29 20:23:56 +02:00
|
|
|
}
|
|
|
|
|
2024-07-17 10:04:53 +02:00
|
|
|
#changelog-header {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: start;
|
|
|
|
gap: calc(var(--padding) / 2);
|
2024-07-17 10:38:02 +02:00
|
|
|
padding-bottom: 1em; /* match default <p> padding */
|
2024-06-29 20:23:56 +02:00
|
|
|
}
|
|
|
|
|
2024-07-21 10:45:24 +02:00
|
|
|
#changelog-header.no-padding {
|
|
|
|
padding-bottom: 0;
|
|
|
|
}
|
|
|
|
|
2024-07-17 10:04:53 +02:00
|
|
|
.changelog-info {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: row;
|
|
|
|
align-items: center;
|
|
|
|
gap: 14px;
|
2024-06-29 20:23:56 +02:00
|
|
|
}
|
2024-07-16 19:19:17 +02:00
|
|
|
|
2024-07-17 10:04:53 +02:00
|
|
|
.changelog-version {
|
|
|
|
padding: 3px 8px;
|
|
|
|
border-radius: 6px;
|
|
|
|
background-color: var(--secondary);
|
|
|
|
color: var(--primary);
|
2024-07-17 10:34:03 +02:00
|
|
|
font-size: 18px;
|
2024-07-17 10:04:53 +02:00
|
|
|
font-weight: 500;
|
2024-07-16 19:19:17 +02:00
|
|
|
}
|
|
|
|
|
2024-07-17 10:04:53 +02:00
|
|
|
.changelog-date {
|
|
|
|
font-size: 13px;
|
|
|
|
font-weight: 500;
|
|
|
|
color: var(--gray);
|
2024-07-16 19:19:17 +02:00
|
|
|
}
|
|
|
|
|
2024-07-17 10:04:53 +02:00
|
|
|
.changelog-title {
|
|
|
|
padding: 0;
|
|
|
|
line-height: 1.2;
|
2024-07-17 10:34:03 +02:00
|
|
|
font-size: 23px;
|
2024-07-17 10:49:25 +02:00
|
|
|
user-select: text;
|
|
|
|
-webkit-user-select: text
|
2024-07-16 19:19:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.changelog-banner {
|
|
|
|
display: block;
|
|
|
|
object-fit: cover;
|
2024-07-17 10:04:53 +02:00
|
|
|
max-height: 320pt;
|
|
|
|
min-height: 210pt;
|
|
|
|
width: 100%;
|
|
|
|
max-width: 100;
|
2024-07-16 19:19:17 +02:00
|
|
|
aspect-ratio: 16/9;
|
2024-07-17 10:04:53 +02:00
|
|
|
border-radius: var(--padding);
|
2024-07-16 19:19:17 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.changelog-content {
|
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
|
|
|
align-items: center;
|
|
|
|
}
|
|
|
|
|
|
|
|
.contents {
|
|
|
|
max-width: 100%;
|
2024-07-17 10:29:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.contents,
|
|
|
|
.contents :global(*) {
|
|
|
|
line-height: 1.7;
|
|
|
|
font-size: 14.5px;
|
|
|
|
font-weight: 410;
|
2024-07-17 10:49:25 +02:00
|
|
|
font-family: "Noto Sans Mono Variable", "Noto Sans Mono", monospace;
|
|
|
|
user-select: text;
|
|
|
|
-webkit-user-select: text;
|
2024-07-17 10:29:46 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
:global(ul) {
|
|
|
|
padding-inline-start: 30px;
|
|
|
|
}
|
|
|
|
|
|
|
|
:global(li) {
|
|
|
|
padding-left: 3px;
|
2024-07-16 19:19:17 +02:00
|
|
|
}
|
2024-07-17 10:41:44 +02:00
|
|
|
|
|
|
|
@media screen and (max-width: 535px) {
|
|
|
|
.contents,
|
|
|
|
.contents :global(*) {
|
|
|
|
font-size: 14px;
|
|
|
|
}
|
|
|
|
}
|
2024-06-29 20:23:56 +02:00
|
|
|
</style>
|