-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathpopup.html
More file actions
97 lines (89 loc) · 3.63 KB
/
Copy pathpopup.html
File metadata and controls
97 lines (89 loc) · 3.63 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Format Converter</title>
<link rel="stylesheet" href="popup.css">
</head>
<body>
<div class="container">
<!-- Header -->
<header class="header">
<h1 class="header__title">Image Format Converter</h1>
<button id="themeToggle" class="theme-toggle" aria-label="Toggle dark mode">
<svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<circle cx="12" cy="12" r="5"/>
<line x1="12" y1="1" x2="12" y2="3"/>
<line x1="12" y1="21" x2="12" y2="23"/>
<line x1="4.22" y1="4.22" x2="5.64" y2="5.64"/>
<line x1="18.36" y1="18.36" x2="19.78" y2="19.78"/>
<line x1="1" y1="12" x2="3" y2="12"/>
<line x1="21" y1="12" x2="23" y2="12"/>
<line x1="4.22" y1="19.78" x2="5.64" y2="18.36"/>
<line x1="18.36" y1="5.64" x2="19.78" y2="4.22"/>
</svg>
</button>
</header>
<!-- Drop Zone -->
<div id="dropZone" class="drop-zone">
<svg class="drop-zone__icon" width="48" height="48" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<rect x="3" y="3" width="18" height="18" rx="2" ry="2"/>
<circle cx="8.5" cy="8.5" r="1.5"/>
<polyline points="21 15 16 10 5 21"/>
</svg>
<p class="drop-zone__text">Drop images here or click to browse</p>
<p class="drop-zone__hint">PNG, JPEG, WEBP, GIF, BMP, AVIF • Max 10 files</p>
<input type="file" id="fileInput" accept="image/*" multiple hidden>
</div>
<!-- Settings -->
<div class="settings">
<div class="settings__row">
<label for="formatSelect" class="settings__label">Convert to:</label>
<select id="formatSelect" class="settings__select">
<option value="png">PNG</option>
<option value="jpeg">JPEG</option>
<option value="webp" selected>WEBP</option>
</select>
</div>
<div id="qualityControl" class="settings__row" style="display: none;">
<label for="qualitySlider" class="settings__label">
Quality: <span id="qualityValue">90</span>%
</label>
<input type="range" id="qualitySlider" class="settings__slider" min="1" max="100" value="90">
</div>
</div>
<!-- Files List -->
<div id="filesList" class="files-list" style="display: none;">
<!-- File items will be inserted here dynamically -->
</div>
<!-- Batch Actions -->
<div id="batchActions" class="batch-actions" style="display: none;">
<button id="downloadAllBtn" class="btn btn--primary">
<svg width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2">
<path d="M21 15v4a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2v-4"/>
<polyline points="7 10 12 15 17 10"/>
<line x1="12" y1="15" x2="12" y2="3"/>
</svg>
Download All as ZIP
</button>
<button id="clearAllBtn" class="btn btn--secondary">Clear All</button>
</div>
<!-- Status Bar -->
<div id="statusBar" class="status-bar" style="display: none;">
<span id="statusText"></span>
</div>
<!-- Footer -->
<footer class="footer">
<div class="footer__info">
<span class="footer__name">Image Format Converter</span>
<span class="footer__version">v1.0.0</span>
</div>
<a href="https://buymeacoffee.com/ejcenteno" target="_blank" class="footer__link">
☕ Buy me a coffee
</a>
</footer>
</div>
<script src="popup.js"></script>
</body>
</html>