-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnavbar.html
More file actions
137 lines (137 loc) · 3.54 KB
/
navbar.html
File metadata and controls
137 lines (137 loc) · 3.54 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
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<style>
#roundj{
font-size:48px;
background-color:#cc27b6;
color:white;
width:50px;
padding:20px;
border-radius:100px;
float:left;
}
nav>h1{
position:absolute;
top:12px;
left:105px;
font-size:36px;
color:#ca59c1;
}
/*.expandwhenhover{
height:30px;
}
.expandwhenhover:hover{
height:30px;
animation-name:expand;
animation-duration:0.5s;
}*/
@keyframes expand{
from{height:40px;}
to{height:70px;}
}
@keyframes deexpand{
from{height:70px;}
to{height:40px;}
}
.navbarlink{
text-align:center;
left:0;
top:120px;
width:22.9%;
padding-left:2%;
padding-top:20px;
position:absolute;
background-color:white;
height:40px;
/*animation:deexpand 0.5s;*/
border:1px solid black;
/*border-radius: 0px 0px 20px 20px;*/
transition:0.5s;
text-decoration:none;
color:black;
}
.navbarlink:hover{
/*height:70px;
animation:expand 0.5s;*/
transition:0.5s;
background-color:#5c5c5c;
color:white;
}
#navbaropen{
display:none;
}
#othernav{
display:none;
}
.close{
font-weight:bolder;
float:right;
margin-right:10px;
margin-top:10px;
font-size:48px;
color:red;
transition:0.2s;
}
.close:hover{
opacity:0.8;
transform:scale(1.5);
transition:0.2s;
}
@media only screen and (max-width: 750px){
nav > h1{
display:none;
}
#roundj{
float:right;
right:0px;
}
#navbaropen{
font-size:2rem;
float:left;
display:block;
width: calc(25% - 30px);
height:70px;
}
.navbarlink{
display:none;
}
#othernav{
padding:10px;
display:block;
position:fixed;
top:0;
left:0;
height:100vh;
left:-270px;
width:250px;
transition:0.5s;
background-color:white;
z-index:1000000000000000000000000;
color:black;
}
#othernav>a{
font-size:24px;
text-decoration:none;
color:black;
padding:20px;
}
}
</style>
<nav style="width:100%;margin:0;font-family: 'Comfortaa', cursive;height:200px;">
<!--Made with CSS and "Absolute positioning weirdness" (its a quote by HappyCupcake/EpicCakeKing)-->
<button id="navbaropen" onclick="document.getElementById('othernav').style.left='0px';">☰</button>
<a href="/"><div id="roundj"> J</div></a>
<h1>Jeopardy Multiplayer</h1>
<a href="/create" class="navbarlink expandwhenhover" style="left:25%;">Create a game</a>
<a href="/join" class="navbarlink expandwhenhover" style="left:50%;">Join a game</a>
<a href="/help" class="navbarlink expandwhenhover" style="left:75%;">Help desk H.Q.</a>
<a href="/host" class="navbarlink expandwhenhover" style="left:0;">Host a game</a>
</nav><br><br><br><br><br>
<div id="othernav">
<span class="close" onclick="document.getElementById('othernav').style.left='-270px'">×</span>
<h1>Navigation</h1>
<hr>
</hr>
<a href="/host">Host a game</a><br>
<a href="/create">Create a game</a><br>
<a href="/join">Join a game</a><br>
<a href="/help">Help desk H.Q.</a><br>
</div>