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]="heroClass"> | |
<div class="hero-content"> | |
<ng-content select="[hero]"></ng-content> | |
</div> | |
</div> |
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
<a class="overlay-bg" (click)="overlayClicked($event)" [@overlayAnimation]="showsOverlay ? 'shows' : 'hides' "> | |
<ng-content select="[overlay-bg]"></ng-content> | |
</a> |
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
<a class="toggle-container" (click)="toggleClick()"> | |
<div [ngClass]="toggleOn ? 'toggle-bg toggle-on' : 'toggle-bg'"> | |
<div [@toggleTrigger]="toggleOn ? 'on' : 'off' " class="toggle"></div> | |
</div> | |
</a> |
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="file-uploader" style="cursor: pointer"> | |
<input type="file" class="file" (change)="upload($event)" style="cursor: pointer"> | |
<div [class]="uploadButton" style="cursor: pointer"> | |
{{ buttonText }} | |
<ng-container *ngIf="progressPercentage !== 100"> | |
<svg viewBox="0,0,100,7" class="percent-bar"> | |
<rect [attr.width]="progressPercentage" height="7" fill="#ffffff35" ry="50%"></rect> | |
</svg> | |
</ng-container> | |
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]="coverClass"> | |
<div [ngClass]="isMobile ? 'cover-title mobile' : 'cover-title' "> | |
<ng-content select="[cover]"></ng-content> | |
<!-- | |
To add new content on top, use <div cover> ...content... </div> in parent component | |
--> | |
</div> | |
<img [src]="coverUrl" alt="" style="object-position: 50% 50%;"> | |
</div> |
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 [@toastAnimation]="(toast.showsToast$ | async) ? 'open' : 'close' " [class]="(toast.toastOptions$ | async)"> | |
<div class="toast-message"> | |
<div class="post-body toast-body"> | |
<div [innerHTML]="(toast.toastMessage$ | async)"></div> | |
</div> | |
</div> | |
<div class="button-container"> | |
<a class="close-btn mb-1" (click)="dismissToast()"> | |
<fa-icon [icon]="faTimes"></fa-icon> | |
</a> |
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 #singlePageTopScroll></div> | |
<router-outlet (activate)="onRouteActivation()"></router-outlet> |
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 { BehaviorSubject, Observable } from 'rxjs'; | |
import { distinctUntilChanged, map } from 'rxjs/operators'; | |
export class StateService { | |
private state$!: BehaviorSubject<any>; | |
protected get state(): any { | |
return this.state$.getValue(); | |
} |
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
:host { | |
background-color: white; | |
} | |
:host(.change-bg) { | |
background-color: red; | |
} |
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 [ngStyle]="isMobile ? {'font-size': '0.8rem'} : {'font-size': '1rem'} "> | |
This is a div | |
</div> | |
<div [ngStyle]="isMobile ? { 'margin-right': '10px', | |
'font-size': '2rem', | |
'margin-top': '5rem' | |
} : { 'margin-right': '0px', | |
'font-size': '1rem'} "> | |
This is a div |
OlderNewer