-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
69 lines (64 loc) · 2.54 KB
/
index.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
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<title>Logdesk</title>
<!-- https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP -->
<meta
http-equiv="Content-Security-Policy"
content="default-src 'self'; script-src 'self' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; style-src-elem 'self' 'unsafe-inline'; script-src-elem 'self' https://cdn.jsdelivr.net"
/>
<link href="/tailwind.css" type="text/css" rel="stylesheet" />
<script defer src="https://cdn.jsdelivr.net/npm/alpinejs@3.x.x/dist/cdn.min.js"></script>
</head>
<body>
<!-- navigation -->
<nav
style="-webkit-app-region: drag"
class="sticky top-0 w-full z-30 bg-stone-100 grid grid-cols-2 justify-between shadow-xl py-1 px-2 overflow-hidden"
>
<!-- logo -->
<h1 class="ml-20 text-slate-700">Logdesk</h1>
<!-- toggle switch always on top -->
<div class="flex items-center justify-end">
<div class="flex items-center" x-data="{ on: false }">
<button
style="-webkit-app-region: no-drag"
type="button"
class="bg-neutral-300 relative inline-flex h-4 w-11 flex-shrink-0 cursor-pointer rounded-full border-2 border-transparent transition-colors duration-200 ease-in-out"
role="switch"
aria-checked="false"
x-ref="switch"
x-state:on="Enabled"
x-state:off="Not Enabled"
:class="{ 'bg-indigo-500': on, 'bg-neutral-300': !(on) }"
aria-labelledby="annual-billing-label"
:aria-checked="on.toString()"
@click="on = !on; window.electronAPI.toggleTop(on);"
>
<span
aria-hidden="true"
class="translate-x-0 pointer-events-none inline-block h-3 w-3 transform rounded-full bg-white shadow ring-0 transition duration-200 ease-in-out"
x-state:on="Enabled"
x-state:off="Not Enabled"
:class="{ 'translate-x-5': on, 'translate-x-0': !(on) }"
></span>
</button>
<span
class="ml-3 text-sm"
id="annual-billing-label"
@click="on = !on; $refs.switch.focus(); window.electronAPI.toggleTop(on);"
>
<span class="text-slate-700">Keep on top</span>
</span>
</div>
</div>
<!-- end toggle -->
</nav>
<!-- end navigation -->
<div class="container mx-auto">
<div id="response" class="text-xs px-2"></div>
</div>
<script src="/renderer.js"></script>
</body>
</html>