forked from callmenick/Slide-Push-Menus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
318 lines (245 loc) · 9.61 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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<title>Slide & Push Menus with CSS3 Transitions</title>
<meta name="description" content="Some slide and push menu demos using CSS3 transitions.">
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/style.min.css">
</head>
<body>
<div id="o-wrapper" class="o-wrapper">
<header class="o-header">
<nav class="o-header-nav">
<a href="http://callmenick.com/_development/image-caption-reveal-on-hover/" class="o-header-nav__link"><i class="fa fa-arrow-left"></i> Previous Demo</a>
<a href="http://callmenick.com/post/slide-and-push-menus-with-css3-transitions" class="o-header-nav__link">Back To Article <i class="fa fa-star"></i></a>
</nav>
<div class="o-container">
<h1 class="o-header__title">Slide and Push Menus with CSS</h1>
</div>
</header><!-- /o-header -->
<main class="o-content">
<div class="o-container">
<div class="c-buttons">
<button id="c-button--slide-left" class="c-button">Slide Left</button>
<button id="c-button--slide-right" class="c-button">Slide Right</button>
<button id="c-button--push-left" class="c-button">Push Left</button>
<button id="c-button--push-right" class="c-button">Push Right</button>
<button id="c-button--slide-top" class="c-button">Slide Top</button>
<button id="c-button--slide-bottom" class="c-button">Slide Botton</button>
<button id="c-button--push-top" class="c-button">Push Top</button>
<button id="c-button--push-bottom" class="c-button">Push Bottom</button>
</div>
<div id="github-icons"></div>
</div><!-- /o-container -->
</main><!-- /o-content -->
<footer class="o-footer">
<div class="o-container">
<small>© 2015, callmenick.com</small>
</div>
</footer><!-- /o-footer -->
</div><!-- /o-wrapper -->
<nav id="c-menu--slide-left" class="c-menu c-menu--slide-left">
<button class="c-menu__close">← Close Menu</button>
<ul class="c-menu__items">
<li class="c-menu__item"><a href="#" class="c-menu__link">Home</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">About</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Services</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Work</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Contact</a></li>
</ul>
</nav><!-- /c-menu slide-left -->
<nav id="c-menu--slide-right" class="c-menu c-menu--slide-right">
<button class="c-menu__close">Close Menu →</button>
<ul class="c-menu__items">
<li class="c-menu__item"><a href="#" class="c-menu__link">Home</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">About</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Services</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Work</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Contact</a></li>
</ul>
</nav><!-- /c-menu slide-right -->
<nav id="c-menu--push-left" class="c-menu c-menu--push-left">
<button class="c-menu__close">← Close Menu</button>
<ul class="c-menu__items">
<li class="c-menu__item"><a href="#" class="c-menu__link">Home</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">About</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Services</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Work</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Contact</a></li>
</ul>
</nav><!-- /c-menu push-left -->
<nav id="c-menu--push-right" class="c-menu c-menu--push-right">
<button class="c-menu__close">Close Menu →</button>
<ul class="c-menu__items">
<li class="c-menu__item"><a href="#" class="c-menu__link">Home</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">About</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Services</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Work</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Contact</a></li>
</ul>
</nav><!-- /c-menu push-right -->
<nav id="c-menu--slide-top" class="c-menu c-menu--slide-top">
<button class="c-menu__close"><strong>x</strong></button>
<ul class="c-menu__items">
<li class="c-menu__item"><a href="#" class="c-menu__link">Home</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">About</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Services</a></li>
</ul>
</nav><!-- /c-menu slide-top -->
<nav id="c-menu--push-top" class="c-menu c-menu--push-top">
<button class="c-menu__close"><strong>x</strong></button>
<ul class="c-menu__items">
<li class="c-menu__item"><a href="#" class="c-menu__link">Home</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">About</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Services</a></li>
</ul>
</nav><!-- /c-menu push-top -->
<nav id="c-menu--slide-bottom" class="c-menu c-menu--slide-bottom">
<button class="c-menu__close"><strong>x</strong></button>
<ul class="c-menu__items">
<li class="c-menu__item"><a href="#" class="c-menu__link">Home</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">About</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Services</a></li>
</ul>
</nav><!-- /c-menu slide-bottom -->
<nav id="c-menu--push-bottom" class="c-menu c-menu--push-bottom">
<button class="c-menu__close"><strong>x</strong></button>
<ul class="c-menu__items">
<li class="c-menu__item"><a href="#" class="c-menu__link">Home</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">About</a></li>
<li class="c-menu__item"><a href="#" class="c-menu__link">Services</a></li>
</ul>
</nav><!-- /c-menu push-bottom -->
<div id="c-mask" class="c-mask"></div><!-- /c-mask -->
<!-- menus script -->
<script src="js/dist/menu.js"></script>
<script>
/**
* Slide left instantiation and action.
*/
var slideLeft = new Menu({
wrapper: '#o-wrapper',
type: 'slide-left',
menuOpenerClass: '.c-button',
maskId: '#c-mask'
});
var slideLeftBtn = document.querySelector('#c-button--slide-left');
slideLeftBtn.addEventListener('click', function(e) {
e.preventDefault;
slideLeft.open();
});
/**
* Push left instantiation and action.
*/
var pushLeft = new Menu({
wrapper: '#o-wrapper',
type: 'push-left',
menuOpenerClass: '.c-button',
maskId: '#c-mask'
});
var pushLeftBtn = document.querySelector('#c-button--push-left');
pushLeftBtn.addEventListener('click', function(e) {
e.preventDefault;
pushLeft.open();
});
/**
* Slide right instantiation and action.
*/
var slideRight = new Menu({
wrapper: '#o-wrapper',
type: 'slide-right',
menuOpenerClass: '.c-button',
maskId: '#c-mask'
});
var slideRightBtn = document.querySelector('#c-button--slide-right');
slideRightBtn.addEventListener('click', function(e) {
e.preventDefault;
slideRight.open();
});
/**
* Push right instantiation and action.
*/
var pushRight = new Menu({
wrapper: '#o-wrapper',
type: 'push-right',
menuOpenerClass: '.c-button',
maskId: '#c-mask'
});
var pushRightBtn = document.querySelector('#c-button--push-right');
pushRightBtn.addEventListener('click', function(e) {
e.preventDefault;
pushRight.open();
});
/**
* Slide top instantiation and action.
*/
var slideTop = new Menu({
wrapper: '#o-wrapper',
type: 'slide-top',
menuOpenerClass: '.c-button',
maskId: '#c-mask'
});
var slideTopBtn = document.querySelector('#c-button--slide-top');
slideTopBtn.addEventListener('click', function(e) {
e.preventDefault;
slideTop.open();
});
/**
* Push top instantiation and action.
*/
var pushTop = new Menu({
wrapper: '#o-wrapper',
type: 'push-top',
menuOpenerClass: '.c-button',
maskId: '#c-mask'
});
var pushTopBtn = document.querySelector('#c-button--push-top');
pushTopBtn.addEventListener('click', function(e) {
e.preventDefault;
pushTop.open();
});
/**
* Slide bottom instantiation and action.
*/
var slideBottom = new Menu({
wrapper: '#o-wrapper',
type: 'slide-bottom',
menuOpenerClass: '.c-button',
maskId: '#c-mask'
});
var slideBottomBtn = document.querySelector('#c-button--slide-bottom');
slideBottomBtn.addEventListener('click', function(e) {
e.preventDefault;
slideBottom.open();
});
/**
* Push bottom instantiation and action.
*/
var pushBottom = new Menu({
wrapper: '#o-wrapper',
type: 'push-bottom',
menuOpenerClass: '.c-button',
maskId: '#c-mask'
});
var pushBottomBtn = document.querySelector('#c-button--push-bottom');
pushBottomBtn.addEventListener('click', function(e) {
e.preventDefault;
pushBottom.open();
});
</script>
<!-- EXTERNAL SCRIPTS FOR CALLMENICK.COM, PLEASE DO NOT INCLUDE -->
<script src="js/dist/githubIcons.js"></script>
<script src="js/dist/carbonAd.js"></script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-34160351-1', 'auto');
ga('send', 'pageview');
</script>
<!-- /EXTERNAL SCRIPTS -->
</body>
</html>