Compare commits

..

No commits in common. "v1.73.0" and "v1.72.0" have entirely different histories.

7 changed files with 72 additions and 1480 deletions

View file

@ -12,8 +12,3 @@ ci:
- changed-files: - changed-files:
- any-glob-to-any-file: - any-glob-to-any-file:
- ".gitea/**" - ".gitea/**"
docs:
- changed-files:
- any-glob-to-any-file:
- "docs/**"

View file

@ -1,28 +0,0 @@
name: Build docs
on:
push:
branches: [main]
jobs:
build-docs:
runs-on: ubuntu-latest
container:
image: git.kjan.de/actions/runner-latex:latest
env:
# Edit here with the names of your latex file and directory (can use ".")
DIR: docs
FILE: projektdokumentation.tex
steps:
- name: Checkout
uses: actions/checkout@v4
- name: LaTeX compile
working-directory: ${{ env.DIR }}
run: latexmk -pdf -xelatex ${{ env.FILE }}
- name: Upload artifacts
uses: https://git.kjan.de/actions/upload-artifact@v4
with:
name: Doku
path: docs/projektdokumentation.pdf

File diff suppressed because it is too large Load diff

View file

@ -21,7 +21,13 @@
(click)="showRegisterForm()" (click)="showRegisterForm()"
class="w-full sm:w-auto button-primary px-6 sm:px-8 py-3 shadow-lg" class="w-full sm:w-auto button-primary px-6 sm:px-8 py-3 shadow-lg"
> >
Jetzt registrieren Konto erstellen
</button>
<button
(click)="showLoginForm()"
class="w-full sm:w-auto bg-slate-700 text-white hover:bg-slate-600 px-6 sm:px-8 py-3 shadow-lg rounded"
>
Anmelden
</button> </button>
} }
</div> </div>
@ -40,63 +46,33 @@
<div class="game-card-content"> <div class="game-card-content">
<h3 class="game-heading-sm">Slots</h3> <h3 class="game-heading-sm">Slots</h3>
<p class="game-text">Klassische Spielautomaten</p> <p class="game-text">Klassische Spielautomaten</p>
@if (isLoggedIn()) { <a
<a routerLink="game/slots"
routerLink="game/slots" class="button-primary w-full py-2 inline-block text-center"
class="button-primary w-full py-2 inline-block text-center" >Jetzt Spielen</a
> >
Jetzt Spielen
</a>
} @else {
<button
(click)="showLoginForm()"
class="button-primary w-full py-2 inline-block text-center"
>
Jetzt Spielen
</button>
}
</div> </div>
</div> </div>
<div class="hidden lg:block card"> <div class="hidden lg:block card">
<div class="game-card-content"> <div class="game-card-content">
<h3 class="game-heading-sm">Blackjack</h3> <h3 class="game-heading-sm">Blackjack</h3>
<p class="game-text">Klassisches Kartenspiel</p> <p class="game-text">Klassisches Kartenspiel</p>
@if (isLoggedIn()) { <a
<a routerLink="game/blackjack"
routerLink="game/blackjack" class="button-primary w-full py-2 inline-block text-center"
class="button-primary w-full py-2 inline-block text-center" >Jetzt Spielen</a
> >
Jetzt Spielen
</a>
} @else {
<button
(click)="showLoginForm()"
class="button-primary w-full py-2 inline-block text-center"
>
Jetzt Spielen
</button>
}
</div> </div>
</div> </div>
<div class="hidden lg:block card"> <div class="hidden lg:block card">
<div class="game-card-content"> <div class="game-card-content">
<h3 class="game-heading-sm">Coinflip</h3> <h3 class="game-heading-sm">Coinflip</h3>
<p class="game-text">Münzwurf</p> <p class="game-text">Münzwurf</p>
@if (isLoggedIn()) { <a
<a routerLink="game/blackjack"
routerLink="game/coinflip" class="button-primary w-full py-2 inline-block text-center"
class="button-primary w-full py-2 inline-block text-center" >Jetzt Spielen</a
> >
Jetzt Spielen
</a>
} @else {
<button
(click)="showLoginForm()"
class="button-primary w-full py-2 inline-block text-center"
>
Jetzt Spielen
</button>
}
</div> </div>
</div> </div>
</div> </div>
@ -106,42 +82,22 @@
<div class="game-card-content"> <div class="game-card-content">
<h3 class="game-heading-sm">Dice</h3> <h3 class="game-heading-sm">Dice</h3>
<p class="game-text">Würfelspiel</p> <p class="game-text">Würfelspiel</p>
@if (isLoggedIn()) { <a
<a routerLink="/game/dice"
routerLink="game/dice" class="button-primary w-full py-2 inline-block text-center"
class="button-primary w-full py-2 inline-block text-center" >Jetzt Spielen</a
> >
Jetzt Spielen
</a>
} @else {
<button
(click)="showLoginForm()"
class="button-primary w-full py-2 inline-block text-center"
>
Jetzt Spielen
</button>
}
</div> </div>
</div> </div>
<div class="hidden lg:block card"> <div class="hidden lg:block card">
<div class="game-card-content"> <div class="game-card-content">
<h3 class="game-heading-sm">Lootboxen</h3> <h3 class="game-heading-sm">Lootboxen</h3>
<p class="game-text">Überraschungskisten</p> <p class="game-text">Überraschungskisten</p>
@if (isLoggedIn()) { <a
<a routerLink="game/lootboxes"
routerLink="game/lootboxes" class="button-primary w-full py-2 inline-block text-center"
class="button-primary w-full py-2 inline-block text-center" >Jetzt Spielen</a
> >
Jetzt Spielen
</a>
} @else {
<button
(click)="showLoginForm()"
class="button-primary w-full py-2 inline-block text-center"
>
Jetzt Spielen
</button>
}
</div> </div>
</div> </div>
</div> </div>

