This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- Default Text settings --> | |
<confirmation-dialog (confirmed)="deleteModalConfirm($event)" (closed)="deleteModalCancel($event)" [opened]="showDeleteDialog"></confirmation-dialog> | |
<!-- Custom Text settings --> | |
<confirmation-dialog | |
[heading]="'Are you sure you want to delete this post?'" | |
[message]="'This will completely remove this post. Click the Delete button to proceed, or the Cancel button to not make any changes.'" | |
[confirmTxt]="'Delete'" | |
[cancelTxt]="'Cancel'" | |
(confirmed)="deleteModalConfirm($event)" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { Component, OnInit, Input, EventEmitter, Output } from '@angular/core'; | |
@Component({ | |
selector: 'confirmation-dialog', | |
templateUrl: './confirmation-dialog.component.html', | |
styleUrls: ['./confirmation-dialog.component.scss'] | |
}) | |
export class ConfirmationDialogComponent implements OnInit { | |
@Input() opened; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="overlay" [class.open]="opened"> | |
<div class="modal" [class.round]="isRounded"> | |
<div class="inner"> | |
<div class="top"> | |
<h3>{{heading}}</h3> | |
</div> | |
<div class="middle"> | |
<p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.overlay { | |
display: none; | |
align-items: center; | |
justify-content: center; | |
position: fixed; | |
width: 100%; | |
height: 100%; | |
top: 0; | |
left: 0; | |
right: 0; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//app.module.ts | |
import { BrowserModule } from '@angular/platform-browser'; | |
import { NgModule } from '@angular/core'; | |
import { HttpClientModule, HttpClientJsonpModule } from '@angular/common/http'; | |
@NgModule({ | |
declarations: [ | |
//... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- blog-detail.component.html --> | |
<link *ngIf="cssUrl" rel="stylesheet" type="text/css" [href]="sanitizer.bypassSecurityTrustResourceUrl(cssUrl)"> | |
<div class="blog-detail" *ngIf="blogPost"> | |
<h3>{{blogPost.name}}</h3> | |
<!-- example post body with gist-scripts --> | |
<div class="post-body"> | |
<p> | |
Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. | |
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//blog-detail.component.ts | |
import { Component, OnInit, Input, ElementRef } from '@angular/core'; | |
import { ActivatedRoute } from '@angular/router'; | |
import { AngularFirestore } from 'angularfire2/firestore'; | |
import { BlogService } from '../blog.service'; | |
import { BlogPost } from '../../firebasecms/models/blog-post'; | |
import { HttpClient } from '@angular/common/http'; | |
import { Observable } from 'rxjs/Observable'; | |
import { DomSanitizer } from '@angular/platform-browser'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@media only screen and (max-width: 550px) { | |
/* phones */ | |
.desktop{ | |
display:none; | |
} | |
.mobile{ | |
display: flex; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<nav class="mobile"> | |
<div class="container" [class.open]="menuOpen" (click)="toogleMenu();"> | |
<div class="bar1"></div> | |
<div class="bar2"></div> | |
<div class="bar3"></div> | |
</div> | |
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.mobile-menu{ | |
//for animations | |
height:0px; | |
overflow:hidden; | |
transition: height 0.5s ease; | |
&.open{ | |
height:260px; | |
} | |
// |
NewerOlder