-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
153 lines (143 loc) · 7.66 KB
/
index.html
File metadata and controls
153 lines (143 loc) · 7.66 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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>SVG to VectorDrawable - Convert SVG to Android XML</title>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<div class="app-container">
<!-- Header -->
<header class="header">
<div class="container">
<div class="header-content">
<h1 class="app-title">SVG to VectorDrawable</h1>
<p class="app-subtitle">Convert SVG files to Android VectorDrawable XML format</p>
<button class="theme-toggle" id="themeToggle" aria-label="Toggle dark mode">
<span class="theme-icon">🌙</span>
</button>
</div>
</div>
</header>
<!-- Main Content -->
<main class="main-content">
<div class="container">
<!-- File Upload Area -->
<section class="upload-section">
<div class="upload-area" id="uploadArea">
<div class="upload-content">
<div class="upload-icon">📁</div>
<h3>Drop SVG files here or click to browse</h3>
<p>Support for multiple files • Max 5MB per file</p>
<button class="btn btn--primary" id="browseBtn">Choose Files</button>
</div>
<input type="file" id="fileInput" accept=".svg,image/svg+xml" multiple hidden>
</div>
</section>
<!-- Processing Area -->
<section class="processing-section hidden" id="processingSection">
<div class="processing-grid">
<!-- File List -->
<div class="file-list-panel">
<h3>Files</h3>
<div class="file-list" id="fileList"></div>
</div>
<!-- Preview Panel -->
<div class="preview-panel">
<h3>Preview</h3>
<div class="preview-container">
<div class="preview-item">
<h4>Original SVG</h4>
<div class="preview-content" id="originalPreview">
<div class="preview-placeholder">Select a file to preview</div>
</div>
</div>
<div class="preview-item">
<h4>VectorDrawable</h4>
<div class="preview-content" id="vectorPreview">
<div class="preview-placeholder">Conversion result will appear here</div>
</div>
</div>
</div>
<div class="preview-controls">
<button class="btn btn--secondary" id="zoomIn">🔍+</button>
<button class="btn btn--secondary" id="zoomOut">🔍-</button>
<button class="btn btn--secondary" id="toggleGrid">⚏</button>
</div>
</div>
<!-- Options Panel -->
<div class="options-panel">
<h3>Options</h3>
<div class="form-group">
<label class="form-label">Size Preset</label>
<select class="form-control" id="sizePreset">
<option value="custom">Custom</option>
<option value="24">Small (24dp)</option>
<option value="32">Medium (32dp)</option>
<option value="48">Large (48dp)</option>
<option value="64">Extra Large (64dp)</option>
</select>
</div>
<div class="size-inputs">
<div class="form-group">
<label class="form-label">Width (dp)</label>
<input type="number" class="form-control" id="widthInput" value="24">
</div>
<div class="form-group">
<label class="form-label">Height (dp)</label>
<input type="number" class="form-control" id="heightInput" value="24">
</div>
</div>
<div class="form-group">
<label class="form-label">Default Fill Color</label>
<div class="color-picker-container">
<input type="color" class="color-picker" id="fillColorPicker" value="#000000">
<div class="color-presets" id="colorPresets"></div>
</div>
</div>
<div class="form-group">
<label class="form-label">
<input type="checkbox" id="formatXml" checked> Format XML
</label>
</div>
</div>
<!-- Output Panel -->
<div class="output-panel">
<div class="output-header">
<h3>Output</h3>
<div class="output-stats" id="outputStats"></div>
</div>
<textarea class="xml-output" id="xmlOutput" readonly placeholder="XML output will appear here after conversion"></textarea>
<div class="output-actions">
<button class="btn btn--primary" id="copyBtn" disabled>📋 Copy XML</button>
<button class="btn btn--primary" id="downloadBtn" disabled>📥 Download</button>
<button class="btn btn--secondary" id="downloadAllBtn" disabled>📦 Download All</button>
</div>
</div>
</div>
</section>
<!-- Recent Files -->
<section class="recent-section" id="recentSection">
<h3>Recent Files</h3>
<div class="recent-files" id="recentFiles"></div>
</section>
</div>
</main>
<!-- Footer -->
<footer class="footer">
<div class="container">
<p>🔒 All processing happens locally in your browser - no data is uploaded to any server</p>
</div>
</footer>
<!-- Notifications -->
<div class="notification-container" id="notifications"></div>
<!-- Loading Overlay -->
<div class="loading-overlay hidden" id="loadingOverlay">
<div class="loading-spinner"></div>
<p>Processing files...</p>
</div>
</div>
<script src="app.js"></script>
</body>
</html>