Adding inital website!

This commit is contained in:
Moritz Graf 2025-12-19 16:56:50 +01:00
commit 574eed4dd1
37 changed files with 7810 additions and 0 deletions

24
.gitignore vendored Normal file
View File

@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?

3
.vscode/extensions.json vendored Normal file
View File

@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}

93
DEVELOPMENT.md Normal file
View File

@ -0,0 +1,93 @@
# Developer Documentation: Haumdaucher Website
Welcome to the technical documentation for the "Haumdaucher" website. This guide provides an overview of the architecture, file structure, and how to extend the project.
## 🏗 Project Architecture
The website is a modern **Vue 3** application built with **Vite** and **TypeScript**. It's designed as a high-performance, themed one-pager.
### Tech Stack
- **Framework**: [Vue.js 3](https://vuejs.org/) (Composition API)
- **Build Tool**: [Vite](https://vitejs.dev/)
- **Language**: [TypeScript](https://www.typescriptlang.org/)
- **Styling**: Vanilla CSS with CSS Variables for theming.
- **Deployment**: Docker & Kubernetes.
---
## 📁 Project Structure
```text
haumdaucher_de/
├── src/
│ ├── assets/
│ │ ├── images/ # Themed logos and other graphic assets
│ │ └── styles/
│ │ └── global.css # Core CSS variables and design tokens
│ ├── components/
│ │ ├── layout/ # Global layout components (Header, Footer)
│ │ └── sections/ # Main content sections (Hero, About, etc.)
│ ├── locales/
│ │ └── i18n.ts # Translation files (DE and BAR)
│ ├── App.vue # Root component & state management
│ └── main.ts # Entry point
├── Dockerfile # Containerization configuration
├── k8s-manifests.yaml # Kubernetes resources
├── deploy.sh # Deployment automation script
└── DEVELOPMENT.md # This documentation
```
---
## 🛠 How to Modify
### 1. Adding/Changing Styles (Themes)
Theming is handled via `[data-theme]` attributes on the `<html>` element. All colors and transition speeds are defined as CSS variables in [src/assets/styles/global.css](file:///Users/moritz/src/haumdaucher_de/src/assets/styles/global.css).
- **To add a new theme**: Define a new `[data-theme='your-theme']` block in `global.css` with the required variables.
- **To update existing themes**: Modify the variables within the respective blocks (`:root`, `[data-theme='unicorn']`, `[data-theme='luxury']`).
### 2. Updating Content (i18n)
All text content is externalized in [src/locales/i18n.ts](file:///Users/moritz/src/haumdaucher_de/src/locales/i18n.ts).
- **To change text**: Locate the key in the `messages` object for both `de` (German) and `bar` (Bavarian) and update the string.
- **To add a new language**: Add a new top-level key to the `messages` object and implement all required fields.
### 3. Modifying Sections
Each section of the one-pager is a standalone Vue component in `src/components/sections/`.
- [Hero.vue](file:///Users/moritz/src/haumdaucher_de/src/components/sections/Hero.vue): Handles the dynamic logo and splash screen.
- [About.vue](file:///Users/moritz/src/haumdaucher_de/src/components/sections/About.vue): "Wer mir san" section.
- [History.vue](file:///Users/moritz/src/haumdaucher_de/src/components/sections/History.vue): Origin of the name.
- [Beer.vue](file:///Users/moritz/src/haumdaucher_de/src/components/sections/Beer.vue): The beer and culture section.
---
## 🚀 Local Development
To run the project locally for development or testing:
1. **Check Node Version**:
This project is optimized for **Node.js 16.11.1+** (using Vite 4 for compatibility). If you have a newer Node version (20+), it will also work perfectly.
2. **Install Dependencies**:
```bash
npm install
```
2. **Start Dev Server**:
```bash
npm run dev
```
The site will be available at [http://localhost:5173/](http://localhost:5173/).
3. **Build for Production**:
```bash
npm run build
```
The optimized assets will be generated in the `dist/` directory.
---
## 🎡 Kubernetes Deployment
For information on deploying to a Kubernetes cluster, refer to the [deploy.sh](file:///Users/moritz/src/haumdaucher_de/deploy.sh) script and [k8s-manifests.yaml](file:///Users/moritz/src/haumdaucher_de/k8s-manifests.yaml).

13
Dockerfile Normal file
View File

@ -0,0 +1,13 @@
# Build stage
FROM node:lts-alpine as build-stage
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
# Production stage
FROM nginx:stable-alpine as production-stage
COPY --from=build-stage /app/dist /usr/share/nginx/html
EXPOSE 80
CMD ["nginx", "-g", "daemon off;"]

23
README.md Normal file
View File

@ -0,0 +1,23 @@
# Haumdaucher Website 🦢🍻
D'Offizielle Website der Haumdaucher aus Regensburg.
## 🚀 Quick Start (Local)
```bash
npm install
npm run dev
```
Visit [http://localhost:5173/](http://localhost:5173/) to see the site.
## 🛠 Documentation
For detailed information on the project structure, how to modify themes, update content, or deploy to Kubernetes, please see the **[Development Guide](DEVELOPMENT.md)**.
## 🎡 Deployment
Use the provided deployment script to push to your Kubernetes cluster:
```bash
./deploy.sh
```
Check [k8s-manifests.yaml](k8s-manifests.yaml) for resource definitions.

22
deploy.sh Executable file
View File

@ -0,0 +1,22 @@
#!/bin/bash
# Configuration
NAMESPACE="haumdaucher"
IMAGE_NAME="haumdaucher-website"
TAG="latest"
echo "🚀 Starting deployment for Haumdaucher..."
# Create namespace if it doesn't exist
kubectl create namespace $NAMESPACE --dry-run=client -o yaml | kubectl apply -f -
# Build the docker image
echo "📦 Building Docker image..."
docker build -t $IMAGE_NAME:$TAG .
# Apply manifests
echo "🎡 Applying Kubernetes manifests..."
kubectl apply -f k8s-manifests.yaml
echo "✅ Deployment complete!"
echo "Check status with: kubectl get pods -n $NAMESPACE"

17
index.html Normal file
View File

@ -0,0 +1,17 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
<title>Haumdaucher Regensburg</title>
<meta name="theme-color" content="#ffffff" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="default" />
<link rel="apple-touch-icon" href="/icon-192.png" />
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.ts"></script>
</body>
</html>

57
k8s-manifests.yaml Normal file
View File

@ -0,0 +1,57 @@
apiVersion: apps/v1
kind: Deployment
metadata:
name: haumdaucher-website
namespace: haumdaucher
labels:
app: haumdaucher
spec:
replicas: 2
selector:
matchLabels:
app: haumdaucher
template:
metadata:
labels:
app: haumdaucher
spec:
containers:
- name: haumdaucher
image: haumdaucher-website:latest
imagePullPolicy: IfNotPresent
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: haumdaucher-service
namespace: haumdaucher
spec:
selector:
app: haumdaucher
ports:
- protocol: TCP
port: 80
targetPort: 80
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: haumdaucher-ingress
namespace: haumdaucher
annotations:
kubernetes.io/ingress.class: nginx
spec:
rules:
- host: haumdaucher.de
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: haumdaucher-service
port:
number: 80

6232
package-lock.json generated Normal file

File diff suppressed because it is too large Load Diff

23
package.json Normal file
View File

@ -0,0 +1,23 @@
{
"name": "haumdaucher_de",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.3.4"
},
"devDependencies": {
"@types/node": "^16.11.1",
"@vitejs/plugin-vue": "^4.5.2",
"@vue/tsconfig": "^0.4.0",
"typescript": "~5.2.2",
"vite": "^4.5.3",
"vite-plugin-pwa": "^1.2.0",
"vue-tsc": "^1.8.8"
}
}

BIN
public/icon-192.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

BIN
public/icon-512.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

1
public/vite.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

129
src/App.vue Normal file
View File

@ -0,0 +1,129 @@
<script setup lang="ts">
import { ref, onMounted, watch } from 'vue'
import Header from './components/layout/Header.vue'
import Hero from './components/sections/Hero.vue'
import About from './components/sections/About.vue'
import History from './components/sections/History.vue'
import Beer from './components/sections/Beer.vue'
import HaumdaucherGame from './components/layout/HaumdaucherGame.vue'
import { messages } from './locales/i18n'
const theme = ref('classic')
const lang = ref<'de' | 'bar'>('de')
const showGame = ref(false)
const showBSOD = ref(false)
const boars = ref<{id: number, top: number}[]>([])
const toggleTheme = (newTheme: string) => {
theme.value = newTheme
document.documentElement.setAttribute('data-theme', newTheme)
localStorage.setItem('haumdaucher-theme', newTheme)
if (newTheme === 'nat') {
startBoarRun()
}
}
const startBoarRun = () => {
setInterval(() => {
if (theme.value === 'nat') {
const id = Date.now()
boars.value.push({ id, top: Math.random() * 80 + 10 })
setTimeout(() => {
boars.value = boars.value.filter(b => b.id !== id)
}, 5000)
}
}, 8000)
}
const triggerBSOD = () => {
if (theme.value === 'win95') {
showBSOD.value = true
setTimeout(() => showBSOD.value = false, 3000)
}
}
const toggleLang = (newLang: 'de' | 'bar') => {
lang.value = newLang
localStorage.setItem('haumdaucher-lang', newLang)
}
onMounted(() => {
const savedTheme = localStorage.getItem('haumdaucher-theme')
if (savedTheme) toggleTheme(savedTheme)
const savedLang = localStorage.getItem('haumdaucher-lang') as 'de' | 'bar'
if (savedLang) lang.value = savedLang
})
const t = (key: string) => {
const keys = key.split('.')
let result: any = messages[lang.value]
for (const k of keys) {
if (result[k]) result = result[k]
else return key
}
return result
}
</script>
<template>
<Header
:currentTheme="theme"
:currentLang="lang"
@update:theme="toggleTheme"
@update:lang="toggleLang"
@open:game="showGame = true"
:t="t"
/>
<main @click="triggerBSOD">
<Hero :theme="theme" :t="t" />
<About :t="t" />
<History :t="t" />
<Beer :t="t" />
</main>
<HaumdaucherGame v-if="showGame" :t="t" @close="showGame = false" />
<div v-if="showBSOD" class="bsod">
<h1>:(</h1>
<p>A problem has been detected and Windows has been shut down to prevent damage to your Haumdaucher.</p>
<p>DRIVER_IRQL_NOT_LESS_OR_EQUAL</p>
<p>Press any key to continue... just kidding, it's a website.</p>
</div>
<div v-for="boar in boars" :key="boar.id" class="running-boar" :style="{ top: boar.top + '%' }">🐗💨</div>
<footer class="container" style="padding: 40px 0; opacity: 0.6; font-size: 0.9em;">
© {{ new Date().getFullYear() }} Haumdaucher Regensburg. Alles für den Vogel.
</footer>
</template>
<style>
@import './assets/styles/global.css';
.bsod {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: #0000aa;
color: white;
z-index: 3000;
padding: 50px;
font-family: 'Courier New', monospace;
}
.running-boar {
position: fixed;
left: -100px;
font-size: 3rem;
z-index: 1500;
animation: run-across 5s linear forwards;
}
@keyframes run-across {
0% { left: -100px; }
100% { left: 100vw; }
}
</style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 616 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 676 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 695 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 451 KiB

View File

@ -0,0 +1,156 @@
:root {
--bg-color: #ffffff;
--text-color: #000000;
--primary-color: #000000;
--accent-color: #333333;
--header-bg: rgba(255, 255, 255, 0.85);
--glass-border: rgba(0, 0, 0, 0.1);
--font-family: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
--transition-speed: 0.3s;
--safe-area-bottom: env(safe-area-inset-bottom);
}
/* Mobile-first: Base styles are for mobile */
* {
box-sizing: border-box;
}
html,
body {
width: 100%;
max-width: 100vw;
margin: 0;
padding: 0;
overflow-x: hidden !important;
-webkit-tap-highlight-color: transparent;
position: relative;
}
#app {
width: 100%;
max-width: 100vw;
overflow-x: hidden;
}
body {
background-color: var(--bg-color);
color: var(--text-color);
font-family: var(--font-family);
transition: background-color var(--transition-speed), color var(--transition-speed);
overscroll-behavior-y: none;
}
.container {
width: 100%;
max-width: 100%;
margin: 0;
padding: 0 10px;
/* Reduced from 15px to save space */
box-sizing: border-box;
}
/* App-like Sections */
section {
width: 100%;
min-height: 100dvh;
/* Dynamic viewport height for mobile */
padding: 80px 0 calc(80px + var(--safe-area-bottom));
overflow-x: hidden;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
text-align: center;
}
.fancy-glass {
background: var(--header-bg);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
border: 1px solid var(--glass-border);
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}
.alternate-bg {
padding: 30px 10px;
margin: 0 10px;
border-radius: 20px;
width: calc(100% - 20px);
}
h1,
h2,
h3 {
font-weight: 700;
letter-spacing: -0.02em;
overflow-wrap: break-word;
word-wrap: break-word;
}
p {
line-height: 1.6;
opacity: 0.9;
overflow-wrap: break-word;
max-width: 100%;
}
/* Theme Overrides (Remain same but refined) */
[data-theme='unicorn'] {
--bg-color: #fff0fb;
--text-color: #4a148c;
--primary-color: #f06292;
--accent-color: #ba68c8;
--header-bg: rgba(255, 240, 251, 0.85);
--glass-border: rgba(240, 98, 146, 0.2);
}
[data-theme='luxury'] {
--bg-color: #0a0a0a;
--text-color: #e0e0e0;
--primary-color: #d4af37;
--accent-color: #e5e4e2;
--header-bg: rgba(10, 10, 10, 0.85);
--glass-border: rgba(212, 175, 55, 0.3);
}
[data-theme='win95'] {
--bg-color: #008080;
--text-color: #000000;
--primary-color: #c0c0c0;
--accent-color: #808080;
--header-bg: #c0c0c0;
--glass-border: #ffffff;
--font-family: 'MS Sans Serif', Tahoma, sans-serif;
cursor: url('https://cur.cursors-4u.net/games/gam-4/gam373.cur'), auto;
}
[data-theme='win95'] * {
border-radius: 0 !important;
}
[data-theme='win95'] .fancy-glass {
border: 2px solid;
border-color: #ffffff #808080 #808080 #ffffff;
}
[data-theme='nat'] {
--bg-color: #1a2f1a;
--text-color: #d4c4a8;
--primary-color: #4a3728;
--accent-color: #8b5a2b;
--header-bg: rgba(26, 47, 26, 0.9);
--glass-border: #2e4d2e;
--font-family: 'Courier New', monospace;
}
[data-theme='nat'] .fancy-glass {
border: 3px solid #4a3728;
background-image: url('https://www.transparenttextures.com/patterns/dark-matter.png');
}
/* Desktop Polish */
@media (min-width: 768px) {
section {
padding: 100px 40px;
}
}

1
src/assets/vue.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>

After

Width:  |  Height:  |  Size: 496 B

View File

@ -0,0 +1,41 @@
<script setup lang="ts">
import { ref } from 'vue'
defineProps<{ msg: string }>()
const count = ref(0)
</script>
<template>
<h1>{{ msg }}</h1>
<div class="card">
<button type="button" @click="count++">count is {{ count }}</button>
<p>
Edit
<code>components/HelloWorld.vue</code> to test HMR
</p>
</div>
<p>
Check out
<a href="https://vuejs.org/guide/quick-start.html#local" target="_blank"
>create-vue</a
>, the official Vue + Vite starter
</p>
<p>
Learn more about IDE Support for Vue in the
<a
href="https://vuejs.org/guide/scaling-up/tooling.html#ide-support"
target="_blank"
>Vue Docs Scaling up Guide</a
>.
</p>
<p class="read-the-docs">Click on the Vite and Vue logos to learn more</p>
</template>
<style scoped>
.read-the-docs {
color: #888;
}
</style>

View File

@ -0,0 +1,271 @@
<script setup lang="ts">
import { ref, onMounted, onUnmounted } from 'vue'
const props = defineProps<{
t: (key: string) => string
}>()
const emit = defineEmits(['close'])
const canvas = ref<HTMLCanvasElement | null>(null)
const gameState = ref<'start' | 'playing' | 'gameOver' | 'win'>('start')
const score = ref(0)
const level = ref(1)
let ctx: CanvasRenderingContext2D | null = null
let animationId: number
let playerX = 200
const playerY = 500
const playerWidth = 40
const playerHeight = 40
interface Obstacle {
x: number
y: number
type: 'trash' | 'boat' | 'boar'
speed: number
}
const obstacles = ref<Obstacle[]>([])
const keys = ref<Record<string, boolean>>({})
const initGame = () => {
gameState.value = 'playing'
score.value = 0
level.value = 1
obstacles.value = []
playerX = 180
gameLoop()
}
const gameLoop = () => {
if (gameState.value !== 'playing') return
update()
draw()
animationId = requestAnimationFrame(gameLoop)
}
const update = () => {
// Move player
if (keys.value['ArrowLeft'] && playerX > 0) playerX -= 5
if (keys.value['ArrowRight'] && playerX < 360) playerX += 5
// Spawn obstacles
if (Math.random() < 0.012 + level.value * 0.003) {
const type = level.value === 10 ? 'boar' : (Math.random() > 0.5 ? 'trash' : 'boat')
obstacles.value.push({
x: Math.random() * 360,
y: -50,
type: type,
speed: 2 + level.value * 0.4
})
}
// Move and filter obstacles
obstacles.value.forEach(obs => {
obs.y += obs.speed
// Collision detection
if (
playerX < obs.x + 30 &&
playerX + playerWidth > obs.x &&
playerY < obs.y + 30 &&
playerY + playerWidth > obs.y
) {
gameState.value = 'gameOver'
}
})
obstacles.value = obstacles.value.filter(obs => obs.y < 650)
// Score and level up
score.value += 1
if (score.value % 500 === 0 && level.value < 10) {
level.value += 1
}
if (score.value > 5500) {
gameState.value = 'win'
}
}
const draw = () => {
if (!ctx) return
ctx.clearRect(0, 0, 400, 600)
// Draw River (Donube)
ctx.fillStyle = '#1e3a8a'
ctx.fillRect(0, 0, 400, 600)
// Draw Waves
ctx.strokeStyle = 'rgba(255,255,255,0.2)'
for (let i = 0; i < 5; i++) {
ctx.beginPath()
ctx.moveTo(0, (Date.now() / 20 + i * 120) % 650)
ctx.lineTo(400, (Date.now() / 20 + i * 120) % 650)
ctx.stroke()
}
// Draw Player (Bird)
ctx.font = '40px Arial'
ctx.fillText('🦢', playerX, playerY)
// Draw Obstacles
obstacles.value.forEach(obs => {
let emoji = '🗑️'
if (obs.type === 'boat') emoji = '🚤'
if (obs.type === 'boar') emoji = '🐗'
ctx.fillText(emoji, obs.x, obs.y)
})
}
const handleKeydown = (e: KeyboardEvent) => keys.value[e.key] = true
const handleKeyup = (e: KeyboardEvent) => keys.value[e.key] = false
onMounted(() => {
if (canvas.value) {
ctx = canvas.value.getContext('2d')
window.addEventListener('keydown', handleKeydown)
window.addEventListener('keyup', handleKeyup)
}
})
onUnmounted(() => {
cancelAnimationFrame(animationId)
window.removeEventListener('keydown', handleKeydown)
window.removeEventListener('keyup', handleKeyup)
})
</script>
<template>
<div class="game-overlay fancy-glass">
<div class="game-window">
<div class="game-header">
<span>{{ t('game.title') }}</span>
<button @click="emit('close')">X</button>
</div>
<div class="canvas-container">
<canvas ref="canvas" width="400" height="600"></canvas>
<div v-if="gameState === 'start'" class="overlay-content">
<h2>{{ t('game.title') }}</h2>
<p>Weich am Schmarrn in da Donau aus!</p>
<button @click="initGame">{{ t('game.start') }}</button>
</div>
<div v-if="gameState === 'gameOver'" class="overlay-content">
<h2 style="color: #ff4444">{{ t('game.gameOver') }}</h2>
<p>Score: {{ score }}</p>
<button @click="initGame">No amoi!</button>
</div>
<div v-if="gameState === 'win'" class="overlay-content">
<h2 style="color: #44ff44">🏆 {{ t('game.win') }}</h2>
<p>Du hosd es gschafft!</p>
<button @click="emit('close')">Zruck zur Website</button>
</div>
<div v-if="gameState === 'playing'" class="game-stats">
<span>{{ t('game.level') }}: {{ level === 10 ? 'NATinator' : level }}</span>
<span>Score: {{ score }}</span>
</div>
</div>
</div>
</div>
</template>
<style scoped>
.game-overlay {
position: fixed;
top: 0;
left: 0;
right: 0;
bottom: 0;
z-index: 2000;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0,0,0,0.8);
}
.game-window {
background: #c0c0c0;
border: 3px solid;
border-color: #ffffff #808080 #808080 #ffffff;
padding: 4px;
width: 420px;
}
.game-header {
background: #000080;
color: white;
padding: 4px 8px;
display: flex;
justify-content: space-between;
align-items: center;
font-weight: bold;
margin-bottom: 4px;
}
.game-header button {
background: #c0c0c0;
border: 2px solid;
border-color: #ffffff #808080 #808080 #ffffff;
padding: 0 6px;
cursor: pointer;
color: black;
}
.canvas-container {
position: relative;
border: 2px solid #000;
}
canvas {
display: block;
background: #1e3a8a;
}
.overlay-content {
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
background: rgba(0,0,0,0.7);
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
color: white;
text-align: center;
padding: 20px;
}
.overlay-content h2 { margin-bottom: 20px; }
.overlay-content button {
background: #c0c0c0;
border: 3px solid;
border-color: #ffffff #808080 #808080 #ffffff;
padding: 10px 20px;
font-weight: bold;
cursor: pointer;
margin-top: 20px;
}
.game-stats {
position: absolute;
top: 10px;
left: 10px;
right: 10px;
display: flex;
justify-content: space-between;
color: white;
font-weight: bold;
background: rgba(0,0,0,0.5);
padding: 5px 10px;
}
</style>

View File

@ -0,0 +1,211 @@
<script setup lang="ts">
defineProps<{
currentTheme: string
currentLang: string
t: (key: string) => string
}>()
const emit = defineEmits(['update:theme', 'update:lang', 'open:game'])
</script>
<template>
<header class="fancy-glass header-top">
<div class="container top-content">
<div class="logo-text">HAUMDAUCHER</div>
<div class="controls">
<!-- Combined switch for better mobile spacing -->
<div class="control-wrapper">
<div class="switch-group">
<button
v-for="l in ['de', 'bar']"
:key="l"
:class="{ active: currentLang === l }"
@click="emit('update:lang', l)"
>
{{ l.toUpperCase() }}
</button>
</div>
<div class="switch-group">
<button
v-for="th in ['classic', 'unicorn', 'luxury', 'win95', 'nat']"
:key="th"
:class="{ active: currentTheme === th }"
@click="emit('update:theme', th)"
class="theme-btn"
:title="th"
>
<span v-if="th === 'classic'"></span>
<span v-if="th === 'unicorn'">🦄</span>
<span v-if="th === 'luxury'">👑</span>
<span v-if="th === 'win95'">💾</span>
<span v-if="th === 'nat'">🐗</span>
</button>
</div>
</div>
</div>
</div>
</header>
<!-- Mobile Bottom Nav -->
<nav class="fancy-glass mobile-nav">
<a href="#home" class="nav-item">🏠<span>{{ t('nav.home') }}</span></a>
<a href="#about" class="nav-item">👥<span>{{ t('nav.about') }}</span></a>
<button class="nav-item game-btn" @click="emit('open:game')">🕹<span>{{ t('nav.game') }}</span></button>
<a href="#history" class="nav-item">📜<span>{{ t('nav.history') }}</span></a>
<a href="#beer" class="nav-item">🍺<span>{{ t('nav.beer') }}</span></a>
</nav>
<!-- Desktop Side Nav / Links -->
<nav class="desktop-links">
<div class="container">
<a href="#about">{{ t('nav.about') }}</a>
<a href="#history">{{ t('nav.history') }}</a>
<a href="#beer">{{ t('nav.beer') }}</a>
<button class="game-nav-btn" @click="emit('open:game')">{{ t('nav.game') }}</button>
</div>
</nav>
</template>
<style scoped>
.header-top {
position: fixed;
top: 0;
left: 0;
right: 0;
z-index: 1000;
padding: 10px 0;
}
.top-content {
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 10px;
}
.logo-text {
font-weight: 900;
letter-spacing: 1px;
font-size: 0.9rem;
white-space: nowrap;
}
.controls {
display: flex;
align-items: center;
justify-content: flex-end;
flex: 1;
}
.control-wrapper {
display: flex;
gap: 8px;
align-items: center;
flex-wrap: wrap;
justify-content: flex-end;
}
.switch-group {
display: flex;
background: rgba(0,0,0,0.05);
padding: 2px;
border-radius: 8px;
}
button {
background: none;
border: none;
padding: 4px 8px;
border-radius: 6px;
cursor: pointer;
font-weight: bold;
font-size: 0.7rem;
color: inherit;
opacity: 0.5;
transition: all 0.2s;
}
button.active {
background: var(--primary-color);
color: white;
opacity: 1;
}
/* Mobile Nav Styles */
.mobile-nav {
position: fixed;
bottom: 0;
left: 0;
right: 0;
height: 65px;
z-index: 1000;
display: flex;
justify-content: space-around;
align-items: center;
padding-bottom: var(--safe-area-bottom);
border-radius: 20px 20px 0 0;
}
.nav-item {
text-decoration: none;
color: inherit;
font-size: 1.2rem;
display: flex;
flex-direction: column;
align-items: center;
gap: 2px;
background: none;
border: none;
}
.nav-item span {
font-size: 0.6rem;
font-weight: 500;
opacity: 0.7;
}
.desktop-links {
display: none;
}
/* Desktop Overrides */
@media (min-width: 768px) {
.logo-text { font-size: 1.2rem; }
.mobile-nav { display: none; }
.desktop-links {
display: block;
position: fixed;
top: 60px;
left: 0;
right: 0;
z-index: 999;
background: transparent;
padding: 10px 0;
text-align: center;
}
.desktop-links div {
display: flex;
justify-content: center;
gap: 30px;
align-items: center;
}
.desktop-links a {
text-decoration: none;
color: inherit;
font-weight: 500;
opacity: 0.8;
}
.desktop-links a:hover { opacity: 1; }
}
.game-nav-btn {
background: var(--primary-color);
color: white;
border: none;
padding: 8px 16px;
border-radius: 20px;
cursor: pointer;
font-weight: bold;
transition: transform 0.2s;
}
</style>

View File

@ -0,0 +1,52 @@
<script setup lang="ts">
defineProps<{
t: (key: string) => string
}>()
</script>
<template>
<section id="about" class="about">
<div class="container fancy-glass alternate-bg">
<h2 class="section-title">{{ t('about.title') }}</h2>
<p class="section-text">{{ t('about.content') }}</p>
<div class="friends-grid">
<div v-for="i in 5" :key="i" class="friend-avatar">🍻</div>
</div>
</div>
</section>
</template>
<style scoped>
.about {
background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.02) 100%);
}
.alternate-bg {
padding: 60px;
border-radius: 40px;
}
.section-title {
font-size: clamp(1.8rem, 8vw, 3rem);
margin-bottom: 20px;
}
.section-text {
font-size: clamp(1rem, 4vw, 1.3rem);
max-width: 800px;
margin: 0 auto 30px;
}
.friends-grid {
display: flex;
justify-content: center;
gap: 20px;
font-size: 2rem;
}
.friend-avatar {
background: rgba(var(--primary-color), 0.1);
padding: 20px;
border-radius: 50%;
}
</style>

View File

@ -0,0 +1,38 @@
<script setup lang="ts">
defineProps<{
t: (key: string) => string
}>()
</script>
<template>
<section id="beer" class="beer">
<div class="container fancy-glass alternate-bg">
<h2 class="section-title">{{ t('beer.title') }}</h2>
<p class="section-text">{{ t('beer.content') }}</p>
<div class="beer-animation">🍺 🍺 🍺</div>
</div>
</section>
</template>
<style scoped>
.history {
background-attachment: fixed;
}
.section-title {
font-size: clamp(1.8rem, 8vw, 3rem);
margin-bottom: 20px;
}
.section-text {
font-size: clamp(1rem, 4vw, 1.3rem);
max-width: 800px;
margin: 0 auto 30px;
}
.bird-accent {
font-size: 5rem;
margin-top: 40px;
opacity: 0.3;
}
</style>

View File

@ -0,0 +1,100 @@
<script setup lang="ts">
import { computed } from 'vue'
const props = defineProps<{
theme: string
t: (key: string) => string
}>()
const logoSrc = computed(() => {
if (props.theme === 'unicorn') return '/src/assets/images/logo_unicorn.png'
if (props.theme === 'luxury') return '/src/assets/images/logo_luxury.png'
if (props.theme === 'win95') return '/src/assets/images/logo_win95.png'
if (props.theme === 'nat') return '/src/assets/images/logo_nat.png'
return '/src/assets/images/logo_classic.png'
})
</script>
<template>
<section id="home" class="hero">
<div class="container hero-content">
<div class="logo-container">
<img :src="logoSrc" :key="theme" alt="Haumdaucher Logo" class="hero-logo" />
</div>
<h1 class="hero-title">{{ t('hero.title') }}</h1>
<p class="hero-subtitle">{{ t('hero.subtitle') }}</p>
<div class="scroll-indicator"></div>
</div>
</section>
</template>
<style scoped>
.hero {
position: relative;
overflow: hidden;
}
.hero-content {
display: flex;
flex-direction: column;
align-items: center;
}
.logo-container {
margin-bottom: 40px;
perspective: 1000px;
}
.hero-logo {
width: 300px;
height: auto;
animation: logo-entry 1s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes logo-entry {
0% { transform: scale(0.5) rotateY(90deg); opacity: 0; }
100% { transform: scale(1) rotateY(0); opacity: 1; }
}
.hero-title {
font-size: clamp(1.8rem, 8vw, 4rem); /* Reduced base from 2rem to 1.8rem */
margin-bottom: 10px;
text-transform: uppercase;
line-height: 1.1;
width: 100%;
max-width: 100vw;
overflow-wrap: break-word;
}
.hero-subtitle {
font-size: clamp(1rem, 5vw, 1.5rem);
font-style: italic;
width: 100%;
padding: 0 20px;
}
.scroll-indicator {
margin-top: 60px;
font-size: 2rem;
animation: bounce 2s infinite;
}
@keyframes bounce {
0%, 20%, 50%, 80%, 100% {transform: translateY(0);}
40% {transform: translateY(-10px);}
60% {transform: translateY(-5px);}
}
[data-theme='luxury'] .hero-title {
background: linear-gradient(45deg, #d4af37, #f7ef8a, #d4af37);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
text-shadow: 0 10px 20px rgba(0,0,0,0.3);
}
[data-theme='unicorn'] .hero-title {
background: linear-gradient(45deg, #f06292, #ba68c8, #64b5f6);
-webkit-background-clip: text;
-webkit-text-fill-color: transparent;
}
</style>

View File

@ -0,0 +1,47 @@
<script setup lang="ts">
defineProps<{
t: (key: string) => string
}>()
</script>
<template>
<section id="history" class="history">
<div class="container fancy-glass alternate-bg">
<h2 class="section-title">{{ t('history.title') }}</h2>
<p class="section-text">{{ t('history.content') }}</p>
<div class="bird-accent">🦢</div>
</div>
</section>
</template>
<style scoped>
.beer {
padding-bottom: 150px;
}
.alternate-bg {
padding: 60px;
border-radius: 40px;
}
.section-title {
font-size: clamp(1.8rem, 8vw, 3rem);
margin-bottom: 20px;
}
.section-text {
font-size: clamp(1rem, 4vw, 1.3rem);
max-width: 800px;
margin: 0 auto 30px;
}
.beer-animation {
font-size: 4rem;
animation: clink 2s infinite ease-in-out;
}
@keyframes clink {
0%, 100% { transform: rotate(0); }
50% { transform: rotate(10deg) scale(1.1); }
}
</style>

80
src/locales/i18n.ts Normal file
View File

@ -0,0 +1,80 @@
export const messages = {
de: {
nav: {
home: 'Start',
about: 'Über uns',
history: 'Geschichte',
beer: 'Bier & Gaudi',
game: 'Haumdaucher Game'
},
hero: {
title: 'D\'Haumdaucher',
subtitle: 'Eine Gemeinschaft aus Regensburg offen für alle.'
},
about: {
title: 'Wer wir sind',
content: 'Wir sind eine Truppe von etwa 15 Freunden aus Regensburg, die sich schon ewig kennen. Doch wir sind kein geschlossener Kreis: Wir freuen uns über jede neue Bekanntschaft und sind offen für die Welt.'
},
history: {
title: 'Die Geschichte der Haumdaucher',
content: 'Der "Haubentaucher" ist ein edler Vogel. Wir haben daraus den "Haumdaucher" gemacht bayerisch, bodenständig, aber mit dem Blick über den Tellerrand.'
},
beer: {
title: 'Bier & Gaudi',
content: 'Geselligkeit steht bei uns an erster Stelle. Ob beim bayerischen Hellen oder beim Austausch mit neuen Gesichtern bei uns ist jeder willkommen.'
},
themes: {
classic: 'Klassisch',
unicorn: 'Einhorn',
luxury: 'Luxus',
win95: 'Windows 95',
nat: 'NAT-Mode'
},
game: {
title: 'Haumdaucher Scroller',
start: 'Spiel starten',
gameOver: 'Ausgmacht! Game Over.',
level: 'Level',
win: 'NATinator bezwungen! Du bist a echter Haumdaucher.'
}
},
bar: {
nav: {
home: 'Dahoam',
about: 'Wer mir san',
history: 'Wia ois ogfanga hod',
beer: 'Bia & Gaudi',
game: 'Haumdaucher Spui'
},
hero: {
title: 'D\'Haumdaucher',
subtitle: 'A echte Rengschbuaga Gschicht offn fia olle.'
},
about: {
title: 'Wer mir san',
content: 'Mir san a Hauffa vo ca. 15 Spezln aus Rengschbuag. Mia hoidn zam, oba mir san fia jedn offn, dea a bisserl a Gmiatlichkeit midbringt.'
},
history: {
title: 'Vom Haubndaucha zum Haumdaucha',
content: 'Da "Haubentaucher" is a scheena Vogl. Mia hom an "Haumdaucher" draus gmocht boarisch, ehrlich und offn fia de ganze Welt.'
},
beer: {
title: 'Bia & Gaudi',
content: 'Gmiatlickheit is des Wichtigste. Egal ob mid am gscheidn Hellen oda mid neie Leit bei uns ghead jeda dazua.'
},
themes: {
classic: 'Klassisch',
unicorn: 'Einhorn',
luxury: 'Luxus',
win95: 'Windows 95',
nat: 'NAT-Mode'
},
game: {
title: 'Haumdaucher Spui',
start: 'Af geht\'s!',
gameOver: 'Schluss is! Game Over.',
level: 'Level',
win: 'NATinator gschlong! Du bist a Pfundskerl.'
}
}
}

5
src/main.ts Normal file
View File

@ -0,0 +1,5 @@
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
createApp(App).mount('#app')

79
src/style.css Normal file
View File

@ -0,0 +1,79 @@
:root {
font-family: system-ui, Avenir, Helvetica, Arial, sans-serif;
line-height: 1.5;
font-weight: 400;
color-scheme: light dark;
color: rgba(255, 255, 255, 0.87);
background-color: #242424;
font-synthesis: none;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
a {
font-weight: 500;
color: #646cff;
text-decoration: inherit;
}
a:hover {
color: #535bf2;
}
body {
margin: 0;
display: flex;
place-items: center;
min-width: 320px;
min-height: 100vh;
}
h1 {
font-size: 3.2em;
line-height: 1.1;
}
button {
border-radius: 8px;
border: 1px solid transparent;
padding: 0.6em 1.2em;
font-size: 1em;
font-weight: 500;
font-family: inherit;
background-color: #1a1a1a;
cursor: pointer;
transition: border-color 0.25s;
}
button:hover {
border-color: #646cff;
}
button:focus,
button:focus-visible {
outline: 4px auto -webkit-focus-ring-color;
}
.card {
padding: 2em;
}
#app {
max-width: 1280px;
margin: 0 auto;
padding: 2rem;
text-align: center;
}
@media (prefers-color-scheme: light) {
:root {
color: #213547;
background-color: #ffffff;
}
a:hover {
color: #747bff;
}
button {
background-color: #f9f9f9;
}
}

19
tsconfig.app.json Normal file
View File

@ -0,0 +1,19 @@
{
"extends": "@vue/tsconfig/tsconfig.dom.json",
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.app.tsbuildinfo",
"types": [
"vite/client"
],
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"noFallthroughCasesInSwitch": true
},
"include": [
"src/**/*.ts",
"src/**/*.tsx",
"src/**/*.vue"
]
}

7
tsconfig.json Normal file
View File

@ -0,0 +1,7 @@
{
"files": [],
"references": [
{ "path": "./tsconfig.app.json" },
{ "path": "./tsconfig.node.json" }
]
}

26
tsconfig.node.json Normal file
View File

@ -0,0 +1,26 @@
{
"compilerOptions": {
"tsBuildInfoFile": "./node_modules/.tmp/tsconfig.node.tsbuildinfo",
"target": "ES2023",
"lib": ["ES2023"],
"module": "ESNext",
"types": ["node"],
"skipLibCheck": true,
/* Bundler mode */
"moduleResolution": "bundler",
"allowImportingTsExtensions": true,
"verbatimModuleSyntax": true,
"moduleDetection": "force",
"noEmit": true,
/* Linting */
"strict": true,
"noUnusedLocals": true,
"noUnusedParameters": true,
"erasableSyntaxOnly": true,
"noFallthroughCasesInSwitch": true,
"noUncheckedSideEffectImports": true
},
"include": ["vite.config.ts"]
}

40
vite.config.ts Normal file
View File

@ -0,0 +1,40 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { VitePWA } from 'vite-plugin-pwa'
export default defineConfig({
plugins: [
vue(),
VitePWA({
registerType: 'autoUpdate',
includeAssets: ['favicon.ico', 'icon-512.png', 'icon-192.png'],
manifest: {
name: 'Haumdaucher Regensburg',
short_name: 'Haumdaucher',
description: 'D\'Offizielle Website der Haumdaucher aus Regensburg.',
theme_color: '#ffffff',
background_color: '#ffffff',
display: 'standalone',
orientation: 'portrait',
icons: [
{
src: 'icons/icon-192x192.png',
sizes: '192x192',
type: 'image/png'
},
{
src: 'icons/icon-512x512.png',
sizes: '512x512',
type: 'image/png'
},
{
src: 'icons/icon-512x512.png',
sizes: '512x512',
type: 'image/png',
purpose: 'any maskable'
}
]
}
})
]
})