-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsettings.html
216 lines (214 loc) · 7.33 KB
/
settings.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Website Blocker Manager</title>
<script src="tailwind.js"></script>
<link rel="stylesheet" href="styles.css" />
</head>
<body class="bg-gray-100 min-h-screen pt-20">
<header
class="fixed top-0 left-0 right-0 bg-white border-b border-gray-200 shadow-md z-10"
>
<nav
class="flex flex-col xl:flex-row items-center justify-between container mx-auto p-4"
>
<h1 class="text-3xl font-bold mb-4 xl:mb-0">
Website Blocker Settings
</h1>
<div
class="flex flex-col xl:flex-row justify-end space-y-4 xl:space-y-0 xl:space-x-4"
>
<div class="flex items-center space-x-2">
<h3 class="text-sm font-semibold">Local files:</h3>
<button
id="exportCSV"
class="bg-blue-500 text-white px-3 py-1 rounded text-sm hover:bg-blue-600"
>
Export CSV
</button>
<button
id="exportJSON"
class="bg-blue-500 text-white px-3 py-1 rounded text-sm hover:bg-blue-600"
>
Export JSON
</button>
<input
type="file"
id="importFile"
accept=".csv,.json"
class="hidden"
/>
<button
id="importButton"
class="bg-yellow-500 text-white px-3 py-1 rounded text-sm hover:bg-yellow-600"
>
Import
</button>
</div>
<div class="flex items-center space-x-2">
<h3 class="text-sm font-semibold">Cloud storage:</h3>
<button
id="exportToDrive"
class="bg-blue-500 text-white px-3 py-1 rounded text-sm hover:bg-blue-600"
>
Export to Drive
</button>
<button
id="importFromDrive"
class="bg-yellow-500 text-white px-3 py-1 rounded text-sm hover:bg-yellow-600"
>
Import from Drive
</button>
</div>
</div>
</nav>
</header>
<main class="main container mx-auto p-4 md:p-8">
<div class="flex flex-col lg:flex-row lg:space-x-8">
<!-- Add New Site section -->
<div class="w-full lg:w-1/3 mb-8 lg:mb-0 order-1 lg:order-2">
<h2 class="text-2xl font-semibold mb-4">Add New Site</h2>
<div class="bg-white rounded-xl shadow-md p-6">
<div class="flex flex-col mb-4">
<label>
Website or URL chunk to block:
<input
type="text"
id="siteInput"
list="sitesList"
placeholder="Enter website to block"
class="w-full px-3 py-2 border rounded-md"
/>
</label>
<datalist id="sitesList"></datalist>
<label class="mt-4">
From:
<input
type="time"
id="startTime"
class="w-full px-3 py-2 border rounded-md"
/>
</label>
<label class="mt-4">
To:
<input
type="time"
id="endTime"
class="w-full px-3 py-2 border rounded-md"
/>
</label>
</div>
<div class="mt-4">
<label class="block mb-2 font-semibold">Applicable on:</label>
<label class="flex items-center">
<input type="checkbox" id="checkAll" class="mr-2" />
<span>All days</span>
</label>
<div class="grid grid-cols-2 gap-2 mt-2">
<label class="flex items-center">
<input
type="checkbox"
name="day"
value="sunday"
class="mr-2"
/>
<span>Sunday</span>
</label>
<label class="flex items-center">
<input
type="checkbox"
name="day"
value="monday"
class="mr-2"
/>
<span>Monday</span>
</label>
<label class="flex items-center">
<input
type="checkbox"
name="day"
value="tuesday"
class="mr-2"
/>
<span>Tuesday</span>
</label>
<label class="flex items-center">
<input
type="checkbox"
name="day"
value="wednesday"
class="mr-2"
/>
<span>Wednesday</span>
</label>
<label class="flex items-center">
<input
type="checkbox"
name="day"
value="thursday"
class="mr-2"
/>
<span>Thursday</span>
</label>
<label class="flex items-center">
<input
type="checkbox"
name="day"
value="friday"
class="mr-2"
/>
<span>Friday</span>
</label>
<label class="flex items-center">
<input
type="checkbox"
name="day"
value="saturday"
class="mr-2"
/>
<span>Saturday</span>
</label>
</div>
</div>
<button
id="addSite"
class="w-full bg-blue-500 text-white px-4 py-2 rounded-md hover:bg-blue-600 mt-4"
>
Add Site
</button>
</div>
</div>
<!-- Blocked Sites list section -->
<div class="w-full lg:w-2/3 order-1 lg:order-2">
<h2 class="text-2xl font-semibold mb-4">Blocked Sites</h2>
<div class="flex space-x-4 mb-4">
<button id="listViewBtn" class="bg-blue-500 text-white px-4 py-2 rounded-md hover:bg-blue-600">List View</button>
<button id="calendarViewBtn" class="bg-blue-500 text-white px-4 py-2 rounded-md hover:bg-blue-600">Calendar View</button>
</div>
<div id="listView">
<ul id="blockedSitesList" class="space-y-4"></ul>
</div>
<div id="calendarView" class="hidden">
<!-- Calendar view content will be added here -->
</div>
</div>
</div>
</main>
<div id="driveModal" class="modal hidden">
<div class="modal-content">
<h2 class="text-2xl">Export Successful</h2>
<p class="pt-4" id="driveModalMessage"></p>
<button
class="mt-4 bg-blue-500 text-white px-3 py-1 rounded hover:bg-blue-600"
id="closeModal"
>
Close
</button>
</div>
</div>
<script src="settings.js"></script>
<script src="google-drive-api.js"></script>
</body>
</html>