-
Notifications
You must be signed in to change notification settings - Fork 0
/
goodnight.html
152 lines (127 loc) · 6.05 KB
/
goodnight.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>scrollorama</title>
<link href='http://fonts.googleapis.com/css?family=Bowlby+One+SC' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="/css/normalize.css" type="text/css">
<link rel="stylesheet" href="/css/bootstrap.min.css">
<link rel="stylesheet" href="/css/style.css" type="text/css">
<link rel="stylesheet" href="/css/goodnight-style.css" type="text/css">
<script src="/js/jquery-1.7.1.min.js"></script>
<script src="/js/jquery.lettering-0.6.1.min.js"></script>
<script src="/js/jquery.scrollorama.js"></script>
<script src="/js/base64.js"></script>
</head>
<body>
<div id="fb-root"></div>
<ul class="tabs">
<li {% if page.section == "blog" %} class="active"{% endif %}><a href="/">Blog</a></li>
<li {% if page.section == "music" %} class="active"{% endif %}><a href="/music">Music</a></li>
<li {% if page.section == "travel" %} class="active"{% endif %}><a href="/travel">Travel</a></li>
</ul>
<div id="line"></div>
<div id="main" class="container">
<header>
<h1><a href="/"><img src="/images/logo.png" alt="Tronenko.net" id="logo_img"/></a></h1>
</header>
<div class="scrollblock" >
<h3 id="scroll-down">⇊⇊ Scroll down ⇊⇊</h3>
</div>
<div class="scrollblock" >
<h1 id="hello1">Hello, </h3>
<h1 id="hello2">你好,</h3>
<h1 id="hello3">Привет, </h3>
</div>
<div class="scrollblock" >
<h3 id="good-night">I want to wish you a good night</h3>
<h3 id="sweet-dreams">and sweet dreams</h3>
</div>
<div class="scrollblock" >
<h3 id="roman">Your Roman</h3>
</div>
</div>
<script>
$(document).ready(function() {
$.extend({
getUrlVars: function() {
var vars = {};
var parts = window.location.href.replace(/[?&]+([^=&]+)=([^&]*)/gi, function(m,key,value) {
vars[key] = value;
});
return vars;
}
});
var name = $.getUrlVars()["n"];
var encode = $.getUrlVars()["encode"];
if (encode != null) {
name = Base64.encode(name);
window.location.href = window.location.href.replace(/[?]+.*/,"") + "?n=" + name;
}
name = Base64.decode(name);
if (name == null){
name = "Friend";
}
$("#hello1").append(name);
$("#hello2").append(name);
$("#hello3").append(name + "!");
$('#good-night').lettering();
$('#sweet-dreams').lettering();
// initialize the plugin, pass in the class selector for the sections of content (blocks)
var scrollorama = $.scrollorama({ blocks:'.scrollblock' });
// // animate some examples
// scrollorama.animate('#unpin',{ duration:500, property:'padding-top', start:400, pin:true });
scrollorama.animate('#scroll-down',{ delay: 0, duration: 300, property:'opacity', end:0 });
scrollorama.animate('#hello1',{ delay: 200, duration: 600, property:'left', start:-400, end:400 });
scrollorama.animate('#hello1',{ delay: 300, duration: 800, property:'opacity', start:0, end:1 });
scrollorama.animate('#hello1',{ delay: 350, duration: 800, property:'padding-top', end:0, pin:true });
scrollorama.animate('#hello2',{ delay: 250, duration: 600, property:'left', start:-400, end:400 });
scrollorama.animate('#hello2',{ delay: 300, duration: 800, property:'opacity', start:0, end:1 });
scrollorama.animate('#hello2',{ delay: 400, duration: 800, property:'padding-top', end:0, pin:true });
scrollorama.animate('#hello3',{ delay: 300, duration: 600, property:'left', start:-400, end:400 });
scrollorama.animate('#hello3',{ delay: 300, duration: 800, property:'opacity', start:0, end:1 });
scrollorama.animate('#hello3',{ delay: 450, duration: 800, property:'padding-top', end:0, pin:true });
scrollorama.animate('#good-night',{ delay: 700, duration: 700, property:'left', start:800, end:0 });
$('#good-night span').each(function() {
scrollorama.animate($(this),{ delay: 960, duration: 800, property:'top', end: Math.random()*120-180 });
scrollorama.animate($(this),{ delay: 970, duration: 900, property:'rotate', start:0, end:Math.random()*720-360 });
});
scrollorama.animate('#sweet-dreams',{ delay: 800, duration: 700, property:'left', start:800, end:200 });
$('#sweet-dreams span').each(function() {
scrollorama.animate($(this),{ delay: 900, duration: 1000, property:'top', end: Math.random()*120-180 });
scrollorama.animate($(this),{ delay: 900, duration: 1000, property:'rotate', start:0, end:Math.random()*720-360 });
});
scrollorama.animate('#roman',{ delay: 500, duration: 200, property:'opacity', start:0, end:1 });
// scrollorama.animate('#fly-in',{ delay: 400, duration: 300, property:'left', start:-1400, end:0 });
// scrollorama.animate('#rotate-in',{ duration: 800, property:'rotate', start:720 });
// scrollorama.animate('#zoom-in',{ delay: 200, duration: 600, property:'zoom', start:8 });
// scrollorama.animate('#any',{ delay: 700, duration: 200, property:'opacity', start:0 });
// scrollorama.animate('#any',{ delay: 800, duration: 200, property:'letter-spacing', start:18 });
//
// // animate the parallaxing
// scrollorama.animate('#parallax2',{ delay: 400, duration: 600, property:'top', start:800, end:-800 });
// scrollorama.animate('#parallax3',{ delay: 200, duration: 1200, property:'top', start:500, end:-500 });
//
// // animate some easing examples
// var $easing = $('#easing'),
// $clone = $easing.clone().appendTo('#examples-easing')
// .css({position:'relative',top:'-2.95em'})
// .lettering();
// $easing.css({ color: '#131420', textShadow: '0 1px 0 #363959' });
// easing_array = [ 'easeOutBounce',
// 'easeOutQuad',
// 'easeOutCubic',
// 'easeOutQuart',
// 'easeOutQuint',
// 'easeOutExpo' ];
// $clone.find('span')
// .each( function( idx, el ){
// scrollorama.animate( $(this), { delay:400, duration: 500,
// property:'top', end: 300,
// easing: easing_array[idx] });
// })
//
});
</script>
</body>