25
25
26
26
< body class ="d-flex flex-column h-100 " hx-ext ="response-targets ">
27
27
< header >
28
- < nav class ="navbar navbar-expand-md fixed-top {{if .HomeNavbar}}navbar-home{{end}} ">
28
+ < nav class ="navbar navbar-expand-lg fixed-top {{if .HomeNavbar}}navbar-home{{end}} ">
29
29
< div class ="container d-flex justify-content-end ">
30
30
{{if not .HomeNavbar}}
31
31
< span class ="navbar-brand mb-0 h1 ">
45
45
data-bs-target ="#offcanvasNavbar " aria-controls ="offcanvasNavbar ">
46
46
< span class ="navbar-toggler-icon "> </ span >
47
47
</ button >
48
- < div class ="offcanvas offcanvas-end " tabindex ="-1 " id ="offcanvasNavbar "
48
+ < div class ="offcanvas-lg offcanvas-end " tabindex ="-1 " id ="offcanvasNavbar "
49
49
aria-labelledby ="offcanvasNavbarLabel ">
50
50
< div class ="offcanvas-header ">
51
- < h5 class ="offcanvas-title " id ="offcanvasNavbarLabel "> Coreander</ h5 >
52
- < button type ="button " class ="btn-close " data-bs-dismiss ="offcanvas " aria-label ="Close "> </ button >
51
+ < h5 class ="offcanvas-title " id ="offcanvasNavbarLabel ">
52
+ < img src ="/images/coreander-logo-small.png " alt ="Logo " width ="32 " height ="32 " class ="d-inline-block align-text-middle ">
53
+ {{.Session.Name}}
54
+ </ h5 >
55
+ < button type ="button " class ="btn-close " data-bs-dismiss ="offcanvas " data-bs-target ="#offcanvasNavbar " aria-label ="Close "> </ button >
53
56
</ div >
54
57
< div class ="offcanvas-body ">
55
58
< ul class ="navbar-nav justify-content-end flex-grow-1 pe-3 text-start ">
56
59
{{if and (.Session) (ne .Session.Name "")}}
57
- < li class ="nav-item dropdown ">
58
- < button class ="btn dropdown-toggle " data-bs-toggle ="dropdown " aria-expanded ="false ">
59
- {{.Session.Name}}
60
- </ button >
61
- < ul class ="dropdown-menu ">
62
- < li >
63
- {{if eq .Session.Role 2}}
64
- < a class ="dropdown-item " href ="/users ">
65
- < i class ="bi-person-fill "> </ i >
66
-
67
- {{t .Lang "Users"}}
68
- </ a >
69
- {{else}}
70
- < a class ="dropdown-item " href ="/users/{{.Session.Username}} ">
71
- < i class ="bi-person-fill "> </ i >
60
+ < li class ="p-2 ">
61
+ {{if eq .Session.Role 2}}
62
+ < a href ="/users " class ="link-underline link-underline-opacity-0 ">
63
+ < i class ="bi-person-fill "> </ i >
72
64
73
- {{t .Lang "Update your profile"}}
74
- </ a >
75
- {{end}}
76
- </ li >
77
- < li >
78
- < a class ="dropdown-item " href ="/highlights ">
79
- < i class ="bi-star-fill "> </ i >
65
+ {{t .Lang "Users"}}
66
+ </ a >
67
+ {{else}}
68
+ < a href ="/users/{{.Session.Username}} " class ="link-underline link-underline-opacity-0 ">
69
+ < i class ="bi-person-fill "> </ i >
80
70
81
- {{t .Lang "Highlights "}}
82
- </ a >
83
- </ li >
84
- {{if eq .Session.Role 2}}
85
- < li >
86
- < a class =" dropdown-item " href =" /upload ">
87
- < i class ="bi-cloud-upload -fill "> </ i >
71
+ {{t .Lang "Update your profile "}}
72
+ </ a >
73
+ {{end}}
74
+ </ li >
75
+ < li class =" p-2 " >
76
+ < a href =" /highlights " class =" link-underline link-underline-opacity-0 ">
77
+ < i class ="bi-star -fill "> </ i >
88
78
89
- {{t .Lang "Upload document"}}
90
- </ a >
91
- </ li >
92
- {{end}}
93
- < li >
94
- < hr class ="dropdown-divider ">
95
- </ li >
96
- < li >
97
- < a class ="dropdown-item " href ="/sessions " hx-delete ="/sessions ">
98
- < i class ="bi-box-arrow-right "> </ i >
79
+ {{t .Lang "Highlights"}}
80
+ </ a >
81
+ </ li >
82
+ {{if eq .Session.Role 2}}
83
+ < li class ="p-2 ">
84
+ < a href ="/upload " class ="link-underline link-underline-opacity-0 ">
85
+ < i class ="bi-cloud-upload-fill "> </ i >
99
86
100
- {{t .Lang "Logout"}}
101
- </ a >
102
- </ li >
103
- </ ul >
87
+ {{t .Lang "Upload document"}}
88
+ </ a >
104
89
</ li >
90
+ {{end}}
105
91
{{else if not .DisableLoginLink}}
106
92
< li class ="p-2 ">
107
93
< a href ="/sessions/new "> {{t .Lang "Login"}}</ a >
@@ -111,17 +97,35 @@ <h5 class="offcanvas-title" id="offcanvasNavbarLabel">Coreander</h5>
111
97
{{$lang := .Lang}}
112
98
{{$URLPath := .URLPath}}
113
99
{{$queryString := .QueryString}}
114
- {{range $i, $currentLang := .SupportedLanguages}}
115
- {{if eq $lang $currentLang}}
116
- < li class ="p-2 "> {{uppercase $currentLang}}</ li >
117
- {{else if eq $queryString ""}}
118
- < li class ="p-2 "> < a href ="{{$URLPath}}?l={{$currentLang}} "> {{uppercase $currentLang}}</ a > </ li >
119
- {{else}}
120
- < li class ="p-2 "> < a href ="{{$URLPath}}?{{$queryString}}&l={{$currentLang}} "> {{uppercase $currentLang}}</ a > </ li >
100
+ < li class ="nav-item dropdown ">
101
+ < button class ="btn dropdown-toggle " data-bs-toggle ="dropdown " aria-expanded ="false ">
102
+ < i class ="bi-globe "> </ i >
103
+ </ button >
104
+ < ul class ="dropdown-menu ">
105
+ {{range $i, $currentLang := .SupportedLanguages}}
106
+ {{if eq $lang $currentLang}}
107
+ < li class ="dropdown-item "> {{uppercase $currentLang}}</ li >
108
+ {{else if eq $queryString ""}}
109
+ < li class ="dropdown-item "> < a href ="{{$URLPath}}?l={{$currentLang}} "> {{uppercase $currentLang}}</ a > </ li >
110
+ {{else}}
111
+ < li class ="dropdown-item "> < a href ="{{$URLPath}}?{{$queryString}}&l={{$currentLang}} "> {{uppercase $currentLang}}</ a > </ li >
112
+ {{end}}
121
113
{{end}}
122
- {{end}}
114
+ </ ul >
115
+ </ li >
116
+ < li class ="nav-item dropdown ">
117
+ {{template "partials/color-mode-toggle" dict "Lang" $lang}}
118
+ </ li >
119
+ {{if and (.Session) (ne .Session.Name "")}}
123
120
< hr class ="d-lg-none ">
124
- {{template "partials/color-mode-toggle" dict "Lang" $lang}}
121
+ < li class ="p-2 ">
122
+ < a href ="/sessions " hx-delete ="/sessions " class ="link-underline link-underline-opacity-0 ">
123
+ < i class ="bi-box-arrow-right "> </ i >
124
+
125
+ {{t .Lang "Logout"}}
126
+ </ a >
127
+ </ li >
128
+ {{end}}
125
129
</ ul >
126
130
</ div >
127
131
</ div >
0 commit comments