navbar wie piet wollte
This commit is contained in:
@@ -7,6 +7,20 @@ nav {
|
|||||||
|
|
||||||
.navbar {
|
.navbar {
|
||||||
width: 200px;
|
width: 200px;
|
||||||
background-color: #ffffff;
|
background-color: white;
|
||||||
padding: 20px;
|
padding: 5px;
|
||||||
|
transition: color .2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
.gradient-text:hover {
|
||||||
|
background: linear-gradient(to right, #6366f1, #db2777);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
.navbar a.active {
|
||||||
|
background: linear-gradient(to right, #6366f1, #db2777);
|
||||||
|
-webkit-background-clip: text;
|
||||||
|
-webkit-text-fill-color: transparent;
|
||||||
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,13 +1,18 @@
|
|||||||
<nav class="navbar">
|
<nav class="navbar">
|
||||||
<ul class="nav-list">
|
<ul class="nav-list">
|
||||||
|
<div class="grid grid-cols-1 bg-indigo-50 rounded-md border-1 border-gray-300">
|
||||||
@for (item of navItems; track item.path) {
|
@for (item of navItems; track item.path) {
|
||||||
<li>
|
<li>
|
||||||
<div class="flex justify-center">
|
<div class="grid grid-cols-1 m-1 rounded-sm">
|
||||||
<a href="{{item.path}}" class="text-xl font-bold hover:text-purple-500">
|
<a [routerLink]="[item.path]"
|
||||||
|
routerLinkActive="active"
|
||||||
|
[routerLinkActiveOptions]="{ exact: true }"
|
||||||
|
class="text-xl font-bold flex justify-center hover:bg-gray-200 gradient-text rounded-sm">
|
||||||
{{ item.label }}
|
{{ item.label }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
}
|
}
|
||||||
|
</div>
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
|||||||
@@ -7,8 +7,12 @@ import { Component } from '@angular/core';
|
|||||||
styleUrl: './navbar.component.css'
|
styleUrl: './navbar.component.css'
|
||||||
})
|
})
|
||||||
export class NavbarComponent {
|
export class NavbarComponent {
|
||||||
|
/*
|
||||||
|
die routen abfragen und die routen namen verwenden?
|
||||||
|
*/
|
||||||
|
|
||||||
navItems:{label:string, path:string}[] = [
|
navItems:{label:string, path:string}[] = [
|
||||||
{label: 'Schedule', path: '/schedule'},
|
{label: 'Schedule', path: '/schedule'},
|
||||||
{label: 'beispiel', path: ''}, /* mal gucken wie man das elegant dynamisch machen kann*/
|
{label: 'beispiel', path: ''},
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user