WIP: Responsive header menu

This commit is contained in:
Patrick Müller 2022-09-08 15:01:02 +02:00
parent af2da01729
commit 0c10e46d1a
Signed by: Paddy
GPG Key ID: 37ABC11275CAABCE
4 changed files with 46 additions and 0 deletions

View File

@ -1,5 +1,15 @@
<div id="header"> <div id="header">
<p id="header-title">Doppelkopf-Stats</p> <p id="header-title">Doppelkopf-Stats</p>
<span id="menu">
<div id="menu-desktop">
<div>Home</div>
<div>Game night</div>
<div>Stats</div>
</div>
<div id="menu-mobile">
<div>Open</div>
</div>
</span>
<span id="user-info"> <span id="user-info">
<p>{{getUserName()}}</p> <p>{{getUserName()}}</p>
<img src="assets/images/user.png" alt="User Icon" (click)="openProfile()"> <img src="assets/images/user.png" alt="User Icon" (click)="openProfile()">

View File

@ -34,3 +34,33 @@
#user-info img:hover { #user-info img:hover {
cursor: pointer; cursor: pointer;
} }
@media (min-width: 768px) {
#menu-mobile {
display: none;
}
#menu-desktop {
display: inherit;
}
}
@media(max-width: 767px) {
#menu-desktop {
display: none;
}
#menu-mobile {
display: inherit;
}
}
#menu {
display: flex;
justify-content: center;
max-width: 100%;
height: 100%;
align-items: center;
}
#menu div div {
padding-left: 2em;
padding-right: 2em;
}

View File

@ -1,10 +1,12 @@
import {Game} from './game'; import {Game} from './game';
import {Player} from './player'; import {Player} from './player';
import {GameRules} from './gamerules';
export interface GameNight { export interface GameNight {
gameNightId: number; gameNightId: number;
date: Date; date: Date;
players: Player[]; // We need players here and in the game because maybe we have 5 players for a game night and players: Player[]; // We need players here and in the game because maybe we have 5 players for a game night and
// they switch every game // they switch every game
rules: GameRules;
games: Game[]; games: Game[];
} }

View File

@ -0,0 +1,4 @@
export interface GameRules {
mandatoryAnnouncement: boolean;
}