1
+ {{ define "header.html"}}
2
+
3
+ <!DOCTYPE html>
4
+ < html lang ="en " data-bs-theme ="{{ .Config.Color }} ">
5
+ < head >
6
+ < title > Click A Habit</ title >
7
+ < meta charset ="utf-8 ">
8
+ < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
9
+ <!--Favicon-->
10
+ < link rel ="icon " type ="image/x-icon " href ="/fs/public/favicon.png ">
11
+ {{ if eq .Config.NodePath "" }}
12
+ <!-- Font for icons -->
13
+ < link rel ="stylesheet " href ="https://cdn.jsdelivr.net/npm/bootstrap-icons@1.11.2/font/bootstrap-icons.css ">
14
+ <!-- Bootstrap and theme -->
15
+ < link href ="https://cdn.jsdelivr.net/gh/aceberg/aceberg-bootswatch-fork@v5/dist/{{ .Config.Theme }}/bootstrap.min.css " rel ="stylesheet ">
16
+ <!-- JavaScript Bundle with Popper -->
17
+ < script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.2/dist/js/bootstrap.bundle.min.js "> </ script >
18
+ {{ else }} <!-- Local node_modules -->
19
+ < link rel ="stylesheet " href ="{{ .Config.NodePath }}/node_modules/bootstrap-icons/font/bootstrap-icons.css ">
20
+ < link href ="{{ .Config.NodePath }}/node_modules/bootswatch/dist/{{ .Config.Theme }}/bootstrap.min.css " rel ="stylesheet ">
21
+ < script src ="{{ .Config.NodePath }}/node_modules/bootstrap/dist/js/bootstrap.bundle.min.js "> </ script >
22
+ {{ end }}
23
+ </ head >
24
+ < style >
25
+ .my-btn-lg {
26
+ width : {{ .Config .BtnWidth }};
27
+ }
28
+ </ style >
29
+ < body >
30
+ < nav class ="navbar navbar-expand-md navbar-dark bg-primary ">
31
+ < div class ="container-lg ">
32
+ < ul class ="navbar-nav ">
33
+ < li class ="nav-item ">
34
+ < a class ="nav-link active " href ="/ ">
35
+ < img src ="/fs/public/favicon.png " style ="width: 2em "/>
36
+ </ a >
37
+ </ li >
38
+ < li class ="nav-item dropdown ">
39
+ < a class ="nav-link active dropdown-toggle " href ="# " role ="button " data-bs-toggle ="dropdown ">
40
+ < i class ="bi bi-list "> </ i >
41
+ </ a >
42
+ < ul class ="dropdown-menu ">
43
+ < li > < a class ="dropdown-item " href ="/planedit/new "> Add Plan</ a > </ li >
44
+ < li > < hr class ="dropdown-divider "> </ li >
45
+ < li > < a class ="dropdown-item " href ="/history/ "> History</ a > </ li >
46
+ < li > < a class ="dropdown-item " href ="/plan/ "> Plan</ a > </ li >
47
+ < li > < hr class ="dropdown-divider "> </ li >
48
+ < li > < a class ="dropdown-item " href ="/config/ "> Config</ a > </ li >
49
+ </ ul >
50
+ </ li >
51
+ </ ul >
52
+ <!-- <ul class="navbar-nav">
53
+ <li class="nav-item">
54
+ <a class="nav-link active fs-3 ms-md-2" target="_blank" href="https://github.com/aceberg/ClickAHabit"><i class="bi bi-github"></i></a>
55
+ </li>
56
+ </ul> -->
57
+ </ div >
58
+ </ nav >
59
+ {{ end }}
0 commit comments