parent
6401aeb3a8
commit
5741cbe756
1
public/privacy_en.md
Normal file
1
public/privacy_en.md
Normal file
@ -0,0 +1 @@
|
|||||||
|
Nostrud tempor dolor aute ea excepteur aute mollit elit eiusmod exercitation. Magna laborum pariatur adipisicing pariatur cupidatat exercitation duis aliquip pariatur sint exercitation deserunt labore. Consectetur id laboris dolore nostrud do velit ipsum. Eu laboris velit do commodo ad ea sint ex cillum. Cillum ipsum qui eiusmod laborum mollit sunt dolore incididunt. Cillum sunt culpa veniam voluptate et qui ut magna anim occaecat ut mollit dolor. Duis irure proident eu incididunt dolore sunt nisi aute dolore amet eu fugiat laboris quis.
|
@ -51,6 +51,7 @@
|
|||||||
import UserPermissions from "./components/UserPermissions.svelte";
|
import UserPermissions from "./components/UserPermissions.svelte";
|
||||||
import RunnerDetail from "./components/RunnerDetail.svelte";
|
import RunnerDetail from "./components/RunnerDetail.svelte";
|
||||||
import Imprint from "./components/Imprint.svelte";
|
import Imprint from "./components/Imprint.svelte";
|
||||||
|
import Privacy from "./components/Privacy.svelte";
|
||||||
store.init();
|
store.init();
|
||||||
registerSW();
|
registerSW();
|
||||||
</script>
|
</script>
|
||||||
@ -68,6 +69,10 @@
|
|||||||
<Route path="/imprint">
|
<Route path="/imprint">
|
||||||
<Imprint />
|
<Imprint />
|
||||||
</Route>
|
</Route>
|
||||||
|
{:else if $router.path === '/privacy'}
|
||||||
|
<Route path="/privacy">
|
||||||
|
<Privacy />
|
||||||
|
</Route>
|
||||||
{:else if $store.isLoggedIn}
|
{:else if $store.isLoggedIn}
|
||||||
<Dashboard>
|
<Dashboard>
|
||||||
<Transition>
|
<Transition>
|
||||||
|
@ -1,17 +1,16 @@
|
|||||||
<script>
|
<script>
|
||||||
import { _, getLocaleFromNavigator } from "svelte-i18n";
|
import { _, getLocaleFromNavigator } from "svelte-i18n";
|
||||||
import * as css from "./imprint.css";
|
import * as css from "./simple.css";
|
||||||
import marked from "marked";
|
import marked from "marked";
|
||||||
let imprint_promise = Promise.resolve([]);
|
let html = "";
|
||||||
let imprinthtml = "";
|
async function load() {
|
||||||
async function loadImprint() {
|
|
||||||
let md = await fetch("/imprint_" + getLocaleFromNavigator() + ".md");
|
let md = await fetch("/imprint_" + getLocaleFromNavigator() + ".md");
|
||||||
if (!md.ok) {
|
if (!md.ok) {
|
||||||
md = await fetch("/imprint_en.md");
|
md = await fetch("/imprint_en.md");
|
||||||
}
|
}
|
||||||
imprinthtml = marked(await md.text());
|
html = marked(await md.text());
|
||||||
}
|
}
|
||||||
imprint_promise = loadImprint();
|
const promise = load();
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<div class="pt-12 px-4 sm:px-6 lg:px-8 lg:pt-20 bg-gray-900 pb-12">
|
<div class="pt-12 px-4 sm:px-6 lg:px-8 lg:pt-20 bg-gray-900 pb-12">
|
||||||
@ -25,11 +24,11 @@
|
|||||||
|
|
||||||
<div class="pt-0 pb-16 overflow-hidden lg:pt-12 lg:py-24">
|
<div class="pt-0 pb-16 overflow-hidden lg:pt-12 lg:py-24">
|
||||||
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
||||||
{#await imprint_promise}
|
{#await promise}
|
||||||
<p class="text-center w-full">{$_('imprint-loading')}</p>
|
<p class="text-center w-full">{$_('imprint-loading')}</p>
|
||||||
{:then}
|
{:then}
|
||||||
<div class="imprintcontent">
|
<div class="simplecontent">
|
||||||
{@html imprinthtml}
|
{@html html}
|
||||||
</div>
|
</div>
|
||||||
{:catch error}
|
{:catch error}
|
||||||
<div
|
<div
|
||||||
|
43
src/components/Privacy.svelte
Normal file
43
src/components/Privacy.svelte
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
<script>
|
||||||
|
import { _, getLocaleFromNavigator } from "svelte-i18n";
|
||||||
|
import * as css from "./simple.css";
|
||||||
|
import marked from "marked";
|
||||||
|
let html = "";
|
||||||
|
async function load() {
|
||||||
|
let md = await fetch("/privacy_" + getLocaleFromNavigator() + ".md");
|
||||||
|
if (!md.ok) {
|
||||||
|
md = await fetch("/privacy_en.md");
|
||||||
|
}
|
||||||
|
html = marked(await md.text());
|
||||||
|
}
|
||||||
|
const promise = load();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<div class="pt-12 px-4 sm:px-6 lg:px-8 lg:pt-20 bg-gray-900 pb-12">
|
||||||
|
<div class="text-center mb-8">
|
||||||
|
<h1
|
||||||
|
class="mt-9 font-display text-4xl leading-none font-semibold text-white sm:text-5xl lg:text-6xl">
|
||||||
|
{$_('privacy')}
|
||||||
|
</h1>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="pt-0 pb-16 overflow-hidden lg:pt-12 lg:py-24">
|
||||||
|
<div class="max-w-7xl mx-auto py-6 px-4 sm:px-6 lg:px-8">
|
||||||
|
{#await promise}
|
||||||
|
<p class="text-center w-full">{$_('privacy-loading')}</p>
|
||||||
|
{:then}
|
||||||
|
<div class="simplecontent">
|
||||||
|
{@html html}
|
||||||
|
</div>
|
||||||
|
{:catch error}
|
||||||
|
<div
|
||||||
|
class="text-white px-6 py-4 border-0 rounded relative mb-4 bg-red-500">
|
||||||
|
<span class="inline-block align-middle mr-8">
|
||||||
|
<b class="capitalize">{$_('general_promise_error')}</b>
|
||||||
|
{error}
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
{/await}
|
||||||
|
</div>
|
||||||
|
</div>
|
File diff suppressed because one or more lines are too long
1
src/components/simple.css
Normal file
1
src/components/simple.css
Normal file
File diff suppressed because one or more lines are too long
@ -128,6 +128,8 @@
|
|||||||
"please-provide-the-required-csv-xlsx-file": "Please provide the required csv/ xlsx file",
|
"please-provide-the-required-csv-xlsx-file": "Please provide the required csv/ xlsx file",
|
||||||
"please-provide-the-required-information-to-add-a-new-runner": "Please provide the required information to add a new runner.",
|
"please-provide-the-required-information-to-add-a-new-runner": "Please provide the required information to add a new runner.",
|
||||||
"please-provide-the-required-information-to-add-a-new-track": "Please provide the required information to add a new track.",
|
"please-provide-the-required-information-to-add-a-new-track": "Please provide the required information to add a new track.",
|
||||||
|
"privacy": "Privacy 🔒",
|
||||||
|
"privacy-loading": "Privacy loading...",
|
||||||
"profile-picture": "Profile Picture",
|
"profile-picture": "Profile Picture",
|
||||||
"read-license": "Read License",
|
"read-license": "Read License",
|
||||||
"register": "Register",
|
"register": "Register",
|
||||||
|
Loading…
x
Reference in New Issue
Block a user