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
.container | |
width 100% | |
height 100% | |
display flex | |
align-items center | |
justify-content center | |
.item | |
max-width 640px |
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
touchDown = false | |
tapPosition = | |
x: 0 | |
y: 0 | |
layerA.on Events.TouchStart, (e) -> | |
touchDown = true | |
tapPosition.x = Events.touchEvent(e).clientX | |
tapPosition.y = Events.touchEvent(e).clientY |
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
header = new Layer | |
width: Screen.width, height: 128 | |
backgroundColor: "rgba(255, 255, 255, .42)" | |
shadowY: 2, shadowBlur: 0, shadowColor: "rgba(0, 0, 0, .15)" | |
style: "-webkit-backdrop-filter" : "blur(50px)" |
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
layers = [] | |
for i in [0..5] | |
lay = new Layer | |
width: 750, height: 300 | |
y: 20 + i * 320 | |
backgroundColor: Utils.randomColor() | |
lay.on "click", -> | |
for j in [0..5] |
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
.content > p:first-child | |
font-size 1.2em | |
font-weight 100 | |
.content > p:first-child + hr | |
border 0 | |
margin-bottom 3em |
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
<!DOCTYPE html> | |
<head> | |
<style> | |
.responsive { | |
width: 100%; | |
height: 100%;} | |
.content-wrap {width: 560px; margin: 0 auto;} | |
@media (min-width: 1170px) { |
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
.h_iframe | |
position relative | |
.h_iframe .ratio | |
display block | |
width 100% | |
height auto | |
.h_iframe iframe | |
position absolute |
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
.h_iframe | |
// transparent image | |
img.ratio(src="http://placehold.it/16x9") | |
iframe(data-src="https://www.youtube.com/embed/", frameborder="0", allowfullscreen) |
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
var layer = document.getElementsByClassName("header-wrap")[0]; | |
window.addEventListener('scroll', function() { | |
var scrolltop = window.pageYOffset; | |
layer.style.top = -scrolltop * .09 + 20 + 'px'; | |
layer.style.opacity = 1 - scrolltop * .002; | |
}); |
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
new BackgroundLayer | |
layers = [] | |
icons = [] | |
for i in [0..5] | |
icons[i] = new Layer | |
y: 223 * i + 60 | |
maxX: Screen.width - 40 | |
scale: 0 |