-
Notifications
You must be signed in to change notification settings - Fork 89
Expand file tree
/
Copy pathmenu.html
More file actions
118 lines (116 loc) · 5.33 KB
/
menu.html
File metadata and controls
118 lines (116 loc) · 5.33 KB
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
<!DOCTYPE html>
<html lang="en" class="no-js">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Block Reveal Effects | Menu | Codrops</title>
<meta name="description" content="Ideas for revealing content in a schematic box look." />
<meta name="keywords" content="javascript, plugin, reveal, effect, demo, web development, web design, template" />
<meta name="author" content="Codrops" />
<link rel="shortcut icon" href="favicon.ico">
<link href="https://fonts.googleapis.com/css?family=Inconsolata:400,700|Poppins:700" rel="stylesheet">
<link rel="stylesheet" type="text/css" href="css/normalize.css" />
<link rel="stylesheet" type="text/css" href="css/demo.css" />
<link rel="stylesheet" type="text/css" href="css/revealer.css" />
<script>document.documentElement.className = 'js';</script>
</head>
<body class="demo-menu">
<svg class="hidden">
<symbol id="icon-arrow" viewBox="0 0 24 24">
<title>arrow</title>
<polygon points="6.3,12.8 20.9,12.8 20.9,11.2 6.3,11.2 10.2,7.2 9,6 3.1,12 9,18 10.2,16.8 "/>
</symbol>
<symbol id="icon-drop" viewBox="0 0 24 24">
<title>drop</title>
<path d="M12,21c-3.6,0-6.6-3-6.6-6.6C5.4,11,10.8,4,11.4,3.2C11.6,3.1,11.8,3,12,3s0.4,0.1,0.6,0.3c0.6,0.8,6.1,7.8,6.1,11.2C18.6,18.1,15.6,21,12,21zM12,4.8c-1.8,2.4-5.2,7.4-5.2,9.6c0,2.9,2.3,5.2,5.2,5.2s5.2-2.3,5.2-5.2C17.2,12.2,13.8,7.3,12,4.8z"/><path d="M12,18.2c-0.4,0-0.7-0.3-0.7-0.7s0.3-0.7,0.7-0.7c1.3,0,2.4-1.1,2.4-2.4c0-0.4,0.3-0.7,0.7-0.7c0.4,0,0.7,0.3,0.7,0.7C15.8,16.5,14.1,18.2,12,18.2z"/>
</symbol>
<symbol id="icon-menu" viewBox="0 0 17.6 9.9">
<title>menu</title>
<path d="M17.6,1H0V0h17.6V1z M17.6,4.3h-12v1h12V4.3z M17.6,8.9h-6.9v1h6.9V8.9z"/>
</symbol>
<symbol id="icon-cross" viewBox="0 0 10.2 10.2">
<title>cross</title>
<path d="M5.8,5.1l4.4,4.4l-0.7,0.7L5.1,5.8l-4.4,4.4L0,9.5l4.4-4.4L0,0.7L0.7,0l4.4,4.4L9.5,0l0.7,0.7L5.8,5.1z"/>
</symbol>
</svg>
<main>
<header class="codrops-header">
<div class="codrops-links">
<a class="codrops-icon codrops-icon--prev" href="https://tympanus.net/Development/MusicalInteractions/" title="Previous Demo"><svg class="icon icon--arrow"><use xlink:href="#icon-arrow"></use></svg></a>
<a class="codrops-icon codrops-icon--drop" href="https://tympanus.net/codrops/?p=29372" title="Back to the article"><svg class="icon icon--drop"><use xlink:href="#icon-drop"></use></svg></a>
</div>
<h1 class="codrops-header__title">Block Reveal Effects</h1>
<nav class="demos">
<a class="demo" href="index.html">Overview</a>
<a class="demo demo--current" href="menu.html">Menu</a>
<a class="demo" href="modal.html">Modal</a>
<a class="demo" href="form.html">Form</a>
<a class="demo" href="split.html">Split layout</a>
<a class="github" href="https://github.com/codrops/BlockRevealers/">/Github</a>
</nav>
<button class="btn btn--menu"><svg class="icon icon--menu"><use xlink:href="#icon-menu"></use></svg></button>
</header>
<section class="content flexy flexy--center">
<p class="content__heading content__heading--center"><strong>Click the menu icon ↗</strong></p>
</section>
<nav class="menu">
<button class="btn btn--close"><svg class="icon icon--cross"><use xlink:href="#icon-cross"></use></svg></button>
<ul class="menu__inner">
<li class="menu__item"><a class="menu__link" href="#">Work</a></li>
<li class="menu__item"><a class="menu__link" href="#">Play</a></li>
<li class="menu__item"><a class="menu__link" href="#">Chat</a></li>
<li class="menu__item"><a class="menu__link" href="#">Party</a></li>
</ul>
</nav>
<!-- Related demos -->
<section class="content content--related">
<h2>If you enjoyed this demo you might also like:</h2>
<a class="media-item" href="https://tympanus.net/Tutorials/PageRevealEffects/">
<img class="media-item__img" src="img/related/PageRevealEffects.png">
<h3 class="media-item__title">Multi-Layer Page Reveal Effects</h3>
</a>
<a class="media-item" href="https://tympanus.net/Development/ImageGridEffects/">
<img class="media-item__img" src="img/related/ImageGridEffects.png">
<h3 class="media-item__title">Image Grid Effects</h3>
</a>
</section>
</main>
<script src="js/anime.min.js"></script>
<script src="js/main.js"></script>
<script>
(function() {
var navEl = document.querySelector('nav.menu'),
revealer = new RevealFx(navEl),
closeCtrl = navEl.querySelector('.btn--close');
document.querySelector('.btn--menu').addEventListener('click', function() {
revealer.reveal({
bgcolor: '#7f40f1',
duration: 400,
easing: 'easeInOutCubic',
onCover: function(contentEl, revealerEl) {
navEl.classList.add('menu--open');
contentEl.style.opacity = 1;
},
onComplete: function() {
closeCtrl.addEventListener('click', closeMenu);
}
});
});
function closeMenu() {
closeCtrl.removeEventListener('click', closeMenu);
navEl.classList.remove('menu--open');
revealer.reveal({
bgcolor: '#7f40f1',
duration: 400,
easing: 'easeInOutCubic',
onCover: function(contentEl, revealerEl) {
navEl.classList.remove('menu--open');
contentEl.style.opacity = 0;
}
});
}
})();
</script>
</body>
</html>