-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
320 lines (288 loc) · 14.7 KB
/
Copy pathindex.html
File metadata and controls
320 lines (288 loc) · 14.7 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
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>YT Thumbnail Maker</title>
<link rel="icon" href="favicon.png">
<script src="//html2canvas.hertzen.com/dist/html2canvas.min.js"></script>
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Aleo:ital@1&family=Poppins:wght@700&display=swap"
rel="stylesheet">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-QWTKZyjpPEjISv5WaRU9OFeRpok6YctnYmDr5pNlyT2bRjXh0JMhjY6hW+ALEwIH" crossorigin="anonymous">
<script src="scripts/jquery-3.7.1.min.js"></script>
<link rel="stylesheet" href="css/style2.css">
<link rel="stylesheet" href="css/custom.css">
<link rel="stylesheet" href="css/accessibility.css">
<!-- Meta tags for accessibility -->
<meta name="description" content="Create custom YouTube thumbnails with our easy-to-use thumbnail maker. Add text, choose backgrounds, and download high-quality JPG images.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="theme-color" content="#137AC5">
</head>
<body onload="checkLogoCookie()">
<!-- Skip navigation for accessibility -->
<a class="sr-only sr-only-focusable" href="#main-content">Skip to main content</a>
<div id="loadingOverlay" class="loading-overlay">
<div class="spinner-container">
<div class="spinner-border text-primary" role="status">
<span class="visually-hidden">Loading...</span>
</div>
<p class="mt-2">Loading backgrounds...</p>
</div>
</div>
<div id="saveOverlay" class="loading-overlay" style="display: none;">
<div class="spinner-container">
<div class="spinner-border text-primary" role="status">
<span class="visually-hidden">Generating thumbnail...</span>
</div>
<p class="mt-2">Preparing your thumbnail...</p>
</div>
</div>
<nav class="navbar bg-light fixed-top" role="navigation" aria-label="Main navigation">
<div class="container-fluid">
<a class="navbar-brand" href="#" aria-label="YT Thumbnail Maker Home">
<img src="assets/ytthmb.svg" style="width: 200px;" alt="YT Thumbnail Maker Logo">
</a>
<button class="navbar-toggler" type="button" data-bs-toggle="offcanvas"
data-bs-target="#offcanvasNavbar" aria-controls="offcanvasNavbar"
aria-expanded="false" aria-label="Open settings menu">
<img src="assets/settingsicon.svg" alt="" height="24" aria-hidden="true">
</button>
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasNavbar"
aria-labelledby="offcanvasNavbarLabel" role="dialog">
<div class="offcanvas-header">
<h2 class="offcanvas-title" id="offcanvasNavbarLabel">Settings and Help</h2>
<button type="button" class="btn-close" data-bs-dismiss="offcanvas"
aria-label="Close settings menu"></button>
</div>
<div class="offcanvas-body">
<nav aria-label="Settings and help">
<section aria-labelledby="settings-heading">
<h3 id="settings-heading">Settings</h3>
<fieldset class="border-0 p-0">
<legend class="sr-only">Application settings</legend>
<!-- Existing toggles -->
<div class="form-check form-switch ms-3">
<input class="form-check-input" type="checkbox" id="randomizeToggle" checked
aria-describedby="randomize-help">
<label class="form-check-label" for="randomizeToggle">Randomize Backgrounds</label>
<div id="randomize-help" class="form-text small">Shuffle background images in random order</div>
</div>
<!--background color toggle -->
<div class="form-check form-switch ms-3 mt-2">
<input class="form-check-input" type="checkbox" id="showGradientToggle" checked
aria-describedby="gradient-help">
<label class="form-check-label" for="showGradientToggle">Show Color Gradient</label>
<div id="gradient-help" class="form-text small">Apply color gradient overlay to background</div>
</div>
<div class="form-check ms-3 mt-2 d-flex align-items-center">
<input type="color" class="form-control-sm me-2" id="themeColorPicker" value="#137AC5"
aria-describedby="color-help">
<label class="form-label mb-0" for="themeColorPicker">Theme Color</label>
<div id="color-help" class="form-text small">Choose the primary color for gradients and overlays</div>
</div>
<!-- Logo Options -->
<div class="form-check form-switch ms-3 mt-2">
<input class="form-check-input" type="checkbox" id="mainLogoCheckbox" onclick="showLogo()" checked
aria-describedby="logo-help">
<label class="form-check-label" for="mainLogoCheckbox">Show Logo</label>
<div id="logo-help" class="form-text small">Toggle logo visibility on thumbnail</div>
</div>
</fieldset>
</section>
<section aria-labelledby="help-heading" class="mt-4">
<h3 id="help-heading">Help</h3>
<h4 class="h6 mt-3">Basic Steps:</h4>
<ol class="ps-4">
<li>Choose a background by clicking "Select Background" or upload your own image</li>
<li>Enter your main title and subtitle in the text fields</li>
<li>Click "Save Thumbnail" to download your 1920x1080 JPG thumbnail</li>
</ol>
<h4 class="h6 mt-3">Customization Options:</h4>
<ul class="ps-4">
<li><strong>Background Settings:</strong> Randomize background order, import from YouTube URL</li>
<li><strong>Gradient Overlay:</strong> Toggle color gradient and choose theme color for better text visibility</li>
<li><strong>Logo:</strong> Show or hide the logo in the bottom-left corner</li>
<li><strong>Reset:</strong> Restore all settings to defaults</li>
</ul>
<p class="small text-muted mt-2">
<strong>Tip:</strong> The gradient overlay helps make text more readable against busy backgrounds.
The thumbnail preview shows exactly how your final image will look.
</p>
</section>
</nav>
</div>
<div class="mt-5 p-4">
<h5>Reset Changes</h5>
<button class="btn btn-outline-danger" onclick="resetApplication();"><img src="assets/reset-danger.svg" alt=""
height="24"> Reset</button>
</div>
<div class="pb-4 px-4">
Powered by <a href="https://github.com/KevDoy/ytThumbnailMaker">YT Thumbnail Maker</a> v1.8
<br>
<small>© 2025 YT Thumbnail Maker. All Rights Reserved.</small>
</div>
</div>
</div>
</nav>
<!-- <div class="container d-none mt-4">
<div class="row">
<div style="padding: 0 15px">
<h3 class="mt-5">Incompatible</h3>
<br> This experience is not available on your browser or device.
<br>
<small>Please try again on a desktop or laptop computer.</small>
<br>
<br>
<small>The minimum screen/window width required is 1000px.</small>
</div>
</div>
</div> -->
<br>
<div>
<table style="margin: 0 auto; text-align: center;">
<tr>
<td>
</td>
<td>
<span style="font-family: 'Aleo', sans-serif; font-size: 16px; text-align: center;">
<br>
</span>
</td>
<td>
<span style="font-family: 'Aleo', sans-serif; font-size: 16px; text-align: center;">
<br>
</span>
</td>
</tr>
<!-- <tr>
<td>
<label for="imagecorrectcheck">Brighten Image?</label>
<input class="imagecorrectcheck" type="checkbox" name="imagecorrectcheck" value="1" />
</td>
</tr>-->
</table>
</div>
<!-- Background Modal -->
<div class="modal fade" id="backgroundSelect" tabindex="-1" aria-labelledby="backgroundSelectLabel"
aria-hidden="true" role="dialog">
<div class="modal-dialog modal-fullscreen-sm-down modal-lg">
<div class="modal-content">
<div class="modal-header">
<h2 class="modal-title" id="backgroundSelectLabel">Select Background</h2>
<button type="button" class="btn-close" data-bs-dismiss="modal"
aria-label="Close background selection"></button>
</div>
<div class="modal-body">
<div id="bgSelectorImages" role="grid" aria-label="Background image options">
<!-- Background images will be dynamically loaded here -->
</div>
</div>
</div>
</div>
</div>
<main id="main-content" role="main">
<div class="container-fluid">
<div class="row g-4">
<!-- Controls Column - will appear first on mobile -->
<div class="col-lg-4 col-xl-3 order-1 order-lg-2">
<div class="card">
<div class="card-body">
<h1 class="card-title mb-4">Create Your Thumbnail</h1>
<!-- Step 1: Background -->
<section class="step-section mb-4" aria-labelledby="step1-heading">
<h2 class="step-title" id="step1-heading">
<span class="badge bg-primary me-2" aria-hidden="true">1</span>
Choose Background
</h2>
<div class="d-grid gap-2">
<button class="btn btn-outline-primary" data-bs-toggle="modal"
data-bs-target="#backgroundSelect" aria-describedby="bg-help">
<img src="assets/image-blue.svg" alt="" height="24" aria-hidden="true">
Select Background
</button>
<div id="bg-help" class="sr-only">Opens background selection modal</div>
<input id="files" type="file" class="form-control" accept="image/*"
aria-describedby="file-help">
<div id="file-help" class="form-text">Upload your own background image</div>
<div class="input-group">
<input type="url" class="form-control" placeholder="YouTube URL"
id="ytURLImport" aria-describedby="url-help">
<button class="btn btn-outline-primary"
onclick="youtubeUrlParser(document.getElementById('ytURLImport').value)"
aria-describedby="url-help">
Import
</button>
</div>
<div id="url-help" class="form-text">Import background from YouTube video thumbnail</div>
</div>
</section>
<!-- Step 2: Text -->
<section class="step-section mb-4" aria-labelledby="step2-heading">
<h2 class="step-title" id="step2-heading">
<span class="badge bg-primary me-2" aria-hidden="true">2</span>
Add Text
</h2>
<div class="mb-3">
<label for="mainTitleSelect" class="form-label">Main Title</label>
<input id="mainTitleSelect" class="form-control" placeholder="Main Title"
oninput="replaceText()" aria-describedby="title-help" required>
<div id="title-help" class="form-text">Enter the main title for your thumbnail</div>
</div>
<div class="mb-3">
<label for="subTitleSelect" class="form-label">Subtitle</label>
<input id="subTitleSelect" class="form-control" placeholder="Subtitle"
oninput="replaceText()" aria-describedby="subtitle-help">
<div id="subtitle-help" class="form-text">Enter an optional subtitle</div>
</div>
</section>
<!-- Save Button -->
<div class="d-grid gap-2 mt-4">
<button class="btn btn-primary btn-lg" id="download-page-as-image"
aria-describedby="save-help">
<img src="assets/download-white.svg" alt="" height="24" aria-hidden="true">
Save Thumbnail
</button>
<div id="save-help" class="form-text">Download thumbnail as JPG image</div>
</div>
</div>
</div>
</div>
<!-- Preview Column - will appear first on small screens -->
<div class="col-lg-8 col-xl-9 order-2 order-lg-1">
<section id="previewarea" class="previewarea" aria-labelledby="preview-heading">
<h2 id="preview-heading" class="preview-header mb-3">
Preview
</h2>
<div class="preview-container">
<div id="content" class="smallscale" role="img" aria-label="Thumbnail preview">
<div id="afterthis"></div>
<div id="content-container"
style="background: radial-gradient(circle at left, rgba(19,122,197,0.5) 0%, rgba(255,255,255,0) 50%), url('background-default.jpg');">
<div class="content-text">
<span class="reptitle" id="reptitle">Main Title</span>
<br>
<span class="dashtitle" id="dashtitle">Subtitle</span>
</div>
</div>
<img src="logo.png" id="canvasLogo" class="bclogo-float" height="200">
<div class="grad-float"
style="width:1920px; height:1080px; background: radial-gradient(circle at left, rgba(22,80,137,0.6) 0%, rgba(0,0,0,0) 25%, rgba(0, 0, 0,0) 50%);">
</div>
</div>
</div>
</section>
</div>
</div>
</div>
</div>
</main>
<script src="scripts/script.js"></script>
<script src="https://cdn.jsdelivr.net/npm/js-cookie@3.0.5/dist/js.cookie.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"
integrity="sha384-YvpcrYf0tY3lHB60NNkmXc5s9fDVZLESaAA55NDzOxhy9GkcIdslK1eN7N6jIeHz"
crossorigin="anonymous"></script>
<script type="module" src="scripts/backgroundLoader.js"></script>
</body>
</html>