-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.html
448 lines (419 loc) · 21.7 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
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
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>DMX New Tab</title>
<link rel="stylesheet" href="styles.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
<!-- Add Web App Manifest for PWA support -->
<link rel="manifest" href="manifest.json">
<!-- Add theme-color for browser UI consistency -->
<meta name="theme-color" content="#1a1b26">
<!-- Add a helpful "offline-ready" message -->
<meta name="description" content="DMX New Tab - Works offline too!">
<!-- Add favicon -->
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<div id="background-overlay"></div> <!-- Added overlay element -->
<div class="container">
<div class="main-window sharp" id="main-window">
<div class="tab-content active" id="tab1">
<!-- <h2>Quick Launch</h2> -->
<div class="shortcuts-container">
<div class="shortcuts-left">
<!-- <h3 class="section-title">My Shortcuts</h3> -->
<div id="shortcuts-grid"></div>
</div>
<div class="shortcuts-right">
<!-- <h3 class="section-title">Categories</h3> -->
<div id="categories-container"></div>
</div>
</div>
</div>
<div class="tab-content" id="tab2">
<div class="weather-news-container">
<div class="weather-section sharp">
<h3>Weather</h3>
<div id="weather-widget">
<div id="weather-loading" class="loading-indicator">
<i class="fas fa-spinner fa-spin"></i> Loading weather...
</div>
<div id="weather-error" class="error-message" style="display: none;">
No API key configured. Please add your API key in settings.
</div>
<div id="weather-content" style="display: none;">
<div class="weather-header">
<div class="weather-icon"></div>
<div class="weather-temp">--°</div>
</div>
<div class="weather-details">
<div class="weather-description">--</div>
<div class="weather-location">--</div>
<div class="weather-feels-like">Feels like: --°</div>
</div>
<div class="weather-metrics">
<div class="weather-metric">
<i class="fas fa-wind"></i>
<span id="weather-wind">-- mph</span>
</div>
<div class="weather-metric">
<i class="fas fa-tint"></i>
<span id="weather-humidity">--%</span>
</div>
</div>
</div>
</div>
</div>
<div class="news-section sharp">
<h3>Feeds</h3>
<div id="rss-container">
<div id="rss-loading" class="loading-indicator">
<i class="fas fa-spinner fa-spin"></i> Loading feeds...
</div>
<div id="rss-error" class="error-message" style="display: none;">
No feeds configured. Click the settings button to add feeds.
</div>
<div id="rss-content" class="news-articles-container">
<!-- Feed articles will be inserted here by JavaScript -->
</div>
</div>
</div>
</div>
</div>
<div class="tab-content" id="tab3">
<!-- <h2>Notes & Todo</h2> -->
<div class="tab3-container">
<div class="todo-section sharp">
<h3>Todo List</h3>
<div class="todo-input-container">
<input type="text" id="todo-input" placeholder="Add a new task...">
<button id="add-todo-btn" class="btn">Add</button>
</div>
<ul id="todo-list"></ul>
</div>
<div class="notes-section sharp">
<h3>Notes</h3>
<textarea id="notes-area" placeholder="Write your notes here..."></textarea>
</div>
</div>
</div>
</div>
<div class="status-bar">
<ul class="tab-icons">
<li class="tab-icon active" data-tab="tab1"><span class="roman-numeral">I</span></li>
<li class="tab-icon" data-tab="tab2"><span class="roman-numeral">II</span></li>
<li class="tab-icon" data-tab="tab3"><span class="roman-numeral">III</span></li>
</ul>
</div>
</div>
<div class="shortcut-form" id="shortcut-form">
<h3>Add New Shortcut</h3>
<div class="form-group">
<label for="shortcut-category">Category (optional):</label>
<select id="shortcut-category">
<option value="">None</option>
<!-- Categories will be populated here -->
</select>
</div>
<div class="form-group">
<input type="text" id="shortcut-name" placeholder="Name" maxlength="15">
</div>
<div class="form-group">
<input type="url" id="shortcut-url" placeholder="URL (https://example.com)">
</div>
<!-- Delete option will be inserted here dynamically when editing -->
<div class="form-buttons">
<button id="save-shortcut" class="btn">Save</button>
<button id="cancel-shortcut" class="btn btn-cancel">Cancel</button>
</div>
</div>
<div class="add-shortcut-btn" id="add-shortcut-toggle">
<i class="fas fa-plus"></i>
<div class="add-dropdown">
<div class="add-option" id="add-website-option">
<i class="fas fa-link"></i> Add Website
<span class="option-counter" id="shortcuts-counter">0/30</span>
</div>
<div class="add-option" id="add-category-option">
<i class="fas fa-folder-plus"></i> Add Category
<span class="option-counter" id="categories-counter">0/10</span>
</div>
<!-- Improved edit mode toggle button with better accessibility -->
<button class="add-option" id="toggle-edit-mode" tabindex="0" role="button">
<i class="fas fa-edit"></i> <span id="edit-mode-label">Enable Editing</span>
</button>
</div>
</div>
<div class="category-form" id="category-form">
<h3>Add New Category</h3>
<div class="form-group">
<input type="text" id="category-name" placeholder="Category Name" maxlength="20">
</div>
<!-- Delete option will be inserted here dynamically when editing -->
<div class="form-buttons">
<button id="save-category" class="btn">Save</button>
<button id="cancel-category" class="btn btn-cancel">Cancel</button>
</div>
</div>
<!-- New settings button for Tab3 -->
<div class="settings-btn" id="settings-toggle">
<i class="fas fa-cog"></i>
</div>
<!-- Add new Tab1 settings button -->
<div class="tab1-settings-btn" id="tab1-settings-toggle">
<i class="fas fa-cog"></i>
</div>
<!-- New export/import form -->
<div class="settings-form" id="settings-form">
<h3>Export/Import Settings</h3>
<div class="settings-options">
<button id="export-btn" class="btn settings-btn-action">Export Settings</button>
<div class="form-group">
<label for="import-file">Import Settings:</label>
<input type="file" id="import-file" accept=".json">
</div>
<button id="import-btn" class="btn settings-btn-action">Import</button>
</div>
<!-- Add notification element outside of settings-options -->
<div id="import-notification" class="import-notification"></div>
<!-- Add reset configuration section -->
<div class="reset-section">
<h4>Reset Configuration</h4>
<p class="reset-description">This will delete all shortcuts, notes, todos, and settings. This action cannot be undone.</p>
<button id="reset-config-btn" class="btn btn-danger">Reset All Data</button>
</div>
<div class="form-buttons">
<button id="close-settings" class="btn btn-cancel">Close</button>
</div>
</div>
<!-- Add Tab1 settings form -->
<div class="settings-form" id="tab1-settings-form">
<h3>Tab Settings</h3>
<div class="tab-visibility-settings">
<div class="setting-item">
<label for="tab2-toggle" class="toggle-label">
<span>Show Weather & Feeds Tab</span>
<div class="toggle-switch">
<input type="checkbox" id="tab2-toggle" checked>
<span class="toggle-slider"></span>
</div>
</label>
</div>
<div class="setting-item">
<label for="tab3-toggle" class="toggle-label">
<span>Show Notes & Todo Tab</span>
<div class="toggle-switch">
<input type="checkbox" id="tab3-toggle" checked>
<span class="toggle-slider"></span>
</div>
</label>
</div>
<div class="setting-item">
<label for="new-tab-toggle" class="toggle-label">
<span>Open Shortcuts in New Tab</span>
<div class="toggle-switch">
<input type="checkbox" id="new-tab-toggle" checked>
<span class="toggle-slider"></span>
</div>
</label>
</div>
</div>
<div class="form-buttons">
<button id="save-tab1-settings" class="btn settings-btn-action">Save</button>
<button id="close-tab1-settings" class="btn btn-cancel">Close</button>
</div>
</div>
<!-- Add new tab2 settings button -->
<div class="tab2-settings-btn" id="tab2-settings-toggle">
<i class="fas fa-cog"></i>
</div>
<!-- New RSS and weather settings form -->
<div class="settings-form" id="tab2-settings-form">
<h3>Weather & Feeds Settings</h3>
<div class="settings-tabs">
<div class="settings-tab active" data-tab="weather-settings">Weather</div>
<div class="settings-tab" data-tab="rss-settings">Feeds</div>
</div>
<div class="settings-panel active" id="weather-settings">
<div class="form-group">
<label for="weather-api-key">WeatherAPI.com API Key:</label>
<input type="text" id="weather-api-key" placeholder="Enter your API key">
<div class="api-help-text">Get a free API key from <a href="https://www.weatherapi.com/signup.aspx" target="_blank" rel="noopener noreferrer">WeatherAPI.com</a></div>
</div>
<div class="form-group">
<label>Location:</label>
<div class="location-options">
<button id="use-geolocation" class="btn mini-btn">Use My Location</button>
<div class="location-separator">- or -</div>
<input type="text" id="weather-city" placeholder="Enter city name">
</div>
</div>
<div class="form-group">
<label>Units:</label>
<div class="unit-selector">
<label>
<input type="radio" name="temp-units" value="imperial" checked>
<span>Fahrenheit</span>
</label>
<label>
<input type="radio" name="temp-units" value="metric">
<span>Celsius</span>
</label>
</div>
</div>
</div>
<div class="settings-panel" id="rss-settings">
<div class="rss-feeds-list">
<div id="rss-feeds-container">
<!-- Feeds will be listed here -->
</div>
<button id="add-feed-btn" class="btn mini-btn add-btn">
<i class="fas fa-plus"></i> Add New Feed
</button>
</div>
<div class="add-feed-form" style="display: none;">
<div class="form-group">
<label for="feed-name">Feed Name:</label>
<input type="text" id="feed-name" placeholder="e.g. Tech News">
</div>
<div class="form-group">
<label for="feed-url">Feed URL:</label>
<input type="url" id="feed-url" placeholder="https://example.com/feed">
<div class="api-help-text">
Supports RSS, Atom, JSON Feed, and more. Examples:
<ul class="format-list">
<li><i class="fas fa-check"></i> Standard RSS and Atom feeds</li>
<li><i class="fas fa-check"></i> RSSBridge feeds (Twitter, Reddit, etc.)</li>
<li><i class="fas fa-check"></i> Google News RSS (e.g., <code>https://news.google.com/rss/search?q=site%3Areuters.com</code>)</li>
</ul>
</div>
</div>
<button id="save-feed-btn" class="btn mini-btn">Save Feed</button>
<button id="cancel-feed-btn" class="btn mini-btn cancel-btn">Cancel</button>
</div>
</div>
<div class="form-buttons">
<button id="save-tab2-settings" class="btn settings-btn-action">Save Settings</button>
<button id="close-tab2-settings" class="btn btn-cancel">Close</button>
</div>
</div>
<!-- New background config button -->
<div class="bg-config-btn" id="bg-config-toggle">
<i class="fas fa-image"></i>
</div>
<!-- New background selector form -->
<div class="settings-form" id="background-form">
<h3>Background Settings</h3>
<div class="bg-options">
<div class="bg-selector-heading">Choose Background:</div>
<div class="bg-selector">
<div class="bg-option" data-bg="img/Wallpaper-1.jpg">
<img src="img/Wallpaper-1.jpg" alt="Background 1">
<span class="bg-check"><i class="fas fa-check"></i></span>
</div>
<div class="bg-option" data-bg="img/Wallpaper-2.jpg">
<img src="img/Wallpaper-2.jpg" alt="Background 2">
<span class="bg-check"><i class="fas fa-check"></i></span>
</div>
<div class="bg-option" data-bg="img/Wallpaper-3.jpg">
<img src="img/Wallpaper-3.jpg" alt="Background 3">
<span class="bg-check"><i class="fas fa-check"></i></span>
</div>
<div class="bg-option" data-bg="img/Wallpaper-4.jpg">
<img src="img/Wallpaper-4.jpg" alt="Background 4">
<span class="bg-check"><i class="fas fa-check"></i></span>
</div>
</div>
<div class="custom-bg-section">
<div class="form-group">
<label for="custom-bg-url">Custom Background URL:</label>
<input type="url" id="custom-bg-url" placeholder="https://example.com/image.jpg">
</div>
<button id="apply-custom-bg" class="btn mini-btn">Apply Custom Background</button>
<!-- Updated Custom Color Section -->
<div class="form-group" style="margin-top: 15px;">
<label for="custom-bg-color">Background Color / Overlay:</label>
<div style="display: flex; align-items: center; gap: 10px; margin-bottom: 10px;">
<input type="color" id="custom-bg-color" value="#1a1b26">
<button id="apply-custom-color" class="btn mini-btn">Apply Color/Overlay</button>
</div>
<div class="api-help-text">Sets solid background color OR a transparent overlay if background is an image.</div>
</div>
<!-- Added Opacity Slider for Overlay -->
<div class="form-group overlay-opacity-section">
<label for="custom-color-opacity-slider">Overlay Opacity: <span id="custom-color-opacity-value">50%</span></label>
<!-- Added opacity-slider class -->
<input type="range" id="custom-color-opacity-slider" min="0" max="100" value="0" class="opacity-slider">
</div>
</div>
<!-- New Window Style Adjustments Section -->
<div class="window-style-section" style="margin-top: 15px; padding-top: 15px; border-top: 1px solid #414868;">
<h4 class="form-group" >Window Style</h4>
<!-- Window Background Color/Opacity -->
<div class="window-background-section">
<h4>Window Background</h4>
<!-- Group color input and apply button -->
<div class="form-group form-group-inline">
<!-- <label for="window-bg-color">Color:</label> -->
<input type="color" id="window-bg-color" value="#16161e">
<button id="apply-window-bg" class="btn mini-btn">Apply</button> <!-- Changed text and removed width style -->
</div>
<!-- Opacity slider in its own group -->
<div class="form-group">
<label for="window-bg-opacity-slider">Opacity: <span id="window-bg-opacity-value">10%</span></label>
<input type="range" id="window-bg-opacity-slider" min="0" max="100" value="10" class="opacity-slider">
</div>
<p class="setting-description">Adjusts the color and transparency of the main window background layer (over the blur).</p> <!-- Added description -->
</div>
<!-- New blur adjustment section -->
<div class="blur-adjustment-section">
<h4>Window Blur</h4>
<div class="form-group">
<label for="blur-slider">Blur Amount: <span id="blur-value">10px</span></label>
<input type="range" id="blur-slider" min="0" max="50" value="10" class="blur-slider">
<!-- Renamed ID and updated text -->
</div>
</div>
<!-- Disable Window Shadow Setting -->
<div class="setting-item" style="margin-top: 10px;">
<label for="disable-shadow-toggle" class="toggle-label">
<span>Disable Window Shadow</span>
<div class="toggle-switch">
<input type="checkbox" id="disable-shadow-toggle">
<span class="toggle-slider"></span>
</div>
</label>
</div>
</div>
<!-- New Sharp Borders Setting -->
<div class="sharp-borders-section" style="margin-top: 15px; padding-top: 15px; border-top: 1px solid #414868;">
<div class="setting-item">
<label for="sharp-borders-toggle" class="toggle-label">
<span>Enable Sharp Borders (No Rounded Corners)</span>
<div class="toggle-switch">
<input type="checkbox" id="sharp-borders-toggle">
<span class="toggle-slider"></span>
</div>
</label>
</div>
</div>
<button id="resetBackgroundSettingsBtn" class="btn mini-btn" style="margin-top: 10px;">Reset Window Styles</button>
</div>
<div class="form-buttons">
<button id="close-bg-settings" class="btn btn-cancel">Close</button>
</div>
</div>
<!-- Add an overlay div for background color overlay -->
<div id="background-overlay" style="position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; transition: background-color 0.3s ease, opacity 0.3s ease;"></div>
<script src="script.js"></script>
<script src="offline-manager.js"></script>
<noscript>
<div style="background-color: rgba(26, 27, 38, 0.9); padding: 20px; color: #f7768e; text-align: center; position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999;">
<h2>JavaScript Required</h2>
<p>This application requires JavaScript to be enabled in your browser.</p>
</div>
</noscript>
</body>
</html>