Skip to content

Commit

Permalink
feat: add footer
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Mar 9, 2019
1 parent 746fe36 commit 214e8f6
Show file tree
Hide file tree
Showing 6 changed files with 54 additions and 5 deletions.
4 changes: 2 additions & 2 deletions src/app/blog/blog.module.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { RouterModule } from '@angular/router';
import { MatListModule } from '@angular/material';
import { MarkdownModule } from 'ngx-markdown';

import { BlogComponent } from './blog/blog.component';
import { PostComponent } from './post/post.component';
import { MarkdownModule } from 'ngx-markdown';
import { MatListModule } from '@angular/material';

@NgModule({
declarations: [
Expand Down
14 changes: 12 additions & 2 deletions src/app/core/components/layout/layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,12 @@ import { map } from 'rxjs/operators';
</div>
</mat-toolbar>
<div [class.container]="!(isHandset$ | async)">
<div class="content" [class.container]="!(isHandset$ | async)">
<router-outlet></router-outlet>
</div>
</div>
<app-footer>
</app-footer>
</mat-sidenav-content>
</mat-sidenav-container>
Expand All @@ -57,6 +60,13 @@ import { map } from 'rxjs/operators';
height: 100%;
}
.content {
display: flex;
flex: 1 1 auto;
padding: 8px;
min-height: calc(100% - (63px));
}
.container {
padding-left: 15%;
padding-right: 15%;
Expand Down
4 changes: 3 additions & 1 deletion src/app/core/core.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { MatToolbarModule, MatButtonModule, MatSidenavModule, MatIconModule, Mat
import { RouterModule } from '@angular/router';

import { LayoutComponent, PageNotFoundComponent } from './components';
import { FooterModule } from '../shared/footer';

@NgModule({
declarations: [
Expand All @@ -19,7 +20,8 @@ import { LayoutComponent, PageNotFoundComponent } from './components';
MatButtonModule,
MatSidenavModule,
MatIconModule,
MatListModule
MatListModule,
FooterModule
],
exports: [
LayoutComponent
Expand Down
17 changes: 17 additions & 0 deletions src/app/shared/footer/footer.component.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import { Component, OnInit } from '@angular/core';

@Component({
selector: 'app-footer',
template: `
<mat-toolbar color="primary"></mat-toolbar>
`,
styles: []
})
export class FooterComponent implements OnInit {

constructor() { }

ngOnInit() {
}

}
19 changes: 19 additions & 0 deletions src/app/shared/footer/footer.module.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
import { NgModule } from '@angular/core';
import { CommonModule } from '@angular/common';
import { MatToolbarModule } from '@angular/material';

import { FooterComponent } from './footer.component';

@NgModule({
declarations: [
FooterComponent
],
imports: [
CommonModule,
MatToolbarModule
],
exports: [
FooterComponent
]
})
export class FooterModule { }
1 change: 1 addition & 0 deletions src/app/shared/footer/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export * from './footer.module';

0 comments on commit 214e8f6

Please sign in to comment.