forked from webkul/myscale
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
121 lines (109 loc) · 4.14 KB
/
index.html
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
<!DOCTYPE html>
<html>
<head>
<title>svgScaler - Quick SVG Resizer</title>
<meta name="author" content="jeffylo94">
<meta name="description"
content="Small Lightweight Tool scratched in Pure JavaScript to Quickly Resize and Convert SVG to PNG">
<link rel="stylesheet" type="text/css" href="assets/style.css">
<link href="https://fonts.googleapis.com/css?family=Roboto|Roboto+Mono" rel="stylesheet">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta property="og:title" content="svgScaler - Quick SVG Resizer">
<meta property="og:description"
content="Small Lightweight Tool scratched in Pure JavaScript to Quickly Resize and Convert SVG to PNG">
<meta property="og:url" content="https://jeffylo94.github.io/myscale/">
</head>
<body>
<div class="flex-header">
<!--Logo-->
<h1>svgScaler</h1>
<h2>Quick SVG to PNG Resizer</h2>
<!--//Logo-->
</div>
<div class="flex-main">
<!--File Upload-->
<div class="btn-wrapper">
<div class="button-holder">
<div id="upload-button">
<label class="btn" for="file_upload">Upload SVG</label>
<input type="file" id="file_upload" accept=".svg">
</div>
</div>
</div>
<!--//File Upload-->
<div class="container" id="preview-container">
<!--Uploaded SVG Preview-->
<div class="preview" id="svg_preview"></div>
<!--//Uploaded SVG Details-->
<div class="details" id="svg_details">
<div class="detail_row_item">
<p class="detail_label">
W:
</p>
<p id="detail_width"></p>
</div>
<div class="detail_row_item">
<p>
×
</p>
</div>
<div class="detail_row_item">
<p class="detail_label">
H:
</p>
<p id="detail_height"></p>
</div>
</div>
<!--//Uploaded SVG Preview-->
</div>
<div class="container" id="svg_sizing_options">
<div class="btn-row">
<div class="button-holder">
<button type="button"
onclick="hideCustomResizeForm();showDownloadContainer();playGround('0.5x', 0.5);exportResizedSvg();">0.5x</button>
</div>
<div class="button-holder">
<button type="button"
onclick="hideCustomResizeForm();showDownloadContainer();playGround('1x', 1);exportResizedSvg();">1x</button>
</div>
<div class="button-holder">
<button type="button"
onclick="hideCustomResizeForm();showDownloadContainer();playGround('2x', 2);exportResizedSvg();">2x</button>
</div>
<div class="button-holder">
<button type="button"
onclick="hideCustomResizeForm();showDownloadContainer();playGround('3x', 3);exportResizedSvg();">3x</button>
</div>
<div class="button-holder">
<button type="button" onclick="hideDownloadContainer();showCustomResizeForm()">Custom</button>
</div>
</div>
</div>
<div class="container">
<form id="svg_form">
<input type="number" id="resize_width_value" required placeholder="Enter Width Value">
×
<input type="number" id="resize_height_value" required placeholder="Enter Height Value">
<button type="button" onclick="playGround('',1,true);showDownloadContainer();exportResizedSvg();">Generate</button>
</form>
</div>
<div class="download-wrapper" id="download_wrapper">
<a href="data:" id="data" download="svg" class="download-png" target="_blank">Download PNG</a>
</div>
<img src="" id="fromcanvas">
</div>
<div class="flex-footer">
<div class="credits">
<p class="promote">
<a href="https://github.com/jeffylo94/svgscale" target="_blank">View on GitHub</a>
</p>
<p>Crafted with <span>❤</span> at <a href="https://www.linkedin.com/in/peter-lo-6790016/"
target="_blank">Omnigarde Apps</a></p>
<p>Based on myScale from <a href="http://design.webkul.com" target="_blank">Webkul UXlab</a></p>
</div>
</div>
<!-- SCRIPTS -->
<script src="assets/svg_todataurl.js"></script>
<script src="assets/script.js"></script>
</body>
</html>