-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
132 lines (119 loc) · 5.3 KB
/
index.html
File metadata and controls
132 lines (119 loc) · 5.3 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
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>ImageStyler</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<main class="container">
<!-- Header Section -->
<header class="header">
<h1>✨ ImageStyler</h1>
<div class="header-controls">
<div class="mode-selector">
<label for="modeSelect" class="label-title">Mode</label>
<select id="modeSelect" class="select-input">
<option value="ascii">📝 ASCII Art</option>
<option value="paint">🖌️ Paint Style</option>
</select>
</div>
<div class="header-buttons">
<button id="convertBtn" class="btn primary">✨ Convert</button>
<button id="downloadBtn" class="btn" disabled>⬇️ Download</button>
<button id="undoBtn" class="btn" disabled>↶ Undo</button>
<button id="resetBtn" class="btn">🔄 Reset</button>
</div>
</div>
</header>
<!-- Main Content -->
<div class="main-content">
<!-- Preview Section (Center) -->
<section class="preview">
<div class="preview-shell">
<canvas id="outputCanvas" width="800" height="600"></canvas>
</div>
</section>
<!-- Settings/Controls Panel (Sidebar) -->
<aside class="sidebar">
<!-- File Upload Section -->
<div id="drop-area" class="drop-area">
<p>📁 Drop image here</p>
<label class="btn-upload">
<input id="fileElem" type="file" accept="image/*" />
Choose File
</label>
</div>
<!-- Settings Tabs -->
<div class="settings-tabs">
<div class="tab-buttons">
<button class="tab-btn active" data-tab="ascii">📝 ASCII</button>
<button class="tab-btn" data-tab="paint">🎨 Paint</button>
</div>
<!-- ASCII Settings Tab -->
<div id="ascii-tab" class="tab-content active">
<div class="control-block">
<label for="fontSize" class="label-title">Font Size</label>
<input id="fontSize" type="range" min="6" max="48" value="12" class="range-input">
<span class="range-value" id="fontSizeValue">12</span>
<label for="asciiCols" class="label-title">Width (chars)</label>
<input id="asciiCols" type="number" min="20" max="400" value="120" class="number-input">
<label class="label-title">ASCII Output</label>
<div class="ascii-actions">
<button id="previewAsciiBtn" class="btn">🔍 Preview</button>
<button id="copyAsciiBtn" class="btn">📋 Copy</button>
</div>
</div>
</div>
<!-- Paint Settings Tab -->
<div id="paint-tab" class="tab-content">
<div class="control-block">
<label class="label-title">Effects</label>
<div class="paint-mix">
<label><input type="checkbox" id="stylePixel" checked> 🔲 Pixel</label>
<label><input type="checkbox" id="styleBrush" checked> 🖌️ Brush</label>
<label><input type="checkbox" id="styleGallery"> 🏛️ Gallery</label>
<label><input type="checkbox" id="styleImpression"> 🌅 Impression</label>
<label><input type="checkbox" id="styleWatercolor"> 💧 Watercolor</label>
</div>
<label for="pixelSize" class="label-title">Size</label>
<input id="pixelSize" type="range" min="2" max="40" value="8" class="range-input">
<span class="range-value" id="pixelSizeValue">8</span>
<label for="brushStrength" class="label-title">Strength</label>
<input id="brushStrength" type="range" min="0" max="100" value="70" class="range-input">
<label for="textureStrength" class="label-title">Texture</label>
<input id="textureStrength" type="range" min="0" max="100" value="40" class="range-input">
</div>
</div>
</div>
</aside>
</div>
</main>
<!-- Download Modal -->
<div id="downloadModal" class="modal hidden" role="dialog" aria-modal="true" aria-labelledby="downloadModalTitle">
<div class="modal-content">
<h2 id="downloadModalTitle">Download Image</h2>
<label class="modal-label">File name
<input id="downloadName" type="text" value="converted.png" aria-label="File name">
</label>
<div class="modal-actions">
<button id="downloadNowBtn" class="btn primary">Download Now</button>
<button id="downloadCancelBtn" class="btn">Cancel</button>
</div>
</div>
</div>
<!-- ASCII Preview Modal -->
<div id="asciiPreviewModal" class="modal hidden" role="dialog" aria-modal="true" aria-labelledby="asciiPreviewTitle">
<div class="modal-content">
<h2 id="asciiPreviewTitle">ASCII Preview</h2>
<pre id="asciiPreviewText" class="ascii-preview" tabindex="0" aria-label="ASCII preview"></pre>
<div class="modal-actions">
<button id="asciiPreviewCopyBtn" class="btn">📋 Copy</button>
<button id="asciiPreviewCloseBtn" class="btn">Close</button>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>