-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
96b3f0c
commit 8c182ac
Showing
9 changed files
with
102 additions
and
63 deletions.
There are no files selected for viewing
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 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,27 @@ | ||
:host { | ||
display: block; | ||
font-family: Roboto, sans-serif; | ||
padding-top: 100px; | ||
} | ||
|
||
.foo { | ||
align-items: center; | ||
background-color: #563d7c; | ||
color: #ffffff; | ||
display: flex; | ||
height: 100px; | ||
justify-content: center; | ||
left: 0; | ||
position: fixed; | ||
right: 0; | ||
text-align: center; | ||
top: 0; | ||
transition: all .35s ease-in-out; | ||
} | ||
|
||
.foo .down, | ||
.foo .up { | ||
display: none; | ||
} | ||
|
||
.foo.sn-scrolling-down .down, | ||
.foo.sn-scrolling-up .up { | ||
display: block; | ||
.spacer { | ||
min-height: 150vh; | ||
} | ||
|
||
.foo.sn-minimise { | ||
background-color: #007bff; | ||
height: 50px; | ||
:host /deep/ .foo { | ||
transition: all .35s ease-in-out; | ||
width: 150px; | ||
} | ||
|
||
.bar { | ||
align-items: center; | ||
background-color: #d4edda; | ||
color: #ffffff; | ||
display: flex; | ||
height: 100px; | ||
justify-content: center; | ||
text-align: center; | ||
transition: all .35s ease-in-out; | ||
@media (min-width: 768px) { | ||
:host /deep/ .foo { | ||
width: 500px; | ||
} | ||
} | ||
|
||
.bar.sn-affix { | ||
left: 0; | ||
position: fixed; | ||
right: 0; | ||
top: 0; | ||
z-index: 9999; | ||
:host /deep/ .sn-image-not-loaded .foo { | ||
filter: blur(20px); | ||
} | ||
|
||
.spacer { | ||
height: 150vh; | ||
:host /deep/ .sn-image-loaded .foo { | ||
filter: blur(0px); | ||
} |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,8 @@ | ||
<h1>Scroll down ↓</h1> | ||
<nav class="foo" imageLoader [debounce]="0"> | ||
My nav | ||
<span class="down">Going down</span> | ||
<span class="up">Going up</span> | ||
</nav> | ||
<div class="spacer"></div> | ||
<div class="bar" imageLoader [debounce]="0"> | ||
Sticky when scrolled passed | ||
</div> | ||
<sn-image-loader | ||
[image]="image" | ||
[sizes]="sizes" | ||
imgClass="foo" | ||
></sn-image-loader> | ||
<div class="spacer"></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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,32 @@ | ||
import { Component } from '@angular/core'; | ||
import { ResponsiveImage, Breakpoint, Size } from '@thisissoon/angular-image-loader'; | ||
|
||
@Component({ | ||
selector: 'integration-app', | ||
templateUrl: './app.component.html', | ||
styleUrls: ['./app.component.css'] | ||
}) | ||
export class AppComponent { } | ||
export class AppComponent { | ||
sizes: Breakpoint[] = [ | ||
{ size: 'xs', width: 0}, | ||
{ size: 'md', width: 768}, | ||
{ size: 'lg', width: 992}, | ||
]; | ||
|
||
image: ResponsiveImage = { | ||
placeholder: 'http://via.placeholder.com/35x15?text=placeholder', | ||
fallback: 'http://via.placeholder.com/350x150?text=fallback', | ||
xs: { | ||
'@1x': 'http://via.placeholder.com/150x350?text=xs+1x', | ||
'@2x': 'http://via.placeholder.com/300x700?text=xs+2x' | ||
}, | ||
md: { | ||
'@1x': 'http://via.placeholder.com/350x250?text=md+1x', | ||
'@2x': 'http://via.placeholder.com/700x500?text=md+2x' | ||
}, | ||
lg: { | ||
'@1x': 'http://via.placeholder.com/700x400?text=lg+1x', | ||
'@2x': 'http://via.placeholder.com/1400x800?text=lg+2x' | ||
} | ||
}; | ||
} |
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 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