Feature: Repsonsive Design
All checks were successful
Quality Check / Linting (push) Successful in 25s

This commit is contained in:
Dominik Säume 2025-01-22 12:39:53 +01:00
parent e532d171c7
commit a9c8c79d0b
9 changed files with 90 additions and 11 deletions

View file

@ -14,4 +14,11 @@ main {
min-width: 60rem; min-width: 60rem;
max-width: 80rem; max-width: 80rem;
} }
@media (max-width: 800px) {
width: 100%;
min-width: 100%;
max-width: 100%;
padding: 0.5rem;
}
} }

View file

@ -2,7 +2,8 @@
<nav> <nav>
<a routerLink="" mat-button> <a routerLink="" mat-button>
<mat-icon>badge</mat-icon> <mat-icon>badge</mat-icon>
EMS</a> EMS
</a>
@for (route of routes; track route) { @for (route of routes; track route) {
<a mat-button routerLink="{{ route.path }}" class="{{ route.class }}">{{ route.title }}</a> <a mat-button routerLink="{{ route.path }}" class="{{ route.class }}">{{ route.title }}</a>
} }

View file

@ -13,6 +13,13 @@
box-sizing: border-box; box-sizing: border-box;
list-style: none; list-style: none;
gap: 0.25rem; gap: 0.25rem;
@media (max-width: 800px) {
a:first-of-type {
display: none;
}
}
} }
a, a,
@ -28,5 +35,11 @@
&__login { &__login {
min-width: fit-content; min-width: fit-content;
} }
}
@media (max-width: 500px) {
>a:last-of-type {
display: none;
}
}
}

View file

@ -1,9 +1,15 @@
<h2 mat-dialog-title>{{ data.firstName }} {{ data.lastName }}</h2> <h2 mat-dialog-title>{{ data.firstName }} {{ data.lastName }}</h2>
<mat-dialog-content> <mat-dialog-content class="info-modal">
<p>Street: {{data.street}}</p> <p>Street: {{data.street}}</p>
<p>Location: {{data.postcode}} {{data.city}}</p> <p>Location: {{data.postcode}} {{data.city}}</p>
<p>Phone: <a href="tel:{{data.phone}}">{{data.phone}}</a></p> <p>Phone: <a href="tel:{{data.phone}}">{{data.phone}}</a></p>
<p class="info-modal__skills-label">Skills:</p>
<ul class="info-modal__skills">
@for (skill of data.skillSet; track skill){
<li>{{skill.skill}}</li>
}
</ul>
</mat-dialog-content> </mat-dialog-content>
<mat-dialog-actions class="info-modal"> <mat-dialog-actions>
<button mat-flat-button [mat-dialog-close]="false">Close</button> <button mat-flat-button [mat-dialog-close]="false">Close</button>
</mat-dialog-actions> </mat-dialog-actions>

View file

@ -0,0 +1,11 @@
@media (min-width: 800px) {
.info-modal {
&__skills-label {
display: none;
}
&__skills {
display: none;
}
}
}

View file

@ -12,6 +12,11 @@
padding: 0.5rem; padding: 0.5rem;
gap: 0.5rem; gap: 0.5rem;
@media (max-width: 20rem) {
min-width: calc(100% - 0.5rem);
padding: 0.25rem;
}
overflow: hidden; overflow: hidden;
&__card { &__card {

View file

@ -10,6 +10,10 @@
:first-child { :first-child {
flex-grow: 1; flex-grow: 1;
} }
@media (max-width: 800px) {
gap: 0.25rem;
}
} }
&__employees { &__employees {
@ -24,7 +28,9 @@
width: 4rem; width: 4rem;
} }
.mat-column-first-name, .mat-column-last-name, .mat-column-skills { .mat-column-first-name,
.mat-column-last-name,
.mat-column-skills {
width: 0; width: 0;
flex-grow: 1; flex-grow: 1;
} }
@ -34,20 +40,38 @@
padding-left: 1rem; padding-left: 1rem;
} }
$action-count: 3;
$fap-size: 40px;
$gap-size: 1rem;
th.mat-column-actions { th.mat-column-actions {
$action-count: 3;
$fap-size: 40px;
$gap-size: 1rem;
width: calc($fap-size * $action-count + $gap-size * ($action-count - 1)); width: calc($fap-size * $action-count + $gap-size * ($action-count - 1));
} }
td.mat-column-actions { td.mat-column-actions {
gap: 1rem; gap: $gap-size;
display: flex; display: flex;
padding: 0.25rem 0; padding: 0.25rem 0;
align-items: start; align-items: start;
} }
@media (max-width: 800px) {
$gap-size: 0.25rem;
.mat-column-id,
.mat-column-skills {
display: none;
}
th.mat-column-actions {
width: calc($fap-size * $action-count + $gap-size * ($action-count - 1));
}
td.mat-column-actions {
gap: $gap-size;
}
}
} }
} }
} }

View file

@ -5,6 +5,10 @@
flex-direction: column; flex-direction: column;
gap: 4rem; gap: 4rem;
@media (max-width: 800px) {
gap: 1rem;
}
// Calculate Height and Spacing based on the Form Fields // Calculate Height and Spacing based on the Form Fields
$inner-form-height: 56px; $inner-form-height: 56px;
$form-height: 75.5px; $form-height: 75.5px;
@ -16,6 +20,11 @@
display: flex; display: flex;
gap: 4rem; gap: 4rem;
@media (max-width: 800px) {
flex-direction: column;
gap: 1rem;
}
>* { >* {
min-width: 0; min-width: 0;
flex-basis: 0; flex-basis: 0;

View file

@ -19,10 +19,13 @@
} }
.mat-column-skill{ .mat-column-skill{
display: flex;
flex-grow: 1; flex-grow: 1;
form{ form{
display: none; display: none;
width: 0;
flex-grow: 1;
padding-top: 0.25rem; padding-top: 0.25rem;
} }
@ -32,7 +35,7 @@
} }
form{ form{
display: block; display: inline-grid;
} }
} }
} }
@ -45,4 +48,4 @@
} }
} }
} }
} }