added browse component
This commit is contained in:
parent
6ddae1f00c
commit
7bda7ca5d2
9 changed files with 62 additions and 3 deletions
|
|
@ -2,6 +2,7 @@ import { Routes } from '@angular/router';
|
||||||
import { HomeComponent } from './components/home/home.component';
|
import { HomeComponent } from './components/home/home.component';
|
||||||
import { ImprintComponent } from './shared/components/legal-information/imprint/imprint.component';
|
import { ImprintComponent } from './shared/components/legal-information/imprint/imprint.component';
|
||||||
import { PrivacyPolicyComponent } from './shared/components/legal-information/privacy-policy/privacy-policy.component';
|
import { PrivacyPolicyComponent } from './shared/components/legal-information/privacy-policy/privacy-policy.component';
|
||||||
|
import { BrowseComponent } from './components/home/browse/browse.component';
|
||||||
|
|
||||||
export const routes: Routes = [
|
export const routes: Routes = [
|
||||||
{ path: '', component: HomeComponent },
|
{ path: '', component: HomeComponent },
|
||||||
|
|
@ -10,4 +11,5 @@ export const routes: Routes = [
|
||||||
{ path: 'forgot-password', component: HomeComponent },
|
{ path: 'forgot-password', component: HomeComponent },
|
||||||
{ path: 'imprint', component: ImprintComponent },
|
{ path: 'imprint', component: ImprintComponent },
|
||||||
{ path: 'privacy-policy', component: PrivacyPolicyComponent },
|
{ path: 'privacy-policy', component: PrivacyPolicyComponent },
|
||||||
|
{ path: 'browse', component: BrowseComponent },
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,3 @@
|
||||||
|
<section>
|
||||||
|
<app-header [browse]="true"></app-header>
|
||||||
|
</section>
|
||||||
|
|
@ -0,0 +1,7 @@
|
||||||
|
@import "./../../../../assets/style/colors.scss";
|
||||||
|
|
||||||
|
section {
|
||||||
|
height: 100vh;
|
||||||
|
width: 100vw;
|
||||||
|
background-color: $black;
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,23 @@
|
||||||
|
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||||
|
|
||||||
|
import { BrowseComponent } from './browse.component';
|
||||||
|
|
||||||
|
describe('BrowseComponent', () => {
|
||||||
|
let component: BrowseComponent;
|
||||||
|
let fixture: ComponentFixture<BrowseComponent>;
|
||||||
|
|
||||||
|
beforeEach(async () => {
|
||||||
|
await TestBed.configureTestingModule({
|
||||||
|
imports: [BrowseComponent]
|
||||||
|
})
|
||||||
|
.compileComponents();
|
||||||
|
|
||||||
|
fixture = TestBed.createComponent(BrowseComponent);
|
||||||
|
component = fixture.componentInstance;
|
||||||
|
fixture.detectChanges();
|
||||||
|
});
|
||||||
|
|
||||||
|
it('should create', () => {
|
||||||
|
expect(component).toBeTruthy();
|
||||||
|
});
|
||||||
|
});
|
||||||
11
frontend/src/app/components/home/browse/browse.component.ts
Normal file
11
frontend/src/app/components/home/browse/browse.component.ts
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
import { Component } from '@angular/core';
|
||||||
|
import { HeaderComponent } from '../../../shared/components/header/header.component';
|
||||||
|
|
||||||
|
@Component({
|
||||||
|
selector: 'app-browse',
|
||||||
|
standalone: true,
|
||||||
|
imports: [HeaderComponent],
|
||||||
|
templateUrl: './browse.component.html',
|
||||||
|
styleUrl: './browse.component.scss',
|
||||||
|
})
|
||||||
|
export class BrowseComponent {}
|
||||||
|
|
@ -7,6 +7,7 @@ import { RegisterComponent } from '../auth/register/register.component';
|
||||||
import { CommonModule } from '@angular/common';
|
import { CommonModule } from '@angular/common';
|
||||||
import { LoginComponent } from '../auth/login/login.component';
|
import { LoginComponent } from '../auth/login/login.component';
|
||||||
import { ForgotPasswordComponent } from '../auth/forgot-password/forgot-password.component';
|
import { ForgotPasswordComponent } from '../auth/forgot-password/forgot-password.component';
|
||||||
|
import { BrowseComponent } from './browse/browse.component';
|
||||||
|
|
||||||
@Component({
|
@Component({
|
||||||
selector: 'app-home',
|
selector: 'app-home',
|
||||||
|
|
@ -19,6 +20,7 @@ import { ForgotPasswordComponent } from '../auth/forgot-password/forgot-password
|
||||||
RegisterComponent,
|
RegisterComponent,
|
||||||
LoginComponent,
|
LoginComponent,
|
||||||
ForgotPasswordComponent,
|
ForgotPasswordComponent,
|
||||||
|
BrowseComponent,
|
||||||
],
|
],
|
||||||
templateUrl: './home.component.html',
|
templateUrl: './home.component.html',
|
||||||
styleUrl: './home.component.scss',
|
styleUrl: './home.component.scss',
|
||||||
|
|
|
||||||
|
|
@ -1,8 +1,17 @@
|
||||||
<header>
|
<header>
|
||||||
|
@if (browse) {
|
||||||
|
<div class="logo" routerLink="/">
|
||||||
|
<img src="./../../../../assets/img/logo_ci.svg" alt="" />
|
||||||
|
</div>
|
||||||
|
<div class="btn">
|
||||||
|
<app-btn-large [value]="'Log Out'" routerLink="/logout"></app-btn-large>
|
||||||
|
</div>
|
||||||
|
} @else {
|
||||||
<div class="logo" routerLink="/">
|
<div class="logo" routerLink="/">
|
||||||
<img src="./../../../../assets/img/logo_full.svg" alt="" />
|
<img src="./../../../../assets/img/logo_full.svg" alt="" />
|
||||||
</div>
|
</div>
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<app-btn-large [value]="'Log in'" routerLink="/login"></app-btn-large>
|
<app-btn-large [value]="'Log in'" routerLink="/login"></app-btn-large>
|
||||||
</div>
|
</div>
|
||||||
|
}
|
||||||
</header>
|
</header>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ header {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
img {
|
img {
|
||||||
filter: drop-shadow(1px 1px 3px $black);
|
filter: drop-shadow(1px 1px 3px $black);
|
||||||
width: 200px;
|
width: auto;
|
||||||
height: 32px;
|
height: 32px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
import { Component } from '@angular/core';
|
import { Component, Input, input } from '@angular/core';
|
||||||
import { BtnLargeComponent } from '../btn-large/btn-large.component';
|
import { BtnLargeComponent } from '../btn-large/btn-large.component';
|
||||||
import { RouterLink } from '@angular/router';
|
import { RouterLink } from '@angular/router';
|
||||||
|
|
||||||
|
|
@ -9,4 +9,6 @@ import { RouterLink } from '@angular/router';
|
||||||
templateUrl: './header.component.html',
|
templateUrl: './header.component.html',
|
||||||
styleUrl: './header.component.scss',
|
styleUrl: './header.component.scss',
|
||||||
})
|
})
|
||||||
export class HeaderComponent {}
|
export class HeaderComponent {
|
||||||
|
@Input() browse: boolean = false;
|
||||||
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue