-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathnavigation.html
More file actions
94 lines (83 loc) · 2.04 KB
/
navigation.html
File metadata and controls
94 lines (83 loc) · 2.04 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
<link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.8.1/css/all.css" integrity="sha384-50oBUHEmvpQ+1lW4y57PTFmhCaXp0ML5d60M1M7uH2+nqUivzIebhndOJK28anvf" crossorigin="anonymous">
<div class="navbar">
{% for item in site.data.navbar.navbar %}
{% if item.subItems == null %}
<a href="{{ item.url }}">{{ item.title }}</a>
{% else %}
<div class="dropdown">
<button class="dropbtn">{{ item.title }}
<i class="fa fa-caret-down"></i>
</button>
<div class="dropdown-content">
{% for entry in item.subItems %}
<a href="{{ entry.url }}">{{ entry.title }}</a>
{% endfor %}
</div>
</div>
{% endif %}
{% endfor %}
</div>
<style type="text/css">
/* Navbar container */
.navbar {
overflow: hidden;
}
/* Links inside the navbar */
.navbar a {
float: left;
font-size: 16px;
color: white;
padding: 13px 16px 15px 16px;
text-decoration: none;
}
/* The dropdown container */
.dropdown {
float: left;
overflow: hidden;
}
/* Dropdown button */
.dropdown .dropbtn {
font-size: 16px;
border: none;
outline: none;
color: white;
padding: 14px 16px;
background-color: inherit;
font-family: 'Myriad Pro', Calibri, Helvetica, Arial;
line-height: 1.5;
-webkit-font-smoothing: antialiased;
}
.dropdown .dropbtn .fa {
padding-left: 3px;
}
/* Add a blue background color to navbar links on hover */
.navbar a:hover, .dropdown:hover .dropbtn {
background-color: #0090ff;
}
/* Dropdown content (hidden by default) */
.dropdown-content {
display: none;
position: absolute;
background-color: #f9f9f9;
min-width: 160px;
box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
z-index: 1;
}
/* Links inside the dropdown */
.dropdown-content a {
float: none;
color: black;
padding: 12px 16px;
text-decoration: none;
display: block;
text-align: left;
}
/* Add a grey background color to dropdown links on hover */
.dropdown-content a:hover {
background-color: #ddd;
}
/* Show the dropdown menu on hover */
.dropdown:hover .dropdown-content {
display: block;
}
</style>