-
Notifications
You must be signed in to change notification settings - Fork 2
/
headerAdmin.php
40 lines (38 loc) · 1.2 KB
/
headerAdmin.php
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
<header>
<div id="titleDiv">
<h1 id="bigTitle">OPERA OMNIA</h1>
</div>
<nav id="navbar" class="topnav">
<ul style="list-style-type:none">
<li><a href="../index" id="home">Home</a></li>
<li><a href="../papers.php">Papers</a></li>
<li><a href="../authors">Authors</a></li>
<li><a href="../submit" id="submit">Submit a Paper</a></li>
<li class="icon"><a href="javascript:void(0);" onclick="dropdown()">☰</a></li>
</ul>
</nav>
<script>
window.onscroll = function() {myFunction()};
var navbar = document.getElementById("navbar");
var sticky = navbar.offsetTop;
function myFunction()
{
if (window.pageYOffset >= sticky)
{
navbar.classList.add("sticky")
}
else
{
navbar.classList.remove("sticky");
}
}
function dropdown() {
var x = document.getElementById("navbar");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
</header>