Move various tabs into buttons, more work on a11y

This commit is contained in:
Pieter Vander Vennet 2023-12-20 02:49:34 +01:00
parent 58fa9a4cd4
commit cce9b879f2
5 changed files with 105 additions and 25 deletions

View file

@ -0,0 +1,34 @@
<script lang="ts">
import Tr from "../Base/Tr.svelte"
import Translations from "../i18n/Translations"
const t = Translations.t.privacy
</script>
<div class="link-underline flex flex-col">
<Tr t={t.intro} />
<h3>
<Tr t={t.trackingTitle} />
</h3>
<Tr t={t.tracking} />
<h3>
<Tr t={t.geodataTitle} />
</h3>
<Tr t={t.geodataTitle} />
<h3>
<Tr t={t.editingTitle} />
</h3>
<Tr t={t.editing} />
<h3>
<Tr t={t.miscCookiesTitle} />
</h3>
<Tr t={t.miscCookies} />
<h3>
<Tr t={t.whileYoureHere} />
</h3>
<Tr t={t.surveillance} />
</div>

View file

@ -1,25 +0,0 @@
import Combine from "../Base/Combine"
import Translations from "../i18n/Translations"
import Title from "../Base/Title"
export default class PrivacyPolicy extends Combine {
constructor() {
const t = Translations.t.privacy
super([
new Title(t.title, 2),
t.intro,
new Title(t.trackingTitle),
t.tracking,
new Title(t.geodataTitle),
t.geodata,
new Title(t.editingTitle),
t.editing,
new Title(t.miscCookiesTitle),
t.miscCookies,
new Title(t.whileYoureHere),
t.surveillance,
])
this.SetClass("link-underline")
}
}

22
src/UI/PrivacyGui.svelte Normal file
View file

@ -0,0 +1,22 @@
<script lang="ts">
import PrivacyPolicy from "./BigComponents/PrivacyPolicy.svelte"
import Tr from "./Base/Tr.svelte"
import { EyeIcon } from "@rgossiaux/svelte-heroicons/solid"
import Translations from "./i18n/Translations"
import { Utils } from "../Utils"
import Add from "../assets/svg/Add.svelte"
</script>
<div class="flex flex-col p-4 h-screen overflow-hidden">
<h2 class="flex items-center">
<EyeIcon class="w-6 pr-2" />
<Tr t={Translations.t.privacy.title} />
</h2>
<div class="overflow-auto h-full border border-gray-500 p-4">
<PrivacyPolicy />
</div>
<a class="flex button" href={Utils.HomepageLink()}>
<Add class="h-6 w-6" />
<Tr t={Translations.t.general.backToIndex} />
</a>
</div>

3
src/privacy_index.ts Normal file
View file

@ -0,0 +1,3 @@
import SvelteUIElement from "./UI/Base/SvelteUIElement"
import PrivacyGui from "./UI/PrivacyGui.svelte"
new SvelteUIElement(PrivacyGui, {}).AttachTo("main")