-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnewtab.html
More file actions
301 lines (283 loc) · 13.1 KB
/
newtab.html
File metadata and controls
301 lines (283 loc) · 13.1 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>InspoTab</title>
<link rel="stylesheet" href="newtab.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
</head>
<body class="dark-theme">
<div id="background" class="background-loading"></div>
<button id="hamburger" aria-label="Open settings">☰</button>
<div class="center-container">
<div id="greeting"></div>
<div id="quote-container">
<div class="quote-block">
<div id="quoteSkeleton" class="quote-skeleton" aria-hidden="true">
<div class="quote-skeleton-line"></div>
<div class="quote-skeleton-line quote-skeleton-line--short"></div>
</div>
<div id="quote" aria-live="polite" aria-busy="true"></div>
</div>
<button id="copyQuote" aria-label="Copy quote" title="Copy quote to clipboard">
<i class="fa-solid fa-copy"></i>
</button>
</div>
</div>
<!-- Settings Backdrop -->
<div id="settingsBackdrop" class="settings-backdrop"></div>
<div id="settingsPanel" class="settings-panel">
<div class="settings-header">
<span>Settings</span>
<button id="closeSettings" aria-label="Close settings">×</button>
</div>
<div class="settings-content">
<!-- Personalization Section -->
<div class="settings-section">
<div class="section-header" data-section="personalization">
<i class="fa-solid fa-user"></i>
<span>Personalization</span>
<i class="fa-solid fa-chevron-down section-icon"></i>
</div>
<div class="section-content" id="personalization-content">
<label for="nameInput">Your Name:</label>
<input type="text" id="nameInput" placeholder="Enter your name..." />
<label for="fontSelect">Font Style:</label>
<select id="fontSelect">
<option value="sans-serif">Sans-serif</option>
<option value="serif">Serif</option>
<option value="handwriting">Handwriting</option>
<option value="dyslexic">OpenDyslexic</option>
</select>
</div>
</div>
<!-- Preferences Section -->
<div class="settings-section">
<div class="section-header" data-section="preferences">
<i class="fa-solid fa-sliders"></i>
<span>Preferences</span>
<i class="fa-solid fa-chevron-down section-icon"></i>
</div>
<div class="section-content" id="preferences-content">
<div class="pref-row">
<div class="pref-row-text">
<span class="pref-label" id="reducedMotionLabel">Reduce Motion</span>
<button type="button" id="reduceMotionHelpBtn" class="pref-help-trigger" aria-label="About Reduce Motion" title="About Reduce Motion">
<span aria-hidden="true">?</span>
</button>
</div>
<label class="toggle-switch" for="reducedMotionToggle">
<input type="checkbox" id="reducedMotionToggle" role="switch" aria-labelledby="reducedMotionLabel" />
<span class="toggle-track" aria-hidden="true">
<span class="toggle-thumb"></span>
</span>
</label>
</div>
<div class="pref-row pref-row-follow">
<div class="pref-row-text">
<span class="pref-label" id="lightModeLabel">Light mode</span>
</div>
<label class="toggle-switch" for="lightModeToggle">
<input type="checkbox" id="lightModeToggle" role="switch" aria-labelledby="lightModeLabel" />
<span class="toggle-track" aria-hidden="true">
<span class="toggle-thumb"></span>
</span>
</label>
</div>
<div class="pref-row pref-row-follow">
<div class="pref-row-text">
<span class="pref-label" id="homeTextDarkLabel">Dark text</span>
<button type="button" id="homeTextHelpBtn" class="pref-help-trigger" aria-label="About home page text color" title="About home page text color">
<span aria-hidden="true">?</span>
</button>
</div>
<label class="toggle-switch" for="homeTextDarkToggle">
<input type="checkbox" id="homeTextDarkToggle" role="switch" aria-labelledby="homeTextDarkLabel" />
<span class="toggle-track" aria-hidden="true">
<span class="toggle-thumb"></span>
</span>
</label>
</div>
</div>
</div>
<!-- Background Section -->
<div class="settings-section">
<div class="section-header" data-section="background">
<i class="fa-solid fa-image"></i>
<span>Background</span>
<i class="fa-solid fa-chevron-down section-icon"></i>
</div>
<div class="section-content" id="background-content">
<div class="presets-subsection">
<label for="openPresetsBtn">Presets</label>
<button type="button" id="openPresetsBtn">Browse backgrounds</button>
</div>
<label>Custom Background:</label>
<div class="background-button-group">
<div class="file-input-container">
<input type="file" id="customBackground" accept="image/*" />
<div class="file-input-button" id="fileInputButton">Choose File</div>
</div>
</div>
<button id="removeCustomBg">Remove Custom Background</button>
</div>
</div>
<!-- Info Section -->
<div class="settings-section">
<div class="section-header" data-section="info">
<i class="fa-solid fa-info-circle"></i>
<span>Information</span>
<i class="fa-solid fa-chevron-down section-icon"></i>
</div>
<div class="section-content" id="info-content">
<div class="button-group button-group-info">
<button type="button" id="shortcutsBtn">Shortcuts</button>
<button type="button" id="aboutBtn">About</button>
<button type="button" id="changelogBtn">Changelog</button>
<button type="button" id="developerAboutBtn" title="About the developer">Developer</button>
</div>
</div>
</div>
</div>
<p class="settings-made-with">
Made with <span class="settings-made-with-heart" aria-label="love">❤️</span> by Samuel Snow
</p>
<div class="settings-action-buttons">
<button id="resetFont" class="reset-button">Reset to Default</button>
<button id="saveSettings">Save Settings</button>
</div>
</div>
<!-- About Modal Overlay -->
<div id="aboutOverlay" class="about-overlay">
<div class="about-modal">
<div class="about-header">
<h2>About InspoTab</h2>
<button id="closeAbout" aria-label="Close about">×</button>
</div>
<div id="aboutContent">
<!-- Content loaded from about.html -->
</div>
</div>
</div>
<!-- About the developer -->
<div id="developerAboutOverlay" class="about-overlay developer-about-overlay">
<div class="about-modal developer-about-modal">
<div class="about-header">
<h2>About the developer</h2>
<button type="button" id="closeDeveloperAbout" aria-label="Close">×</button>
</div>
<div class="about-content developer-about-body">
<div class="developer-about-avatar-wrap">
<img src="images/Samuel-Snow.png" alt="Samuel Snow" class="developer-about-avatar" width="120" height="120" />
</div>
<p class="developer-about-name">Samuel Snow</p>
<p>I’m based in San Francisco, I love tech—from Waymo’s autonomous vehicles to the craft of building software—and I love making mobile apps that help people in everyday life.</p>
<p>Here are a couple of projects I’ve shipped:</p>
<div class="link-grid developer-about-apps">
<a href="https://sfpopos.app/" target="_blank" rel="noopener noreferrer" class="link-card">
<img src="images/sf-popos-transparent-logo.png" alt="" class="link-card-app-icon" width="72" height="72" />
<span>SF POPOS — San Francisco’s privately owned public spaces</span>
</a>
<a href="https://nypops.app/" target="_blank" rel="noopener noreferrer" class="link-card">
<img src="images/transparent%20NY%20POPS%20Logo.png" alt="" class="link-card-app-icon" width="72" height="72" />
<span>NY POPS — New York’s hidden public spaces</span>
</a>
</div>
<p>I’m planning more cities and ideas—thanks for using InspoTab. :)</p>
</div>
</div>
</div>
<!-- Changelog Modal Overlay -->
<div id="changelogOverlay" class="about-overlay">
<div class="about-modal">
<div class="about-header">
<h2>Changelog</h2>
<button id="closeChangelog" aria-label="Close changelog">×</button>
</div>
<div id="changelogContent">
<!-- Content loaded from changelog.html -->
</div>
</div>
</div>
<!-- Keyboard shortcuts overlay -->
<div id="shortcutsOverlay" class="about-overlay shortcuts-overlay">
<div class="about-modal shortcuts-modal">
<div class="about-header">
<h2>Keyboard shortcuts</h2>
<button id="closeShortcuts" aria-label="Close shortcuts">×</button>
</div>
<div class="shortcuts-modal-body">
<ul class="shortcuts-list">
<li>
<span class="shortcut-keys"><kbd>?</kbd><span class="shortcut-or"> or </span><kbd>/</kbd></span>
<span class="shortcut-desc">Open settings</span>
</li>
<li>
<span class="shortcut-keys"><kbd>R</kbd></span>
<span class="shortcut-desc">Show a new random quote</span>
</li>
<li>
<span class="shortcut-keys"><kbd>N</kbd></span>
<span class="shortcut-desc">Open settings and focus your name</span>
</li>
<li>
<span class="shortcut-keys"><kbd>Esc</kbd></span>
<span class="shortcut-desc">Close an overlay or the settings panel</span>
</li>
</ul>
<p class="shortcuts-footnote">Shortcuts are ignored while you are typing in a text field, search box, or similar control.</p>
</div>
</div>
</div>
<!-- Reduce Motion explanation -->
<div id="reduceMotionInfoOverlay" class="about-overlay reduce-motion-info-overlay">
<div class="about-modal reduce-motion-info-modal">
<div class="about-header">
<h2>Reduce Motion</h2>
<button type="button" id="closeReduceMotionInfo" aria-label="Close">×</button>
</div>
<div class="reduce-motion-info-body">
<p>When Reduce Motion is on, InspoTab shortens or turns off animations—including the greeting typewriter effect—plus quote transitions, settings and overlays, and preset thumbnails.</p>
<p>This switch only controls InspoTab. Use <strong>Save settings</strong> so your choice applies on the next new tab.</p>
</div>
</div>
</div>
<!-- Home page text color info -->
<div id="homeTextInfoOverlay" class="about-overlay home-text-info-overlay">
<div class="about-modal home-text-info-modal">
<div class="about-header">
<h2>Home page text</h2>
<button type="button" id="closeHomeTextInfo" aria-label="Close">×</button>
</div>
<div class="reduce-motion-info-body home-text-info-body">
<p>This switch only affects the <strong>greeting</strong> (for example “Good evening”) and the <strong>quote</strong> on the new tab—not settings or other panels.</p>
<p><strong>On:</strong> dark letters, easier to read on bright wallpapers or with Light mode.</p>
<p><strong>Off:</strong> light letters, easier to read on dark wallpapers with Dark mode.</p>
<p>Use <strong>Save settings</strong> to keep your choice next time.</p>
</div>
</div>
</div>
<!-- Background presets overlay -->
<div id="presetsOverlay" class="about-overlay">
<div class="about-modal presets-modal">
<div class="about-header">
<h2>Background presets</h2>
<button id="closePresets" aria-label="Close presets">×</button>
</div>
<div id="presetsGrid" class="presets-grid"></div>
<p class="presets-save-hint">Tap Save settings in the panel to keep your choice.</p>
</div>
</div>
<!-- One-time 3.0 update notice -->
<div id="updateToast" class="update-toast" role="dialog" aria-labelledby="updateToastTitle" aria-hidden="true">
<button type="button" class="update-toast-close" id="updateToastClose" aria-label="Dismiss">×</button>
<p class="update-toast-title" id="updateToastTitle">InspoTab 3.0</p>
<p class="update-toast-msg">We’ve shipped a big update—new preferences, a better settings panel, and more. Check the changelog for everything that’s new.</p>
<button type="button" class="update-toast-cta" id="updateToastChangelog">View changelog</button>
</div>
<script src="storage.js"></script>
<script src="quotes.js"></script>
<script src="newtab.js"></script>
</body>
</html>