Skip to content

Commit

Permalink
feat: add social links to toolbar
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Mar 9, 2019
1 parent 581be56 commit 746fe36
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/app/blog/blog/blog.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ import { Post } from 'src/app/core/models';
`
a {
font-size: 36px;
color: black;
}
:host /deep/ .mat-list-item {
Expand Down
46 changes: 45 additions & 1 deletion src/app/core/components/layout/layout.component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { map } from 'rxjs/operators';
<mat-sidenav-container class="sidenav-container">
<mat-sidenav #drawer class="sidenav" fixedInViewport="true"
[attr.role]="(isHandset$ | async) ? 'dialog' : 'navigation'"
[mode]="(isHandset$ | async) ? 'over' : 'over'">
mode='over'>
<mat-toolbar>Menu</mat-toolbar>
<mat-nav-list>
<a mat-list-item routerLink="/">Posts</a>
Expand All @@ -25,7 +25,20 @@ import { map } from 'rxjs/operators';
*ngIf="isHandset$ | async">
<mat-icon aria-label="Side nav toggle icon">menu</mat-icon>
</button>
<a routerLink="/">Brandon Roberts</a>
<div class="social">
<a routerLink="/about" title="About Me">About</a>
<a href="https://twitter.com/brandontroberts" title="Twitter">
<img src="assets/images/logos/twitter-icon.svg">
</a>
<a href="https://github.com/brandonroberts" title="GitHub">
<img src="assets/images/logos/github-icon.svg">
</a>
</div>
</mat-toolbar>
<div [class.container]="!(isHandset$ | async)">
Expand Down Expand Up @@ -62,6 +75,37 @@ import { map } from 'rxjs/operators';
top: 0;
z-index: 1;
}
.filler {
flex: 1 1 auto;
}
.social {
display: flex;
flex-direction: row;
width: 100%;
justify-content: flex-end;
}
.social a {
display: flex;
align-items: center;
margin-left: 16px;
}
.social a:hover {
opacity: 0.8;
}
.social img {
height: 24px;
}
@media screen and (max-width: 480px) {
.social a {
margin-left: 8px;
}
}
`]
})
export class LayoutComponent {
Expand Down
14 changes: 14 additions & 0 deletions src/assets/images/logos/github-icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 13 additions & 0 deletions src/assets/images/logos/twitter-icon.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 746fe36

Please sign in to comment.