forked from dixonandmoe/rellax
-
Notifications
You must be signed in to change notification settings - Fork 0
/
demo.html
323 lines (271 loc) · 10.1 KB
/
demo.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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<title>Vanilla Javascript Parallax Library - Rellax.js</title>
<meta name="description" content="">
<meta name="viewport" content="width=device-width">
<link href='https://fonts.googleapis.com/css?family=Source+Sans+Pro:600,700,900' rel='stylesheet' type='text/css'>
<!-- Booooooootstrap -->
<link rel="stylesheet" href="css/bootstrap.min.css">
<!-- Styles -->
<link rel="stylesheet" type="text/css" href="css/main.css">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<script>window.html5 || document.write('<script src="js/vendor/html5shiv.js"><\/script>')</script>
<![endif]-->
</head>
<body>
<div class="grid">
<div class="container">
<div class="row">
<div class="col-md-offset-1 col-md-2">
<div class="grid-line"></div>
</div>
<div class="col-md-2">
<div class="grid-line"></div>
</div>
<div class="col-md-2">
<div class="grid-line"></div>
</div>
<div class="col-md-2">
<div class="grid-line"></div>
</div>
<div class="col-md-2">
<div class="grid-line" style="margin-right:-30px;border-right:1px solid #ccc"></div>
</div>
</div>
</div>
</div>
<div class="fixed-top rellax" data-rellax-speed="-2"
style="transform: rotate(45deg);"
>
</div>
<main class="main">
<header>
<div class="container">
<div class="row">
<div class="col-md-offset-1 col-md-11">
<a href="http://dixonandmoe.com/">
<h2>BY DIXON & MOE <span>➔</span></h2>
</a>
<div class="white-block"></div>
</div>
</div>
<div class="title">
<div class="row">
<div class="col-md-offset-1 col-md-6">
<h1>RELLAX<span>JS</span></h1>
</div>
<div class="col-md-4 text-right">
<a href="https://github.com/dixonandmoe/rellax">GITHUB</a>
</div>
</div>
</div>
<div class="subtitle">
<div class="row">
<div class="col-md-offset-1 col-md-2">
<h3>Light (871b gz)</h3>
</div>
<div class="col-md-2">
<h3>Vanilla Javascript</h3>
</div>
<div class="col-md-2">
<h3>Parallax Library</h3>
</div>
</div>
</div>
</header>
<section class="section san-francisco">
<div class="absolute">
<div class="container">
<div class="row">
<div class="col-md-offset-1 col-md-11">
<h2 class="rellax" data-rellax-speed="-3">San Francisco<br>California</h2>
</div>
</div>
</div>
</div>
<div class="absolute above">
<div class="container">
<div class="row">
<div class="col-md-offset-1 col-md-2">
<div class="lg-green rellax"
data-rellax-speed="2"
style="transform: rotate(45deg);">
</div>
<div class="sm-green rellax"
data-rellax-speed="5"
style="transform: rotate(45deg);">
</div>
</div>
<div class="col-md-offset-2 col-md-1">
<div class="sm-purple rellax"
data-rellax-speed="2"
style="transform: rotate(45deg);">
</div>
</div>
<div class="col-md-offset-3 col-md-1">
<div class="xs-green rellax"
data-rellax-speed="5"
style="transform: rotate(45deg);">
</div>
<div class="md-green rellax"
data-rellax-speed="1"
style="transform: rotate(45deg);">
</div>
</div>
<div class="col-md-1">
<div class="lg-purple rellax"
data-rellax-speed="3"
style="transform: rotate(45deg);">
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-md-offset-1 col-md-5">
<div class="date">
Incorporated—<br>
1850<br><br>
37°47′N 122°25′W
</div>
</div>
<div class="col-md-offset-1 col-md-4">
<div class="temp">
68°
</div>
</div>
</div>
</div>
</section>
<section class="section">
</section>
<section class="section">
<div style="margin-top: 200px">
<div class="container">
<div class="row">
<div class="col-md-12 text-center">
<h4>JAVASCRIPT (ACCEPTS ANY CLASS NAME)</h4>
</div>
</div>
<div class="row">
<div class="col-md-offset-2 col-md-8">
<div class="text-editor">
<code>
<span class="purple">var</span> rellax = <span class="green">new</span> <span class="white">Rellax</span>('.rellax');
</code>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center" style="margin-top:80px">
<h4>BASIC MARKUP (DEFAULT SPEED: -2)</h4>
</div>
</div>
<div class="row">
<div class="col-md-offset-2 col-md-8">
<div class="text-editor">
<code>
<div <span class="purple">class</span>="<span class="green">rellax</span>"><br>
<span class="white"> I’m slow and smooth</span><br>
</div>
</code>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12 text-center" style="margin-top:40px">
<h4>OPTIONAL SPEED (-10 to +10)</h4>
</div>
</div>
<div class="row">
<div class="col-md-offset-2 col-md-8">
<div class="text-editor">
<code>
<div <span class="purple">class</span>="<span class="green">rellax</span>" <span class="purple">data-rellax-speed</span>="<span class="green">6</span>"><br>
<span class="white"> I’m slow and smooth</span><br>
</div>
</code>
</div>
</div>
</div>
</div>
</div>
</div>
</section>
<section class="section">
<div class="absolute above" style="pointer-events: none;">
<div class="container">
<div class="row">
<div class="col-md-offset-1 col-md-2">
<div class="bt-green rellax"
data-rellax-speed="5"
style="transform: rotate(45deg);">
</div>
</div>
<div class="col-md-offset-0 col-md-1">
<div class="md-dixonandmoe rellax"
data-rellax-speed="2"
style="transform: rotate(45deg);">
</div>
</div>
<div class="col-md-offset-5 col-md-1">
<div class="md-twitter rellax"
data-rellax-speed="1"
style="transform: rotate(45deg);">
</div>
</div>
<div class="col-md-1">
<div class="md-facebook rellax"
data-rellax-speed="3"
data-rellax-percentage="0.5"
style="transform: rotate(45deg);">
</div>
</div>
</div>
</div>
</div>
<div class="copy" style="margin-top: 200px;margin-bottom: 500px">
<div class="container">
<div class="row">
<div class="col-md-offset-1 col-md-6">
<h4>SERIOUSLY, WHY?!</h4>
<p>Come on, how boring is the internet without excessive javascript? We made this library since too many github repos are abandoned (RIP skrollr) or feature creepy. You got some beef or caught us slippin on unit tests, send rants and 10mb gifs to <a href="mailto:moe@dixonandmoe.">[email protected]</a></p>
</div>
</div>
<div class="row" style="margin-top: 140px">
<div class="col-md-offset-5 col-md-6">
<h4>BUT ACTUALLY</h4>
<p>We've benefitted so much from open source projects that we're actively trying to give back. As designers, we're starting by releasing our own quirky js code.</p>
</div>
</div>
</div>
</section>
<section class="share">
<div class="container">
<div class="row">
<div class="col-md-offset-1 col-md-3">
<a class="dam" href="http://dixonandmoe.com/">Dixon & Moe</a>
</div>
<div class="col-md-offset-3 col-md-2">
<a href="https://www.facebook.com/sharer/sharer.php?u=http://dixonandmoe.com/rellax/">Share <span>➔</span></a>
</div>
<div class="col-md-offset-0 col-md-2">
<a href="https://twitter.com/share?url=http://dixonandmoe.com/rellax/">Tweet <span>➔</span></a>
</div>
</div>
</section>
</main>
<!-- javascript -->
<script type="text/javascript" src="rellax.js"></script>
<script>
var rellax = new Rellax('.rellax', {
// center: true
});
</script>
</body>
</html>