blob: b92f71663cab393d9357526abeaa87bbb4d8dbe5 (
plain) (
blame)
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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
|
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>{{ .name }} - List</title>
<style>
html, body {
width: 100%;
height: 100%;
margin: 0;
overflow: hidden;
}
body {
font-family: Arial, sans-serif;
background-color: #2d353b;
color: #d3c6aa;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
}
.container {
padding: 2rem;
width: 300px;
max-height: 100%;
}
.checklist {
max-height: 500px;
overflow-y: auto;
padding: 10px;
}
h1 {
text-align: center;
}
ul {
list-style-type: none;
padding: 0;
}
li {
display: flex;
align-items: center;
justify-content: space-between;
margin: 0.5rem 0;
padding: 0.5rem;
border: 1px solid #d3c6aa;
border-radius: 4px;
height: 25px;
}
li.selected {
text-decoration: line-through;
color: #475258;
border: 1px solid #475258;
}
button {
display: block;
padding: 10px 20px;
border: none;
background-color: #d3c6aa;
color: #2d353b;
border-radius: 4px;
cursor: pointer;
width: 100%
}
.input-container{
position:relative;
margin-bottom:25px;
margin-top:25px;
}
.input-container label{
position:absolute;
top:0px;
left:0px;
font-size:16px;
color:#fff;
pointer-event:none;
transition: all 0.5s ease-in-out;
}
.input-container input{
border:0;
border-bottom:1px solid #555;
background:transparent;
width:100%;
padding:8px 0 5px 0;
font-size:16px;
color:#d3c6aa;
}
.input-container input:focus{
border:none;
outline:none;
border-bottom:1px solid #d3c6aa;
}
.input-container input:focus ~ label,
.input-container input:valid ~ label{
top:-12px;
font-size:12px;
}
/* settings for mini phones */
@media (max-width: 280px) {
h1 {
font-size: 0;
height: 0;
margin: 0;
}
li {
height: 18px;
margin: 0.3rem 0;
}
.container {
width: 268px; /* Scale font sizes */
height: 100%;
margin: 0;
}
.checklist {
height: 300px;
margin: 0;
padding: 3px;
padding-top: 0;
}
.input-container {
margin: 6px;
}
.delete-button {
width: 170px;
}
}
/* Scrollbar styles for WebKit browsers (Chrome, Safari) */
/* Track */
::-webkit-scrollbar {
width: 10px; /* Width of the scrollbar */
}
/* Handle */
::-webkit-scrollbar-thumb {
background-color: #3d484d; /* Color of the scrollbar handle */
border-radius: 5px; /* Rounded corners of the handle */
}
/* Handle on hover */
::-webkit-scrollbar-thumb:hover {
background-color: #475258; /* Darker color on hover */
}
/* Track */
::-webkit-scrollbar-track {
background: transparent; /* Color of the scrollbar track */
}
/* Corner */
::-webkit-scrollbar-corner {
background: transparent; /* Background color of the scrollbar corner */
}
</style>
</head>
<body>
<div class="container">
<h1>{{ .name }} - List</h1>
<ul class="checklist" id="checklist">
{{ range .entries }}
{{ if .Checked }}
<li class="selected">
{{ else }}
<li>
{{ end }}
{{ .Text }}
<form action="{{ $.base_path }}toggle" method="POST">
<input type="hidden" name="id" value="{{ .ID }}" />
<button type="submit" />
</form>
</li>
{{ end }}
</ul>
<form action="{{ .base_path }}create" method="POST">
<div class="input-container">
<input type="text" id="newItem" name="newItem" tabindex="0" autofocus/>
</div>
</form>
<form action="{{ .base_path }}delete" method="POST" onsubmit="return confirm('Are you sure you want to delete all checked entries?')">
<button type="submit" class="delete-button">Delete Selected Items</button>
</form>
<form action="{{ .base_path }}logout" method="POST" onsubmit="return confirm('Are you sure you want to logout?')">
<div class="input-container">
<button type="submit" class="delete-button">Logout</button>
</div>
</form>
</div>
</body>
</html>
|