blob: 380f3d771befe9cc512af8f840ff761e5e7d0c8c (
plain)
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
|
<header class="nn-header">
<div class="nn-header-inner container">
<nav class="navbar" role="navigation" aria-label="navigation">
<div class="navbar-brand">
<a class="navbar-item" href="/">
<img class="navbar-icon" width="54" height="36" src="/assets/image/NNg-white.png">
</a>
<a role="button" class="navbar-burger" aria-label="menu" aria-expanded="false"
data-target="navbarBasicExample">
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
<span aria-hidden="true"></span>
</a>
</div>
<div id="navbarBasicExample" class="navbar-menu">
<div class="navbar-start"></div>
<div class="navbar-end">
<div class="navbar-item">
<a href="/man/">
<i class="iconfont icon-doc"></i>
</a>
</div>
<div class="navbar-item">
<a href="https://discord.gg/Xnac6b9">
<i class="iconfont icon-discord"></i>
</a>
</div>
<div class="navbar-item is-hidden-desktop">
<a href="https://github.com/nanomsg/nng">
Github
</a>
</div>
<div class="navbar-item is-hidden-touch">
<a href="https://github.com/nanomsg/nng">
<i class="iconfont icon-github"></i>
</a>
</div>
<div class="navbar-item is-hidden-touch">
<a href="https://github.com/nanomsg/nng/releases" class="btn-download">
<i class="iconfont icon-download"></i> Download
</a>
</div>
</div>
</div>
</nav>
</div>
<script defer>
document.addEventListener('DOMContentLoaded', () => {
// Get all "navbar-burger" elements
const $navbarBurgers = Array.prototype.slice.call(document.querySelectorAll(
'.navbar-burger'), 0);
// Check if there are any navbar burgers
if ($navbarBurgers.length > 0) {
// Add a click event on each of them
$navbarBurgers.forEach(el => {
el.addEventListener('click', () => {
// Get the target from the "data-target" attribute
const target = el
.dataset.target;
const $target = document
.getElementById(
target);
el.classList.toggle(
'is-active'
);
$target.classList
.toggle(
'is-active'
);
});
});
}
});
</script>
</header>
|