-
Notifications
You must be signed in to change notification settings - Fork 1
/
header.html
137 lines (135 loc) · 3.76 KB
/
header.html
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
<header>
<nav class="navbar navbar-expand-lg navbar-light bg-light">
<div class="container">
<a class="navbar-brand mb-1" href="index.html">
<img
id="headImg"
width="30"
height="30"
class="d-inline-block align-top"
alt=""
/>
Box's Nootbook
</a>
<button
class="navbar-toggler"
type="button"
data-toggle="collapse"
data-target="#navbarSupportedContent"
aria-controls="navbarSupportedContent"
aria-expanded="false"
aria-label="Toggle navigation"
>
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav mr-auto">
<li class="nav-item dropdown">
<a
class="nav-link dropdown-toggle"
href="#"
id="navbarDropdown"
role="button"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<img
id="categoryImg"
width="25"
height="25"
class="d-inline-block align-top"
alt=""
/>
Category
</a>
<div
id="catDropDownMenu"
class="dropdown-menu"
aria-labelledby="navbarDropdown"
></div>
</li>
<li class="nav-item">
<a class="nav-link" href="label.html?label=all">
<img
id="labelImg"
width="25"
height="25"
class="d-inline-block align-top"
alt=""
/>
Label <span class="sr-only">(current)</span></a
>
</li>
<li class="nav-item">
<a
class="nav-link"
href="https://bboxlin.github.io/"
target="_blank"
>
<img
id="appImg"
width="24"
height="24"
class="d-inline-block align-top"
alt=""
/>
Apps <span class="sr-only">(current)</span></a
>
</li>
<li class="nav-item">
<a
class="nav-link"
href="review.html"
>
<img
id="reviewImg"
width="24"
height="24"
class="d-inline-block align-top"
alt=""
/>
Review <span class="sr-only">(current)</span></a
>
</li>
</ul>
<form class="form-inline my-2 my-lg-0">
<input
class="form-control mr-sm-2"
type="search"
placeholder="Search"
aria-label="Search"
/>
<button class="btn btn-outline-success my-2 my-sm-0" type="submit">
Search
</button>
</form>
</div>
</div>
</nav>
<script>
const headCategoriesInit = async () => {
try {
const config = await readConfig("./config.yaml");
const cats = await getCategories(config.username, config.repo);
for (const cat of cats) {
let a = $(
`<a class="dropdown-item" href="category.html?category=${cat.title}&number=${cat.number}">${cat.title}</a>`
);
$("#catDropDownMenu").append(a);
}
} catch (err) {
console.log(err);
}
};
headCategoriesInit();
</script>
</header>
<style>
#header {
position: fixed;
top: 0;
width: 100%;
z-index: 1000; /* This ensures the header is on top of other elements */
}
</style>