forked from callmenick/Animating-Hamburger-Icons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
95 lines (82 loc) · 2.91 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="A collection of animating css-only hamburger menu toggle switches that transform when clicked represnting an active (or menu open) state.">
<title>CSS-Only Hamburger Menu Icons Demo</title>
<link rel="stylesheet" href="css/font-awesome.min.css">
<link rel="stylesheet" href="css/style.min.css">
</head>
<body>
<header class="o-header">
<nav class="o-header-nav">
<a href="http://callmenick.com/_development/icons-css3-transitions" class="o-header-nav__link"><i class="fa fa-arrow-left"></i> Previous Demo</a>
<a href="http://callmenick.com/post/animating-css-only-hamburger-menu-icons" 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">CSS-Only Hamburger Menu Icons Demo</h1>
</div>
</header>
<main class="o-content">
<div class="o-container">
<div class="o-grid">
<div class="o-grid__item">
<button class="c-hamburger c-hamburger--rot">
<span>toggle menu</span>
</button>
</div>
<div class="o-grid__item">
<button class="c-hamburger c-hamburger--htx">
<span>toggle menu</span>
</button>
</div>
<div class="o-grid__item">
<button class="c-hamburger c-hamburger--htla">
<span>toggle menu</span>
</button>
</div>
<div class="o-grid__item">
<button class="c-hamburger c-hamburger--htra">
<span>toggle menu</span>
</button>
</div>
</div>
<div id="github-icons"></div>
</div>
</main>
<footer class="o-footer">
<div class="o-container">
<small>© 2015, callmenick.com</small>
</div>
</footer>
<script>
(function() {
"use strict";
var toggles = document.querySelectorAll(".c-hamburger");
for (var i = toggles.length - 1; i >= 0; i--) {
var toggle = toggles[i];
toggleHandler(toggle);
};
function toggleHandler(toggle) {
toggle.addEventListener( "click", function(e) {
e.preventDefault();
(this.classList.contains("is-active") === true) ? this.classList.remove("is-active") : this.classList.add("is-active");
});
}
})();
</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>