mirror of
https://github.com/wukko/cobalt.git
synced 2025-06-13 13:47:38 +02:00
frontend: setup initial updates page
This commit is contained in:
36
web/src/components/misc/ChangelogEntry.svelte
Normal file
36
web/src/components/misc/ChangelogEntry.svelte
Normal file
@ -0,0 +1,36 @@
|
||||
<script lang="ts">
|
||||
export let version: string;
|
||||
export let title: string;
|
||||
export let date: string;
|
||||
export let banner: { file: string, alt: string } | undefined;
|
||||
</script>
|
||||
<style>
|
||||
img {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
h1, h2 {
|
||||
padding-top: 1em;
|
||||
}
|
||||
|
||||
.contents :global(.text-backdrop) {
|
||||
border-radius: 4px;
|
||||
background-color: var(--button);
|
||||
color: var(--background);
|
||||
padding: 0.3rem;
|
||||
}
|
||||
|
||||
.contents :global(.text-backdrop.link) {
|
||||
text-decoration: underline;
|
||||
}
|
||||
</style>
|
||||
<div>
|
||||
<h1>{ version }: { title }</h1>
|
||||
<h2>{ date }</h2>
|
||||
{#if banner}
|
||||
<img src={`/update-banners/${banner.file}`} alt={banner.alt} />
|
||||
{/if}
|
||||
<div class="contents">
|
||||
<slot></slot>
|
||||
</div>
|
||||
</div>
|
11
web/src/components/misc/ChangelogEntryWrapper.svelte
Normal file
11
web/src/components/misc/ChangelogEntryWrapper.svelte
Normal file
@ -0,0 +1,11 @@
|
||||
<!-- Workaround for https://github.com/pngwn/MDsveX/issues/116 -->
|
||||
<script lang="ts">
|
||||
import ChangelogEntry from "./ChangelogEntry.svelte";
|
||||
export let version = '';
|
||||
export let title = '';
|
||||
export let date = '';
|
||||
export let banner = undefined;
|
||||
</script>
|
||||
<ChangelogEntry {version} {title} {date} {banner}>
|
||||
<slot></slot>
|
||||
</ChangelogEntry>
|
Reference in New Issue
Block a user