mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2025-09-05 17:00:39 +00:00
added imprint_html option
This commit is contained in:
@@ -10,6 +10,8 @@
|
||||
<a href="/about">/about</a>
|
||||
{#if $status?.imprint_url}
|
||||
<a href={$status.imprint_url} target="_blank" rel="noopener noreferrer">/imprint</a>
|
||||
{:else if $status?.imprint_html}
|
||||
<a href="/imprint">/imprint</a>
|
||||
{/if}
|
||||
<a href="https://github.com/cupcakearmy/cryptgeon" target="_blank" rel="noopener noreferrer">
|
||||
code
|
||||
|
35
packages/frontend/src/routes/imprint/+page.svelte
Normal file
35
packages/frontend/src/routes/imprint/+page.svelte
Normal file
@@ -0,0 +1,35 @@
|
||||
<script lang="ts">
|
||||
import { get } from 'svelte/store';
|
||||
import { goto } from '$app/navigation';
|
||||
import { status } from '$lib/stores/status'
|
||||
|
||||
status.subscribe((config) => {
|
||||
if (config != null) {
|
||||
if (config.imprint_url) {
|
||||
window.location = config.imprint_url;
|
||||
}
|
||||
else if (config.imprint_html == "") {
|
||||
goto("/about");
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
|
||||
<svelte:head>
|
||||
<title>Imprint</title>
|
||||
</svelte:head>
|
||||
|
||||
<section class="content">
|
||||
{#if $status?.imprint_html}
|
||||
{@html $status.imprint_html}
|
||||
{/if}
|
||||
</section>
|
||||
|
||||
<style>
|
||||
section {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 2rem;
|
||||
}
|
||||
</style>
|
Reference in New Issue
Block a user