Skip to content

Commit 3270ce8

Browse files
committed
feat: extract config
1 parent b2c9f5b commit 3270ce8

File tree

3 files changed

+56
-25
lines changed

3 files changed

+56
-25
lines changed

src/config/site.ts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
export const siteConfig = {
2+
name: "Turnverein Odernheim am Glan 1890 e.V.",
3+
shortName: "TV Odernheim",
4+
address: {
5+
street: "Turnhallstraße 6",
6+
city: "Odernheim am Glan",
7+
zip: "55571",
8+
country: "Deutschland",
9+
},
10+
contact: {
11+
phone: "+49 123 456789",
12+
email: "horizonte@tv-odernheim.de",
13+
},
14+
legal: {
15+
register: {
16+
court: "Amtsgericht Bad Kreuznach",
17+
number: "VR 667",
18+
},
19+
vatId: "DE 123 456 789",
20+
responsiblePerson: {
21+
name: "Kristen Hartmann",
22+
position: "2. Vorsitzende",
23+
},
24+
},
25+
social: {
26+
instagram: "https://instagram.com/tv_odernheim/",
27+
},
28+
};

src/layouts/Layout.astro

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
---
2+
import { siteConfig } from "../config/site";
3+
24
interface Props {
35
title: string;
46
description?: string;
@@ -17,7 +19,7 @@ const {
1719
<head>
1820
<meta charset="UTF-8" />
1921
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
20-
<title>{title} | TV Odernheim</title>
22+
<title>{title} | {siteConfig.shortName}</title>
2123
<meta name="description" content={description} />
2224
<link rel="icon" type="image/svg+xml" href="/favicon.svg" />
2325
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap" rel="stylesheet">
@@ -28,7 +30,7 @@ const {
2830
<div class="flex justify-between items-center">
2931
<a href="/" class="flex items-center space-x-3">
3032
<img src="/images/tvo-logo-red.png" alt="Turnverein Odernheim Logo" class="h-12 w-auto" />
31-
<span class="text-2xl font-bold">Turnverein Odernheim</span>
33+
<span class="text-2xl font-bold">{siteConfig.name}</span>
3234
</a>
3335
<div class="hidden md:flex space-x-6">
3436
<a href="/" class="hover:text-accent">Startseite</a>
@@ -69,15 +71,15 @@ const {
6971
<div class="container mx-auto px-4">
7072
<div class="grid grid-cols-1 md:grid-cols-3 gap-8">
7173
<div>
72-
<h3 class="text-xl font-bold mb-4">TV Odernheim</h3>
73-
<p>Turnverein Odernheim</p>
74-
<p>Musterstraße 123</p>
75-
<p>55571 Odernheim</p>
74+
<h3 class="text-xl font-bold mb-4">{siteConfig.shortName}</h3>
75+
<p>{siteConfig.name}</p>
76+
<p>{siteConfig.address.street}</p>
77+
<p>{siteConfig.address.zip} {siteConfig.address.city}</p>
7678
</div>
7779
<div>
7880
<h3 class="text-xl font-bold mb-4">Kontakt</h3>
79-
<p>Email: info@tv-odernheim.de</p>
80-
<p>Tel: +49 123 456789</p>
81+
<p>Email: {siteConfig.contact.email}</p>
82+
<p>Tel: {siteConfig.contact.phone}</p>
8183
</div>
8284
<div>
8385
<h3 class="text-xl font-bold mb-4">Links</h3>
@@ -88,7 +90,7 @@ const {
8890
</div>
8991
</div>
9092
<div class="mt-8 text-center">
91-
<p>&copy; {new Date().getFullYear()} TV Odernheim. Alle Rechte vorbehalten.</p>
93+
<p>&copy; {new Date().getFullYear()} {siteConfig.name}. Alle Rechte vorbehalten.</p>
9294
</div>
9395
</div>
9496
</footer>

src/pages/impressum.astro

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
---
2-
import Layout from '../layouts/Layout.astro';
2+
import Layout from "../layouts/Layout.astro";
3+
import { siteConfig } from "../config/site";
34
---
45

56
<Layout title="Impressum">
@@ -9,48 +10,48 @@ import Layout from '../layouts/Layout.astro';
910
<div class="bg-white p-6 rounded-lg shadow-md mb-8">
1011
<h2 class="text-2xl font-bold mb-4">Angaben gemäß § 5 TMG</h2>
1112
<p class="mb-4">
12-
Turnverein Odernheim e.V.<br />
13-
Musterstraße 123<br />
14-
55571 Odernheim
13+
{siteConfig.name}<br />
14+
{siteConfig.address.street}<br />
15+
{siteConfig.address.zip} {siteConfig.address.city}
1516
</p>
1617

1718
<h2 class="text-2xl font-bold mb-4">Kontakt</h2>
1819
<p class="mb-4">
19-
Telefon: +49 123 456789<br />
20-
E-Mail: info@tv-odernheim.de
20+
Telefon: {siteConfig.contact.phone}<br />
21+
E-Mail: {siteConfig.contact.email}
2122
</p>
2223

23-
<h2 class="text-2xl font-bold mb-4">Vertreten durch</h2>
24+
<h2 class="text-2xl font-bold mb-4">Stellvertretende Vorsitzende, nach § 26 BGB</h2>
2425
<p class="mb-4">
25-
Max Mustermann<br />
26-
1. Vorsitzender
26+
{siteConfig.legal.responsiblePerson.name}<br />
27+
{siteConfig.legal.responsiblePerson.position}
2728
</p>
2829

2930
<h2 class="text-2xl font-bold mb-4">Registereintrag</h2>
3031
<p class="mb-4">
3132
Eintragung im Vereinsregister<br />
32-
Registergericht: Amtsgericht Bad Kreuznach<br />
33-
Registernummer: VR 1234
33+
Registergericht: {siteConfig.legal.register.court}<br />
34+
Registernummer: {siteConfig.legal.register.number}
3435
</p>
3536

3637
<h2 class="text-2xl font-bold mb-4">Umsatzsteuer-ID</h2>
3738
<p class="mb-4">
3839
Umsatzsteuer-Identifikationsnummer gemäß § 27 a Umsatzsteuergesetz:<br />
39-
DE 123 456 789
40+
{siteConfig.legal.vatId}
4041
</p>
4142

4243
<h2 class="text-2xl font-bold mb-4">Verantwortlich für den Inhalt nach § 55 Abs. 2 RStV</h2>
4344
<p class="mb-4">
44-
Max Mustermann<br />
45-
Musterstraße 123<br />
46-
55571 Odernheim
45+
{siteConfig.legal.responsiblePerson.name}<br />
46+
{siteConfig.address.street}<br />
47+
{siteConfig.address.zip} {siteConfig.address.city}
4748
</p>
4849
</div>
4950

5051
<div class="bg-gray-100 p-6 rounded-lg">
5152
<h2 class="text-2xl font-bold mb-4">Streitschlichtung</h2>
5253
<p class="mb-4">
53-
Die Europäische Kommission stellt eine Plattform zur Online-Streitbeilegung (OS) bereit:
54+
Die Europäische Kommission stellt eine Plattform zur Online-Streitbeilegung (OS) bereit:
5455
<a href="https://ec.europa.eu/consumers/odr/" class="text-primary hover:text-secondary">
5556
https://ec.europa.eu/consumers/odr/
5657
</a>

0 commit comments

Comments
 (0)