-
Notifications
You must be signed in to change notification settings - Fork 31
/
inspect.html
283 lines (257 loc) · 19.3 KB
/
inspect.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
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Eyedropper Tool</title>
<link rel="stylesheet" href="./css/styles.css" />
<link rel="stylesheet" href="./css/inspect/inspect.css" />
<script src="./js/shared/log.js"></script>
<script src="./js/dist/spectrum-web-components.js" async></script>
<script src="./js/inspect/inspect.ui.js" type="module"></script>
</head>
<body class="tool loading">
<sp-theme color="dark" scale="medium">
<!-- MAIN CONTENT -->
<main>
<!-- EYEDROPPER SECTION -->
<section class="inspect">
<div class="section-title">
<div>
<h2>Eyedropper</h2>
<sp-contextual-help>
<h3>Eyedropper</h3>
<p>Use the Eyedropper to capture logo, fonts, sizes and colors and generate AEM friendly CSS.</p>
</sp-contextual-help>
</div>
</div>
<sp-divider size="l"></sp-divider>
<div class="section-cols">
<div class="section-col">
<form class="inspect-form">
<sp-field-label for="inspect-url" required>URL</sp-field-label>
<sp-textfield class="option-field" id="inspect-url" type="url">
<sp-help-text slot="help-text">https://www.example.com</sp-help-text>
<sp-help-text slot="negative-help-text">Please enter a valid URL.</sp-help-text>
</sp-textfield>
<sp-accordion>
<sp-accordion-item label="Eyedropper Options">
<div>
<sp-checkbox class="option-field" id="inspect-enable-js">
Enable JavaScript
</sp-checkbox>
<sp-help-text variant="negative" icon>
Security risk: only enable Javascript execution when importing from trusted websites.
</sp-help-text>
</div>
</sp-accordion-item>
</sp-accordion>
<sp-button-group>
<sp-button id="inspect-drop-button">Eyedrop</sp-button>
</sp-button-group>
</form>
<div class="page-preview hidden">
<sp-divider size="s"></sp-divider>
<h3>Page preview</h3>
<div><iframe id="inspect-content-frame"></iframe></div>
</div>
</div>
<div class="section-col">
<sp-tabs selected="inspect-logo">
<sp-tab label="Logo" value="inspect-logo"></sp-tab>
<sp-tab label="Colors" value="inspect-colors"></sp-tab>
<sp-tab label="Fonts & sizes" value="inspect-fonts-sizes"></sp-tab>
<sp-tab-panel value="inspect-logo">
<div class="field-group">
<sp-field-label for="inspect-select-logo" side-aligned="start">Select an image</sp-field-label>
<sp-action-button for="inspect-select-logo" data-picker="img" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
<sp-help-text variant="negative" icon class="hidden" id="svg-security-risk">
Security risk: the logo you have selected is an SVG. It may contain malicious code (like Javascript code). You can download it but you should inspect it before using it.
</sp-help-text>
<sp-asset id="inspect-select-logo" class="hidden">
<div></div>
</sp-asset>
</div>
</sp-tab-panel>
<sp-tab-panel value="inspect-colors">
<div>
<div class="field-group">
<sp-field-label for="inspect-text-color">Text color</sp-field-label>
<sp-textfield id="inspect-text-color"></sp-textfield>
<sp-color-handle for="inspect-text-color"></sp-color-handle>
<sp-action-button for="inspect-text-color" data-picker="color" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-link-color">Link color</sp-field-label>
<sp-textfield id="inspect-link-color"></sp-textfield>
<sp-color-handle for="inspect-link-color"></sp-color-handle>
<sp-action-button for="inspect-link-color" data-picker="color" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-link-hover-color">Link hover color</sp-field-label>
<sp-textfield id="inspect-link-hover-color"></sp-textfield>
<sp-color-handle for="inspect-link-hover-color"></sp-color-handle>
<sp-action-button for="inspect-link-hover-color" data-picker="color" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-background-color">Background color</sp-field-label>
<sp-textfield id="inspect-background-color"></sp-textfield>
<sp-color-handle for="inspect-background-color"></sp-color-handle>
<sp-action-button for="inspect-background-color" data-picker="backgroundcolor" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-overlay-background-color">Overlay background color</sp-field-label>
<sp-textfield id="inspect-overlay-background-color"></sp-textfield>
<sp-color-handle for="inspect-overlay-background-color"></sp-color-handle>
<sp-action-button for="inspect-overlay-background-color" data-picker="backgroundcolor" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-highlight-background-color">Highlight background color</sp-field-label>
<sp-textfield id="inspect-highlight-background-color"></sp-textfield>
<sp-color-handle for="inspect-highlight-background-color"></sp-color-handle>
<sp-action-button for="inspect-highlight-background-color" data-picker="backgroundcolor" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
</div>
</sp-tab-panel>
<sp-tab-panel value="inspect-fonts-sizes">
<div>
<div class="field-group">
<sp-field-label for="inspect-heading-font-family">Heading font family</sp-field-label>
<sp-textfield id="inspect-heading-font-family"></sp-textfield>
<sp-action-button for="inspect-heading-font-family" data-picker="font" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-body-font-family">Body font family</sp-field-label>
<sp-textfield id="inspect-body-font-family"></sp-textfield>
<sp-action-button for="inspect-body-font-family" data-picker="font" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-fixed-font-family">Fixed font family</sp-field-label>
<sp-textfield id="inspect-fixed-font-family"></sp-textfield>
<sp-action-button for="inspect-fixed-font-family" data-picker="font" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-cols">
<div class="field-col">
<div class="field-group">
<sp-field-label for="inspect-heading-font-size-xxl">Heading font size XXL</sp-field-label>
<sp-textfield id="inspect-heading-font-size-xxl"></sp-textfield>
<sp-action-button for="inspect-heading-font-size-xxl" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-heading-font-size-xl">Heading font size XL</sp-field-label>
<sp-textfield id="inspect-heading-font-size-xl"></sp-textfield>
<sp-action-button for="inspect-heading-font-size-xl" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-heading-font-size-l">Heading font size L</sp-field-label>
<sp-textfield id="inspect-heading-font-size-l"></sp-textfield>
<sp-action-button for="inspect-heading-font-size-l" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-heading-font-size-m">Heading font size M</sp-field-label>
<sp-textfield id="inspect-heading-font-size-m"></sp-textfield>
<sp-action-button for="inspect-heading-font-size-m" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-heading-font-size-s">Heading font size S</sp-field-label>
<sp-textfield id="inspect-heading-font-size-s"></sp-textfield>
<sp-action-button for="inspect-heading-font-size-s" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-heading-font-size-xs">Heading font size XS</sp-field-label>
<sp-textfield id="inspect-heading-font-size-xs"></sp-textfield>
<sp-action-button for="inspect-heading-font-size-xs" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
</div>
<div class="field-col">
<div class="field-group">
<sp-field-label for="inspect-body-font-size-xxl">Body font size XXL</sp-field-label>
<sp-textfield id="inspect-body-font-size-xxl"></sp-textfield>
<sp-action-button for="inspect-body-font-size-xxl" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-body-font-size-xl">Body font size XL</sp-field-label>
<sp-textfield id="inspect-body-font-size-xl"></sp-textfield>
<sp-action-button for="inspect-body-font-size-xl" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-body-font-size-l">Body font size L</sp-field-label>
<sp-textfield id="inspect-body-font-size-l"></sp-textfield>
<sp-action-button for="inspect-body-font-size-l" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-body-font-size-m">Body font size M</sp-field-label>
<sp-textfield id="inspect-body-font-size-m"></sp-textfield>
<sp-action-button for="inspect-body-font-size-m" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-body-font-size-s">Body font size S</sp-field-label>
<sp-textfield id="inspect-body-font-size-s"></sp-textfield>
<sp-action-button for="inspect-body-font-size-s" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
<div class="field-group">
<sp-field-label for="inspect-body-font-size-xs">Body font size XS</sp-field-label>
<sp-textfield id="inspect-body-font-size-xs"></sp-textfield>
<sp-action-button for="inspect-body-font-size-xs" data-picker="size" disabled>
<sp-icon-anchor-select></sp-icon-anchor-select>
</sp-action-button>
</div>
</div>
</div>
</div>
</sp-tab-panel>
</sp-tabs>
<sp-button-group>
<sp-button id="inspect-download-logo-button" class="hidden">Download logo</sp-button>
<sp-button id="inspect-copy-css-button" class="hidden">Copy CSS to clipboard</sp-button>
</sp-button-group>
</div>
</div>
</section>
</main>
<div id="alert-container"></div>
</sp-theme>
<script src="./js/swc_loader.js" type="module"></script>
</body>
</html>