Refactor layout and add header, navbar, schedule components
Introduced MainLayoutComponent with header and navbar for consistent app layout. Added HeaderComponent, NavbarComponent, ScheduleComponent, and MainComponent. Updated routing to use MainLayout for main and schedule pages. Renamed home-component to home and main-page to main, removing obsolete main-page files.
This commit is contained in:
22
src/app/layouts/main-layout/main-layout.component.css
Normal file
22
src/app/layouts/main-layout/main-layout.component.css
Normal file
@@ -0,0 +1,22 @@
|
||||
:host {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* Body: Sidebar + Content */
|
||||
.body {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
/* Content rechts */
|
||||
.content {
|
||||
flex: 1;
|
||||
background-color: #004cff;
|
||||
overflow-y: auto;
|
||||
box-sizing: border-box;
|
||||
height: 100%;
|
||||
}
|
||||
9
src/app/layouts/main-layout/main-layout.component.html
Normal file
9
src/app/layouts/main-layout/main-layout.component.html
Normal file
@@ -0,0 +1,9 @@
|
||||
<app-header></app-header>
|
||||
|
||||
<div class="body">
|
||||
<app-navbar></app-navbar>
|
||||
|
||||
<main class="content">
|
||||
<router-outlet></router-outlet> <!-- Hier werden die Kinder-Routen geladen -->
|
||||
</main>
|
||||
</div>
|
||||
11
src/app/layouts/main-layout/main-layout.component.ts
Normal file
11
src/app/layouts/main-layout/main-layout.component.ts
Normal file
@@ -0,0 +1,11 @@
|
||||
import { Component } from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-main-layout',
|
||||
standalone: false,
|
||||
templateUrl: './main-layout.component.html',
|
||||
styleUrl: './main-layout.component.css'
|
||||
})
|
||||
export class MainLayoutComponent {
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user