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
<?php echo get_the_post_thumbnail( get_option( 'page_for_posts' ) ); ?> |
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
<?php echo apply_filters( 'the_content', get_post_field( 'post_content', get_option( 'page_for_posts' ) ) ); ?> |
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="site-content page" *ngIf="page" [@readyAnimation]="loadingImage"> |
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
<img class="background-image" [src]=page.featured_image_url (load)="displayImage()" /> |
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
this.router.events.subscribe((evt) => { | |
if (evt instanceof NavigationStart) { | |
this.loadingImage = false; | |
} | |
}); |
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
@HostBinding( 'class.loaded-image' ) loadingImage: boolean = false; | |
displayImage() { | |
setTimeout(() => { | |
this.loadingImage = true; | |
}, 1); | |
} |
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 { trigger, animate, transition, style, query } from '@angular/animations'; | |
export const readyAnimation = | |
trigger('readyAnimation', [ | |
transition('* => *', [ | |
style({ opacity: 0 }), | |
animate(500, style({ opacity: 1 })) | |
]) |
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
ngOnInit() { | |
this.router.events.subscribe((evt) => { | |
if (evt instanceof NavigationStart) { | |
this.pageAnimationFinished = false; | |
} | |
}); | |
} |
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
public getRouterOutletState(outlet) { | |
return outlet.isActivated ? outlet.activatedRoute : ''; | |
} | |
@HostBinding( 'class.page-transitioned' ) pageAnimationFinished: boolean = false; | |
pageTransitioned() { | |
this.pageAnimationFinished = true; | |
} |
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="router-wrap" | |
[@fadeAnimation]="getRouterOutletState(o)" | |
(@fadeAnimation.done)="pageTransitioned()" | |
> | |
<router-outlet #o="outlet"></router-outlet> | |
</div> |