Skip to content

Commit

Permalink
Added the navigation bar component [#328]
Browse files Browse the repository at this point in the history
  • Loading branch information
mcpierce committed Mar 1, 2021
1 parent a9c43fc commit 1772dc2
Show file tree
Hide file tree
Showing 6 changed files with 85 additions and 2 deletions.
1 change: 1 addition & 0 deletions comixed-web/src/app/app.component.html
@@ -1 +1,2 @@
<cx-navigation-bar></cx-navigation-bar>
<router-outlet></router-outlet>
7 changes: 5 additions & 2 deletions comixed-web/src/app/app.module.ts
Expand Up @@ -24,10 +24,13 @@ import { BrowserAnimationsModule } from '@angular/platform-browser/animations';
import { HTTP_INTERCEPTORS } from '@angular/common/http';
import { HttpInterceptor } from '@app/interceptors/http.interceptor';
import { HomeComponent } from './pages/home/home.component';
import { NavigationBarComponent } from './components/navigation-bar/navigation-bar.component';
import {MatToolbarModule} from "@angular/material/toolbar";
import {MatIconModule} from "@angular/material/icon";

@NgModule({
declarations: [AppComponent, HomeComponent],
imports: [BrowserModule, AppRoutingModule, BrowserAnimationsModule],
declarations: [AppComponent, HomeComponent, NavigationBarComponent],
imports: [BrowserModule, AppRoutingModule, BrowserAnimationsModule, MatToolbarModule, MatIconModule],
providers: [
[{ provide: HTTP_INTERCEPTORS, useClass: HttpInterceptor, multi: true }]
],
Expand Down
@@ -0,0 +1,6 @@
<mat-toolbar>
<button mat-icon-button>
<mat-icon>menu</mat-icon>
</button>
<span class="spacer">ComiXed</span>
</mat-toolbar>
@@ -0,0 +1,4 @@
.spacer {
padding-left: 5px;
flex: 1 1 auto;
}
@@ -0,0 +1,39 @@
/*
* ComiXed - A digital comic book library management application.
* Copyright (C) 2020, The ComiXed Project
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses>
*/

import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { NavigationBarComponent } from './navigation-bar.component';

describe('NavigationBarComponent', () => {
let component: NavigationBarComponent;
let fixture: ComponentFixture<NavigationBarComponent>;

beforeEach(async(() => {
TestBed.configureTestingModule({
declarations: [NavigationBarComponent]
}).compileComponents();

fixture = TestBed.createComponent(NavigationBarComponent);
component = fixture.componentInstance;
fixture.detectChanges();
}));

it('should create', () => {
expect(component).toBeTruthy();
});
});
@@ -0,0 +1,30 @@
/*
* ComiXed - A digital comic book library management application.
* Copyright (C) 2020, The ComiXed Project
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses>
*/

import { Component, OnInit } from '@angular/core';

@Component({
selector: 'cx-navigation-bar',
templateUrl: './navigation-bar.component.html',
styleUrls: ['./navigation-bar.component.scss']
})
export class NavigationBarComponent implements OnInit {
constructor() {}

ngOnInit(): void {}
}

0 comments on commit 1772dc2

Please sign in to comment.