/
index.html
96 lines (84 loc) · 2.53 KB
/
index.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
<!doctype html>
<html>
<head>
<meta http-equiv='content-type' content='text/html; charset=utf-8'>
<meta name="viewport" content="width=device-width, user-scalable=0">
<title>Olay Demo</title>
<link rel='stylesheet' href='olay.css'>
<script src='bower_components/jquery/jquery.js'></script>
<script src='olay.js'></script>
<style>
body {
padding: 10px;
font-family: 'Helvetia Neue', Helvetica, Arial, sans-serif;
color: #666;
text-align: center;
}
.js-olay-container {
background: #575757;
background: rgba(0, 0, 0, .6);
}
.js-olay-content {
margin: 25px;
padding: 25px;
background: #f4f4f4;
box-shadow: 0 1px 3px rgba(0, 0, 0, .5);
border-radius: 3px;
}
.js-olay-hide {
cursor: pointer;
font-weight: bold;
}
.js-closer {
margin-top: 10px;
}
.js-olayception {
margin-top: 10px;
font-weight: bold;
color: #000066;
}
</style>
<script>
(function () {
var $ = window.jQuery;
var $closer;
var $olayception;
var newOlay = function () {
var $el = $('<div>')
.append($('.js-new-olay').last().clone()
.append($olayception.clone()))
.append($closer.clone());
$el.find('.js-show-olay').on('click', newOlay);
(new Olay($el, {
transition: $('.js-transition').last().val(),
duration: +$('.js-duration').last().val(),
ariaLabel: 'Olay kicks ass!'
})).show();
return false;
};
$(function () {
$olayception = $('.js-olayception').remove();
$closer = $('.js-closer').remove();
$('.js-new-olay').on('submit', newOlay);
});
})();
</script>
</head>
<body>
<h1>Olay Demo</h1>
<form class='js-new-olay'>
<select class='js-transition'>
<option value='js-olay-scale-up'>Scale Up</option>
<option value='js-olay-scale-down'>Scale Down</option>
<option value='js-olay-slide'>Slide</option>
<option value='js-olay-flip'>Flip</option>
</select>
<input class='js-duration' placeholder='Duration (ms)'>
<input type='submit' class='js-show-olay' value='Show'>
</form>
<div id='olayception' class='js-olayception'>OLAYCEPTION</div>
<div class='js-closer'>
To close, press ESC or click <button class='js-olay-hide'>HERE</button>.
</div>
</body>
</html>