-
Notifications
You must be signed in to change notification settings - Fork 2
/
headerAuthor.php
53 lines (53 loc) · 1.56 KB
/
headerAuthor.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
41
42
43
44
45
46
47
48
49
50
51
52
53
<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>
<style>
.topnav ul li [href='authors'] {
background-color: #d7d7d7;
}
</style>
<?php
if (file_exists("banners/". $_GET['authid'].".png")) {?>
<img id="banner" src="banners/<?php echo $_GET['authid']?>.png" />
<?php
}
else {?>
<img id="banner" src="banners/banner.php" />
<?php
}?>
<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>