/
index.html
185 lines (181 loc) · 7.11 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
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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>SVGOMG - SVGO's Missing GUI</title>
<meta name="theme-color" content="#303f9f">
<meta name="viewport" content="width=device-width, initial-scale=1">
<style>{{headCSS|safe}}</style>
<script>
if ((!location.port || location.port === '80') && location.protocol !== 'https:') {
location.protocol = 'https:';
}
window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)};ga.l=+new Date;
ga('create', 'UA-58850134-1', 'auto');
ga('send', 'pageview');
window.svgomgVersion = "{{changelog[0].version}}";
// Delay analytics until after the page has loaded, to avoid extending
// the browser spinner, and allow higher priority stuff through.
addEventListener('load', function() {
var script = document.createElement('script');
script.src = 'https://www.google-analytics.com/analytics.js';
document.head.appendChild(script);
});
</script>
<script src="js/page.js" defer></script>
<link rel="preload" as="style" href="all.css" onload="rel='stylesheet'">
<link rel="preload" crossorigin as="style" href="https://fonts.googleapis.com/css?family=Roboto:400,700%7CInconsolata" onload="rel='stylesheet'">
<link rel="preconnect" crossorigin href="https://fonts.gstatic.com">
<link rel="manifest" href="manifest.json">
<link rel="apple-touch-icon" href="imgs/apple-touch-icon.png">
<link rel="icon" href="imgs/favicon.png">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="application-name" content="SVGOMG">
</head>
<body>
<div class="app-output">
<div class="main-menu">
<div class="overlay"></div>
<nav class="menu">
<div class="app-title">
{% include "partials/icons/logo.svg" %}
<div class="title-text">
<h1>SVGOMG</h1>
<p>Powered by <a href="https://github.com/svg/svgo">SVGO v{{ SVGO_VERSION }}</a></p>
</div>
</div>
<ul>
<li>
<button class="load-file unbutton menu-item needsclick" type="button">
{% include "partials/icons/open.svg" %}
<span class="menu-item-text">Open SVG</span>
</button>
<input type="file" class="load-file-input" accept=".svg" aria-label="Open SVG">
</li>
<li>
<label class="menu-input menu-item">
{% include "partials/icons/paste.svg" %}
<span class="input-area">
<textarea class="paste-input"></textarea>
<span class="label-txt">Paste markup</span>
</span>
</label>
</li>
<li>
<button class="load-demo unbutton menu-item" type="button">
{% include "partials/icons/demo.svg" %}
<span class="menu-item-text">Demo</span>
</button>
</li>
<li>
<a href="https://github.com/jakearchibald/svgomg" class="menu-item">
{% include "partials/icons/contribute.svg" %}
<span class="menu-item-text">Contribute</span>
</a>
</li>
</ul>
<div class="menu-extra"></div>
</nav>
</div>
<div class="toolbar">
<div class="menu-toolbar-item">
<button class="unbutton menu-btn" type="button">
{% include "partials/icons/menu.svg" %}
</button>
</div>
<form class="material-tabs view-toggler">
<label class="material-tab" tabindex="0">
<input type="radio" name="output" value="image" checked>
<span class="selected" tabindex="-1"></span>
Image
</label>
<label class="material-tab" tabindex="0">
<input type="radio" name="output" value="code">
<span class="selected" tabindex="-1"></span>
Markup
</label>
</form>
</div>
<div class="main">
<div class="output">
<div class="action-button-container">
<div class="minor-action-container"></div>
<div class="results-container"></div>
</div>
</div>
<div class="settings">
<div class="results-container-mobile"></div>
<div class="settings-scroller">
<section class="global">
<h1 class="settings-sub-heading">Global settings</h1>
<label class="setting-item-toggle">
<input type="checkbox" name="original">
{% include "partials/material-switch.html" %}
Show original
</label>
<label class="setting-item-toggle">
<input type="checkbox" name="gzip" checked>
{% include "partials/material-switch.html" %}
Compare gzipped
</label>
<label class="setting-item-toggle">
<input type="checkbox" name="pretty">
{% include "partials/material-switch.html" %}
Prettify markup
</label>
<label class="setting-item-toggle">
<input type="checkbox" name="multipass">
{% include "partials/material-switch.html" %}
Multipass
</label>
<label class="setting-item-range">
<span class="label-text">Precision</span>
<input type="range" min="0" max="8" step="1" value="3" name="floatPrecision">
</label>
</section>
<section class="plugins">
<h1 class="settings-sub-heading">Features</h1>
{% for plugin in plugins %}
<label class="setting-item-toggle">
<input type="checkbox"
name="{{ plugin.id }}"
{% if plugin.active %}checked{% endif %}>
{% include "partials/material-switch.html" %}
{{ plugin.name }}
</label>
{% endfor %}
</section>
<div class="setting-reset-row">
<button class="unbutton setting-reset" type="button">Reset all</button>
</div>
</div>
</div>
</div>
<div class="preloader">
<div class="spinner">
<div class="spinner-container">
<div class="spinner-layer">
<div class="circle-clipper left">
<div class="circle"></div>
</div>
<div class="gap-patch">
<div class="circle"></div>
</div>
<div class="circle-clipper right">
<div class="circle"></div>
</div>
</div>
</div>
</div>
<p>Sorry, wasn't ready…</p>
</div>
<script>
document.querySelector('.preloader').addEventListener('click', function() {
// track it
ga('send', 'event', 'preloader', 'clicked');
this.className = 'preloader active';
});
</script>
</div>
</body>
</html>