View file

@ -23,14 +23,15 @@ import RecoverPasswordComponent from '../auth/recover-password/recover-password.
}) })
export class LandingComponent implements OnInit, OnDestroy { export class LandingComponent implements OnInit, OnDestroy {
currentSlide = 0; currentSlide = 0;
private autoplayInterval: ReturnType<typeof setInterval> | undefined;
authService: AuthService = inject(AuthService); authService: AuthService = inject(AuthService);
route: ActivatedRoute = inject(ActivatedRoute); route: ActivatedRoute = inject(ActivatedRoute);
showLogin = signal(false); showLogin = signal(false);
showRegister = signal(false); showRegister = signal(false);
showRecoverPassword = signal(false); showRecoverPassword = signal(false);
isLoggedIn = signal(this.authService.isLoggedIn());
ngOnInit() { ngOnInit() {
this.startAutoplay();
document.body.style.overflow = 'auto'; document.body.style.overflow = 'auto';
if (this.route.snapshot.queryParamMap.get('login') === 'true') { if (this.route.snapshot.queryParamMap.get('login') === 'true') {
this.showLoginForm(); this.showLoginForm();
@ -38,6 +39,7 @@ export class LandingComponent implements OnInit, OnDestroy {
} }
ngOnDestroy() { ngOnDestroy() {
this.stopAutoplay();
document.body.style.overflow = 'auto'; document.body.style.overflow = 'auto';
} }
@ -71,13 +73,33 @@ export class LandingComponent implements OnInit, OnDestroy {
prevSlide() { prevSlide() {
this.currentSlide = this.currentSlide === 0 ? 1 : 0; this.currentSlide = this.currentSlide === 0 ? 1 : 0;
this.resetAutoplay();
} }
nextSlide() { nextSlide() {
this.currentSlide = this.currentSlide === 1 ? 0 : 1; this.currentSlide = this.currentSlide === 1 ? 0 : 1;
this.resetAutoplay();
} }
goToSlide(index: number) { goToSlide(index: number) {
this.currentSlide = index; this.currentSlide = index;
this.resetAutoplay();
}
private startAutoplay() {
this.autoplayInterval = setInterval(() => {
this.nextSlide();
}, 5000);
}
private stopAutoplay() {
if (this.autoplayInterval) {
clearInterval(this.autoplayInterval);
}
}
private resetAutoplay() {
this.stopAutoplay();
this.startAutoplay();
} }
} }

View file

@ -10,23 +10,13 @@
</a> </a>
<div class="hidden md:flex items-center space-x-1"> <div class="hidden md:flex items-center space-x-1">
@if (isLoggedIn()) { <a
<a routerLink="/home"
routerLink="/home" class="flex items-center px-4 py-2 text-white/90 hover:text-white font-medium rounded-lg hover:bg-white/10 transition-colors duration-200"
class="flex items-center px-4 py-2 text-white/90 hover:text-white font-medium rounded-lg hover:bg-white/10 transition-colors duration-200" >
> <img class="mr-2 w-4 h-4" src="assets/games.svg" alt="gamess" />
<img class="mr-2 w-4 h-4" src="assets/games.svg" alt="gamess" /> Spiele
Spiele </a>
</a>
} @else {
<button
(click)="showLogin.emit()"
class="flex items-center px-4 py-2 text-white/90 hover:text-white font-medium rounded-lg hover:bg-white/10 transition-colors duration-200"
>
<img class="mr-2 w-4 h-4" src="assets/games.svg" alt="gamess" />
Spiele
</button>
}
</div> </div>
</div> </div>
@ -50,7 +40,15 @@
(click)="showRegister.emit()" (click)="showRegister.emit()"
class="flex items-center px-4 py-2 bg-emerald-600 text-white font-medium rounded-lg hover:bg-emerald-500 transition-colors duration-200" class="flex items-center px-4 py-2 bg-emerald-600 text-white font-medium rounded-lg hover:bg-emerald-500 transition-colors duration-200"
> >
Jetzt registrieren <svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M18 9v3m0 0v3m0-3h3m-3 0h-3m-2-5a4 4 0 11-8 0 4 4 0 018 0zM3 20a6 6 0 0112 0v1H3v-1z"
/>
</svg>
Registrieren
</button> </button>
} }

View file

@ -52,7 +52,7 @@ a {
} }
.slider-grid { .slider-grid {
@apply min-w-full grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-4; @apply min-w-full grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-4;
} }
.welcome-bonus { .welcome-bonus {