-
Notifications
You must be signed in to change notification settings - Fork 1
/
44-todo-basiclightbox.html
234 lines (209 loc) Β· 6.09 KB
/
44-todo-basiclightbox.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
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
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>44-todo-basiclightbox</title>
<link
rel="stylesheet"
href="https://cdn.jsdelivr.net/npm/basiclightbox@5.0.4/dist/basicLightbox.min.css"
integrity="sha256-r7Neol40GubQBzMKAJovEaXbl9FClnADCrIMPljlx3E="
crossorigin="anonymous"
/>
</head>
<style>
.todo-wrapper {
position: absolute;
top: 30%;
left: 50%;
transform: translate(-50%, -50%);
margin: 0 auto;
max-width: 100%;
width: 500px;
padding: 8px;
box-shadow: -3px -3px 20px #fff, 5px 5px 20px #919dcc;
}
.form-todo,
.todo-list {
display: flex;
margin: 0 auto;
border-radius: 4px;
}
.form-todo {
align-items: center;
justify-content: space-between;
column-gap: 10px;
padding: 8px 12px;
}
.form-todo__input {
width: 90%;
border-radius: 0.5rem;
padding: 8px;
box-shadow: -3px -3px 20px #fff, 5px 5px 20px #919dcc;
}
.form-todo__input:hover {
box-shadow: -2px -2px 5px #fff, 2px 2px 5px #babecc;
}
.form-todo__input:active {
box-shadow: inset 1px 1px 2px #babecc, inset -1px -1px 2px #fff;
}
.todo-list {
flex-direction: column;
row-gap: 30px;
padding: 4px;
}
.todo-list__item {
display: flex;
justify-content: space-between;
align-items: center;
column-gap: 10px;
padding: 8px;
border-bottom: 1px dotted #c3cffe;
}
.form-todo__input,
.todo-list__input,
.form-todo__btn,
.todo-list__btn {
border: none;
outline: none;
background-color: transparent;
color: #4b00b4;
text-shadow: 0.0625rem 0.0625rem 0.0625rem #fff;
transition: all 250ms ease-in-out;
}
.todo-list__input,
.form-todo__btn,
.todo-list__btn {
display: flex;
justify-content: center;
align-items: center;
margin: 0;
padding: 0.5rem;
cursor: pointer;
border-radius: 50px;
box-shadow: -0.0625rem -0.0625rem 0.0625rem white,
0.0625rem 0.0625rem 0.0625rem rgba(0, 0, 0, 0.2);
}
.todo-list__input:hover,
.form-todo__btn:hover,
.todo-list__btn:hover,
.todo-list__input:focus,
.form-todo__btn:focus,
.todo-list__btn:focus {
box-shadow: inset -0.0625rem -0.0625rem 0.0625rem white,
inset 0.0625rem 0.0625rem 0.0625rem rgba(0, 0, 0, 0.2);
transform: scale(0.8);
}
.todo-list__input:active,
.form-todo__btn:active,
.todo-list__btn:active {
box-shadow: inset -0.0625rem -0.0625rem 0.1875rem white,
inset 0.0625rem 0.0625rem 0.0625rem rgba(0, 0, 0, 0.2);
}
.form-todo__btn {
border-radius: 0.5rem;
box-shadow: -3px -3px 20px #fff, 3px 3px 20px #919dcc;
}
.form-todo__btn:hover {
box-shadow: -2px -2px 5px #fff, 2px 2px 5px #babecc;
}
.form-todo__btn:active {
box-shadow: inset 1px 1px 2px #babecc, inset -1px -1px 2px #fff;
}
.todo-list__input {
border-radius: 0.5rem;
padding: 8px;
}
.todo-list__input + span {
font-style: italic;
}
.btn-wrapper {
display: flex;
column-gap: 10px;
}
div.basicLightbox {
background: rgba(24, 10, 65, 0.5);
}
.modal {
display: flex;
flex-direction: column;
padding: 12px;
max-width: 480px;
margin: 0 auto;
border-radius: 4px;
box-shadow: -1px -1px 2px #fff, 1px 1px 2px #919dcc;
background-color: #d8e0ff;
color: #61677c;
text-shadow: 1px 1px 0 #fff;
}
.todo-modal__close-btn {
display: flex;
justify-content: center;
align-items: center;
margin: 0 auto;
padding: 0.5rem;
cursor: pointer;
max-width: 100px;
border: none;
outline: none;
background-color: transparent;
color: #4b00b4;
text-shadow: 0.0625rem 0.0625rem 0.0625rem #fff;
transition: all 250ms ease-in-out;
border-radius: 0.5rem;
box-shadow: -3px -3px 20px #fff, 3px 3px 20px #919dcc;
}
.todo-modal__close-btn:hover {
box-shadow: -2px -2px 5px #fff, 2px 2px 5px #babecc;
}
.todo-modal__close-btn:active {
box-shadow: inset 1px 1px 2px #babecc, inset -1px -1px 2px #fff;
}
</style>
<body>
<div class="todo-wrapper">
<!-- form ToDo -->
<form action="#" class="form-todo js-form-todo">
<input
type="text"
name="text"
class="form-todo__input js-form-todo__input"
placeholder="Enter what do you want to do..."
/>
<button type="submit" class="form-todo__btn">ADD</button>
</form>
<!-- ToDo list -->
<ul class="todo-list js-todo-list">
<!-- <li class="todo-list__item">
<input type="checkbox" name="checkbox" class="todo-list__input" />
<span>Must to do</span>
<button class="todo-list__btn">
<i class="fa-sharp fa-solid fa-trash"></i>
</button>
</li>
<li class="todo-list__item">
<input type="checkbox" name="checkbox" class="todo-list__input" />
<span>Must to do</span>
<button class="todo-list__btn">
<i class="fa-sharp fa-solid fa-trash"></i>
</button>
</li>
<li class="todo-list__item">
<input type="checkbox" name="checkbox" class="todo-list__input" />
<span>Must to do</span>
<button class="todo-list__btn">
<i class="fa-sharp fa-solid fa-trash"></i>
</button>
</li> -->
</ul>
</div>
<script src="https://kit.fontawesome.com/bd3e78b64a.js" crossorigin="anonymous"></script>
<script
src="https://cdn.jsdelivr.net/npm/basiclightbox@5.0.4/dist/basicLightbox.min.js"
integrity="sha256-nMn34BfOxpKD0GwV5nZMwdS4e8SI8Ekz+G7dLeGE4XY="
crossorigin="anonymous"
></script>
<script src="./app/44-todo-basiclightbox.js" type="module"></script>
</body>
</html>