login
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {NavigationComponent} from './navigation/navigation.component';
|
||||
import {RouterModule} from '@angular/router';
|
||||
import {FilterComponent} from './navigation/filter/filter.component';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [
|
||||
NavigationComponent,
|
||||
FilterComponent
|
||||
],
|
||||
imports: [
|
||||
CommonModule,
|
||||
RouterModule
|
||||
],
|
||||
exports: [
|
||||
NavigationComponent
|
||||
]
|
||||
})
|
||||
export class ApplicationFrameModule {
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
<input (input)="onInputChange($event.target.value)" placeholder="Suche">
|
||||
@@ -0,0 +1,16 @@
|
||||
@import "../../../../../styles/styles";
|
||||
|
||||
input {
|
||||
font-size: 16px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
border-bottom: 1px solid #ccc;
|
||||
color: #888;
|
||||
margin-right: 20px;
|
||||
|
||||
&:focus {
|
||||
outline: none;
|
||||
border-bottom: 2px solid @primary-color;
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {FilterComponent} from './filter.component';
|
||||
|
||||
describe('FilterComponent', () => {
|
||||
let component: FilterComponent;
|
||||
let fixture: ComponentFixture<FilterComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [FilterComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(FilterComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,21 @@
|
||||
import {Component} from '@angular/core';
|
||||
import {Router} from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-filter',
|
||||
templateUrl: './filter.component.html',
|
||||
styleUrls: ['./filter.component.less']
|
||||
})
|
||||
export class FilterComponent {
|
||||
|
||||
constructor(private router: Router) {
|
||||
}
|
||||
|
||||
public onInputChange(text: string): void {
|
||||
const route = text
|
||||
? this.router.createUrlTree(['songs'], {queryParams: {q: text}})
|
||||
: this.router.createUrlTree(['songs']);
|
||||
|
||||
this.router.navigateByUrl(route);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
<nav class="head">
|
||||
<div class="links">
|
||||
<a href="#" routerLink="/songs" routerLinkActive="active">Lieder</a>
|
||||
<a href="#" routerLink="/user" routerLinkActive="active">Benutzer</a>
|
||||
</div>
|
||||
<div class="actions">
|
||||
<app-filter></app-filter>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
|
||||
@@ -0,0 +1,52 @@
|
||||
@import "../../../../styles/styles";
|
||||
@import "../../../../styles/shadow";
|
||||
|
||||
nav {
|
||||
&.head {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
height: 60px;
|
||||
background: @navigation-background;
|
||||
.card-3;
|
||||
|
||||
display: flex;
|
||||
align-items: flex-end;
|
||||
justify-content: space-between;
|
||||
|
||||
a {
|
||||
display: block;
|
||||
height: 60px;
|
||||
color: @navigation-link-color;
|
||||
font-size: 20px;
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
padding: 20px;
|
||||
box-sizing: border-box;
|
||||
background: transparent;
|
||||
transition: @transition;
|
||||
|
||||
&:hover {
|
||||
background: #eee;
|
||||
}
|
||||
|
||||
&.active {
|
||||
background: @primary-color;
|
||||
color: #fff;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
.actions {
|
||||
display: flex;
|
||||
height: 100%;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
|
||||
.links {
|
||||
display: flex;
|
||||
}
|
||||
@@ -0,0 +1,25 @@
|
||||
import {async, ComponentFixture, TestBed} from '@angular/core/testing';
|
||||
|
||||
import {NavigationComponent} from './navigation.component';
|
||||
|
||||
describe('NavigationComponent', () => {
|
||||
let component: NavigationComponent;
|
||||
let fixture: ComponentFixture<NavigationComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [NavigationComponent]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(NavigationComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,16 @@
|
||||
import {Component, OnInit} from '@angular/core';
|
||||
|
||||
@Component({
|
||||
selector: 'app-navigation',
|
||||
templateUrl: './navigation.component.html',
|
||||
styleUrls: ['./navigation.component.less']
|
||||
})
|
||||
export class NavigationComponent implements OnInit {
|
||||
|
||||
constructor() {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
}
|
||||
|
||||
}
|
||||
@@ -6,7 +6,7 @@
|
||||
border-radius: 8px;
|
||||
background: #fffe;
|
||||
overflow: hidden;
|
||||
width: 800px;
|
||||
width: 50vw;
|
||||
|
||||
&.padding {
|
||||
padding: 20px;
|
||||
|
||||
@@ -1,9 +1,8 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {LegalOwnerPipe} from './legal-owner.pipe';
|
||||
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [LegalOwnerPipe],
|
||||
exports: [
|
||||
@@ -13,4 +12,5 @@ import {LegalOwnerPipe} from './legal-owner.pipe';
|
||||
CommonModule
|
||||
]
|
||||
})
|
||||
export class LegalOwnerTranslatorModule { }
|
||||
export class LegalOwnerTranslatorModule {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LegalOwnerPipe } from './legal-owner.pipe';
|
||||
import {LegalOwnerPipe} from './legal-owner.pipe';
|
||||
|
||||
describe('LegalOwnerPipe', () => {
|
||||
it('create an instance', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import {Pipe, PipeTransform} from '@angular/core';
|
||||
|
||||
@Pipe({
|
||||
name: 'legalOwner'
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
import { NgModule } from '@angular/core';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { LegalTypePipe } from './legal-type.pipe';
|
||||
|
||||
import {NgModule} from '@angular/core';
|
||||
import {CommonModule} from '@angular/common';
|
||||
import {LegalTypePipe} from './legal-type.pipe';
|
||||
|
||||
|
||||
@NgModule({
|
||||
declarations: [LegalTypePipe],
|
||||
exports: [
|
||||
LegalTypePipe
|
||||
],
|
||||
imports: [
|
||||
CommonModule
|
||||
]
|
||||
declarations: [LegalTypePipe],
|
||||
exports: [
|
||||
LegalTypePipe
|
||||
],
|
||||
imports: [
|
||||
CommonModule
|
||||
]
|
||||
})
|
||||
export class LegalTypeTranslatorModule { }
|
||||
export class LegalTypeTranslatorModule {
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { LegalTypePipe } from './legal-type.pipe';
|
||||
import {LegalTypePipe} from './legal-type.pipe';
|
||||
|
||||
describe('LegalTypePipe', () => {
|
||||
it('create an instance', () => {
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import { Pipe, PipeTransform } from '@angular/core';
|
||||
import {Pipe, PipeTransform} from '@angular/core';
|
||||
|
||||
@Pipe({
|
||||
name: 'legalType'
|
||||
|
||||
Reference in New Issue
Block a user