Created
January 9, 2017 15:43
-
-
Save hpstuff/5c2ad87e8fa0d50481ed13a6af83c4ce to your computer and use it in GitHub Desktop.
This file contains hidden or 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
<!-- use with image //--> | |
<HoverComponent [imageUrl]="url"> | |
<div class="article-info"> | |
<time>{{date}}</time> | |
<h1>{{title}}</h1> | |
</div> | |
</HoverComponent> | |
<!-- use with video //--> | |
<HoverComponent (onHover)="video.play()"> | |
<!-- this is named ng-content //--> | |
<div class="video" background > | |
<video #video></video> | |
</div> | |
<div class="article-info"> | |
<time>{{date}}</time> | |
<h1>{{title}}</h1> | |
</div> | |
</HoverComponent> | |
<!-- template //--> | |
<section | |
on-mouseover="hover = true; triggerHover()" | |
on-mouseleave="hover = false" | |
[class.hover]="hover" | |
(click)="handleClick()" | |
[ngStyle]="{'background-image': 'url(' + imageUrl + ')'}" | |
> | |
<!-- we left imageUrl so we don't have to change alot //--> | |
<div class="background-wrapper" *ngIf="!imageUrl"> | |
<ng-content select="[background]"></ng-content> | |
</div> | |
<div class="basic-info"> | |
<ng-content></ng-content> | |
</div> | |
<div class="block-overlay"></div> | |
</section> |
This file contains hidden or 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
<!-- template //--> | |
<HoverComponent *mediaIf="'only desktop'">(...)</HoverComponent> | |
<other-hover-html *mediaIf="'not desktop'">(...)</other-hover-html> | |
<!-- use //--> | |
<TileHoverComponent> | |
<div class="video" background > | |
<video #video></video> | |
</div> | |
<div class="article-info"> | |
<time>{{date}}</time> | |
<h1>{{title}}</h1> | |
</div> | |
</TileHoverComponent> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment