refactor: simplify imprint + privacy

This commit is contained in:
Philipp Dormann 2025-03-18 21:12:23 +01:00
parent 0ff6df68d6
commit 50fbfe05f1
Signed by: philipp
GPG Key ID: 3BB9ADD52DCA4314
9 changed files with 11 additions and 102 deletions

View File

@ -1,14 +1,14 @@
const config = { const config = {
// required // required
documentserver_key: '', documentserver_key: "",
// required, with trailing slash // required, with trailing slash
baseurl: '', baseurl: "",
// optional, full url, will fallback to https://lauf-fuer-kaya.de/impressum
url_imprint: "",
// optional, full url, will fallback to https://lauf-fuer-kaya.de/datenschutz
url_privacy: "",
// full url (including fqdn) // full url (including fqdn)
baseurl_documentserver: 'http://localhost:3000', baseurl_documentserver: "http://localhost:3000",
// optional, will fallback to code128 // optional, will fallback to code128
code_format: 'ean13', code_format: "ean13",
// optional, will fallback to /imprint
url_imprint: '',
// optional, will fallback to /privacy
url_privacy: '',
}; };

View File

@ -1 +0,0 @@
TODO:

View File

@ -1 +0,0 @@
TODO:

View File

@ -19,8 +19,8 @@
export default { export default {
data() { data() {
return { return {
imprint_url: config.url_imprint || "/imprint" imprint_url: config.url_imprint || "https://lauf-fuer-kaya.de/impressum"
, privacy_url: config.url_privacy || "/privacy" , privacy_url: config.url_privacy || "https://lauf-fuer-kaya.de/datenschutz"
} }
}, },
} }

View File

@ -17,8 +17,6 @@
"download_registrationcode": "Registrierungscode herunterladen", "download_registrationcode": "Registrierungscode herunterladen",
"e_mail_adress": "E-Mail Adresse", "e_mail_adress": "E-Mail Adresse",
"e_mail_des_sponsors": "E-Mail des Sponsors", "e_mail_des_sponsors": "E-Mail des Sponsors",
"error-loading-privacy-policy": "Fehler beim Laden der Datenschutzerklärung",
"error_loading_imprint": "Fehler beim Laden des Impressums",
"error_requesting_the_login_link": "Fehler beim Anfordern des Login-Links...", "error_requesting_the_login_link": "Fehler beim Anfordern des Login-Links...",
"first_lap": "👏 erste Runde", "first_lap": "👏 erste Runde",
"i_accept": "Ich habe die ", "i_accept": "Ich habe die ",

View File

@ -17,8 +17,6 @@
"download_registrationcode": "Download registrationcode", "download_registrationcode": "Download registrationcode",
"e_mail_adress": "mail address", "e_mail_adress": "mail address",
"e_mail_des_sponsors": "E-Mail of the Sponsor", "e_mail_des_sponsors": "E-Mail of the Sponsor",
"error-loading-privacy-policy": "Error loading Privacy Policy",
"error_loading_imprint": "Error loading Imprint",
"error_requesting_the_login_link": "Error requesting the login link...", "error_requesting_the_login_link": "Error requesting the login link...",
"first_lap": "👏 first lap", "first_lap": "👏 first lap",
"i_accept": "I have read and accepted the ", "i_accept": "I have read and accepted the ",

View File

@ -1,19 +1,13 @@
import Home from "./views/Home.vue"; import Home from "./views/Home.vue";
import Imprint from "./views/Imprint.vue";
import Privacy from "./views/Privacy.vue";
import Register from "./views/Register.vue"; import Register from "./views/Register.vue";
import Profile from "./views/Profile.vue"; import Profile from "./views/Profile.vue";
import ProfileNone from "./views/ProfileNone.vue"; import ProfileNone from "./views/ProfileNone.vue";
console.log(config); // console.log(config);
/** @type {import('vue-router').RouterOptions['routes']} */ /** @type {import('vue-router').RouterOptions['routes']} */
export const routes = [ export const routes = [
{ path: "/", component: Home }, { path: "/", component: Home },
{ path: "/imprint", component: Imprint },
{ path: "/imprint/", component: Imprint },
{ path: "/privacy", component: Privacy },
{ path: "/privacy/", component: Privacy },
{ path: "/register", component: Register }, { path: "/register", component: Register },
{ path: "/register/", component: Register }, { path: "/register/", component: Register },
{ path: "/register/:token", component: Register, props: true }, { path: "/register/:token", component: Register, props: true },

View File

@ -1,40 +0,0 @@
<template>
<section class="px-4 py-24 mx-auto">
<div class="simplecontent">
<div class="mb-24 text-left md:text-center">
<h1 class="mb-4 text-4xl font-bold leading-tight text-gray-900 dark:text-gray-50 md:text-5xl">{{ $t('imprint')
}}
</h1>
</div>
<div class="mx-auto prose" v-html="content"></div>
</div>
</section>
<Footer></Footer>
</template>
<style src="../simple.css"></style>
<script>
import { marked } from "marked";
import Footer from "@/components/Footer.vue";
export default {
components: { Footer },
data() {
return {
content: "",
}
},
async beforeMount() {
const browserlocale = ((navigator.languages && navigator.languages[0]) || '').substr(0, 2);
let md = "";
try {
md = await fetch(`/imprint_${browserlocale}.md`);
} catch (error) {
try {
md = await fetch(`/imprint_en.md`);
} catch (error) {
md = t('error_loading_imprint');
}
}
this.content = marked(await md.text());
},
}
</script>

View File

@ -1,39 +0,0 @@
<template>
<section class="px-4 py-24 mx-auto">
<div class="simplecontent">
<div class="mb-24 text-left md:text-center">
<h1 class="mb-4 text-4xl font-bold leading-tight text-gray-900 dark:text-gray-50 md:text-5xl">{{
$t('privacy_policy') }}</h1>
</div>
<div class="mx-auto prose" v-html="content"></div>
</div>
</section>
<Footer></Footer>
</template>
<style src="../simple.css"></style>
<script>
import { marked } from "marked";
import Footer from "@/components/Footer.vue";
export default {
components: { Footer },
data() {
return {
content: ""
}
},
async beforeMount() {
const browserlocale = ((navigator.languages && navigator.languages[0]) || '').substr(0, 2);
let md = "";
try {
md = await fetch(`/privacy_${browserlocale}.md`);
} catch (error) {
try {
md = await fetch(`/privacy_en.md`);
} catch (error) {
md = t('error-loading-privacy-policy');
}
}
this.content = marked(await md.text());
},
}
</script>