-
Notifications
You must be signed in to change notification settings - Fork 41
/
header.gohtml
54 lines (54 loc) · 2.87 KB
/
header.gohtml
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
{{define "header"}}
<nav class="flex z-40 lg:z-50 sticky top-0 w-full items-center justify-between dark:bg-secondary bg-secondary-light p-3 h-20 z-40">
<a title="Start" href="/" class="flex items-center flex-no-shrink text-white mr-6">
<svg class="mr-2" width="100" height="54" viewBox="0 0 100 54" xmlns="http://www.w3.org/2000/svg">
<path fill="#3070B3"
d="M49.986,7v31h8V7h37v38h-7V14h-8v31h-7V14h-8v31h-22V14h-7v31h-7V14h-7V7H49.986z"></path>
</svg>
</a>
<div class="block grow flex items-center w-auto">
<div class="text-sm grow">
<a href="/"
class="block inline-block align-middle mt-0 mr-4 hover:text-white text-gray-400">
Start
</a>
{{- /*gotype: TUM-Live/tools.TUMLiveContext*/ -}}
{{if not .User}}
<a href="/login"
class="block inline-block align-middle mt-0 mr-4 hover:text-white text-gray-400">
Login
</a>
{{else}}
<a href="/logout"
class="inline-block align-middle mt-0 mr-4 hover:text-white text-gray-400">
Logout
</a>
{{if or (eq .User.Role 1) (eq .User.Role 2) }}
<a href="/admin"
class="inline-block align-middle mt-0 mr-4 hover:text-white text-gray-400">
Admin
</a>
{{end}}
{{end}}
<a href="/about"
class="inline-block align-middle mt-0 mr-4 hover:text-white text-gray-400">
About
</a>
</div>
<div class="flex">
<a title="Toggle color scheme" onclick="toggleColorScheme()"><i
class="transition-colors duration-200 hover:text-white text-gray-400 fas fa-sun mr-2 cursor-pointer"></i></a>
<a class="mr-3" rel="noopener" href="https://github.com/joschahenningsen/TUM-Live" aria-label="GitHub"><i
class="transition-colors duration-200 hover:text-white text-gray-400 vjs-icon-github"></i></a>
</div>
</div>
</nav>
<div id="alertBox" class="hidden text-center">
<div class="p-2 bg-indigo-800 items-center text-indigo-100 leading-none lg:rounded-full flex lg:inline-flex"
role="alert">
<span id="alertText" class="font-semibold mx-2 text-left flex-auto"></span>
<span id="alertOk" onclick="document.getElementById('alertBox').classList.add('hidden')"
class="cursor-pointer flex rounded-full bg-indigo-500 uppercase px-2 py-1 text-xs font-bold mr-3">Dismiss</span>
</div>
</div>
{{end}}