-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
86 lines (78 loc) · 3.6 KB
/
Copy pathindex.html
File metadata and controls
86 lines (78 loc) · 3.6 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Image Overlay Tool</title>
<link rel="stylesheet" href="src/styles.css">
<!-- Fabric.js CDN -->
<script src="https://cdn.jsdelivr.net/npm/fabric@5.3.0/dist/fabric.min.js"></script>
</head>
<body>
<div class="app-container">
<header>
<h1>Image Overlay Tool</h1>
<p>Upload a background image, add overlays, and export for print.</p>
</header>
<div class="workspace">
<aside class="controls">
<div class="control-group">
<h3>1. Upload Images</h3>
<label class="file-upload">
<span>Upload Background</span>
<input type="file" id="bgInput" accept="image/*">
</label>
<label class="file-upload">
<span>Add Overlay (SVG/PNG)</span>
<input type="file" id="overlayInput" accept="image/svg+xml, image/png, image/jpeg">
</label>
</div>
<div class="control-group" id="overlayControls" style="opacity: 0.5; pointer-events: none;">
<h3>2. Adjust Overlay</h3>
<label for="overlaySize">Size (Scale)</label>
<input type="range" id="overlaySize" min="0.1" max="2.0" step="0.05" value="0.5">
<div class="checkbox-group">
<input type="checkbox" id="whitePadding">
<label for="whitePadding">Add White Padding (Border)</label>
</div>
<div class="padding-size-control" style="display:none; margin-top: 5px;">
<label for="paddingSize">Padding Size (px)</label>
<input type="number" id="paddingSize" value="10" min="0" step="1" style="width: 60px;">
</div>
</div>
<div class="control-group">
<h3>3. Export</h3>
<div class="export-options">
<label for="exportDpi">Export Quality (Multiplier)</label>
<select id="exportDpi">
<option value="1">Screen (1x)</option>
<option value="2">High (2x)</option>
<option value="4" selected>Print (4x)</option>
</select>
</div>
<button id="downloadBtn" class="primary-btn">Download PNG</button>
</div>
<div class="instructions">
<h4>Instructions</h4>
<ul>
<li>Upload background image first.</li>
<li>Add overlay images (SVG recommended for best quality).</li>
<li>Drag to position the overlay.</li>
<li>Use controls to resize or add padding.</li>
<li>Select "Print (4x)" for high-res export.</li>
</ul>
</div>
</aside>
<main class="canvas-area">
<div class="canvas-wrapper">
<canvas id="c"></canvas>
</div>
<div class="canvas-info">
<span id="canvasDimensions">No canvas loaded</span>
</div>
</main>
</div>
</div>
<script src="src/app.js"></script>
</body>
</html>