appscms-tools-theme 2.2.2 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,423 @@
1
+ :root {
2
+ --maincolor: #e55c5c;
3
+ }
4
+
5
+ #img-svg {
6
+ margin: auto;
7
+ margin-top: 16px;
8
+ height: 67px;
9
+ width: 98px;
10
+ }
11
+
12
+ #file-loader {
13
+ display: flex;
14
+ align-items: center;
15
+ flex-direction: column;
16
+ }
17
+
18
+ #file-loader img {
19
+ height: 60px;
20
+ }
21
+
22
+ #file-loader p {
23
+ text-align: center;
24
+ color: #fff;
25
+ font-size: 17px;
26
+ }
27
+
28
+ #loading-img {
29
+ height: 27px;
30
+ width: 27px;
31
+ margin-right: 21px;
32
+ }
33
+
34
+ #dropbox svg,
35
+ #filepicker svg,
36
+ .boxes svg {
37
+ height: 24px !important;
38
+ width: 24px !important;
39
+ }
40
+
41
+ .feature-content-box {
42
+ max-width: 900px;
43
+ margin: auto
44
+ }
45
+
46
+ .boxes {
47
+ background: #fff;
48
+ border-radius: 0;
49
+ cursor: pointer;
50
+ display: flex;
51
+ align-items: center;
52
+ padding: 15px 24px;
53
+ height: 54px;
54
+ border-top-left-radius: 4px;
55
+ border-bottom-left-radius: 4px;
56
+ justify-content: center;
57
+ font-size: 15px;
58
+ font-weight: 800;
59
+ color: #000;
60
+ }
61
+
62
+ .inputfiles-label {
63
+ background: #d6f0fb70;
64
+ /* padding: 10px; */
65
+ /* margin: 10px; */
66
+ text-transform: uppercase;
67
+ font-weight: 900;
68
+ padding: 5px;
69
+ /* margin: 10px 0; */
70
+ width: 100px;
71
+ margin-bottom: 7px;
72
+ border-radius: 2px;
73
+ }
74
+
75
+
76
+ .ready {
77
+ text-transform: uppercase;
78
+ color: #fff;
79
+ padding: 0 5px;
80
+ color: red;
81
+ border: red 1px solid;
82
+ font-size: 10px;
83
+ }
84
+
85
+ .processing {
86
+ text-transform: uppercase;
87
+ color: #fff;
88
+ background-color: #ffb103;
89
+ padding: 0 5px;
90
+ border: #ffb103 1px solid;
91
+ font-size: 10px;
92
+ }
93
+
94
+ .done {
95
+ text-transform: uppercase;
96
+ color: #fff;
97
+ background-color: #32be5b;
98
+ padding: 0 5px;
99
+ border: #32be5b 1px solid;
100
+ font-size: 10px;
101
+ }
102
+
103
+ .spinner-border {
104
+ color: #000;
105
+ display: inline-block;
106
+ width: 15px;
107
+ height: 15px;
108
+ vertical-align: middle;
109
+ border: 2px solid currentColor;
110
+ border-right-color: transparent;
111
+ border-radius: 50%;
112
+ -webkit-animation: .75s linear infinite spinner-border;
113
+ animation: .75s linear infinite spinner-border;
114
+ /* padding-right: 1rem; */
115
+ position: relative;
116
+ left: 20px;
117
+ }
118
+
119
+ .files-panel {
120
+ text-align: left;
121
+ box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
122
+ border-radius: 4px;
123
+ padding: 15px;
124
+ }
125
+
126
+ .files-container-box {
127
+ margin-top: 1rem;
128
+ text-align: left;
129
+ box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
130
+ /* padding-bottom: 10px; */
131
+ width: 100%;
132
+ }
133
+
134
+ .table td,
135
+ .table th {
136
+ border-top: none !important;
137
+ border-bottom: 1px solid #dee2e6;
138
+ vertical-align: middle !important;
139
+ }
140
+
141
+ .download-file-btn {
142
+ border: none;
143
+ background: #404040;
144
+ color: #fff;
145
+ padding: 4px 15px;
146
+ border-radius: 5px;
147
+ width: auto;
148
+ font-size: 14px;
149
+ }
150
+
151
+ .download-file-btn:hover,
152
+ .add-more-files-button:hover {
153
+ color: white !important;
154
+ }
155
+
156
+ .add-more-files-button {
157
+ padding: 6px 20px;
158
+ color: #fff;
159
+ background-color: #404040;
160
+ border-color: #404040;
161
+ /* width: 200px; */
162
+ font-size: 15px;
163
+ display: flex;
164
+ align-items: center;
165
+ justify-content: center;
166
+ gap: 10px;
167
+ /* margin-left: 12px; */
168
+ }
169
+
170
+ .add-more-files-button img {
171
+ width: 30px;
172
+ }
173
+
174
+ .bottom-section-container {
175
+ background: #0000000f;
176
+ padding: 25px 10px;
177
+ border: 1px solid #0000000f;
178
+ box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
179
+ }
180
+
181
+ #submit-button {
182
+ padding: 8px 20px;
183
+ color: #fff;
184
+ display: flex;
185
+ gap: 20px;
186
+ align-items: center;
187
+ }
188
+
189
+ #submit-button:focus {
190
+ border: none;
191
+ outline: none;
192
+ box-shadow: unset !important;
193
+ }
194
+
195
+ .custom-box {
196
+ padding: 15px;
197
+ }
198
+
199
+ .inner-box {
200
+ border: 1px dashed rgba(0, 0, 0, 0.15);
201
+ background: rgba(0, 0, 0, 0.1);
202
+ padding: 40px;
203
+ min-height: 300px;
204
+ width: 100%;
205
+ }
206
+
207
+ .file-picker-dropdown {
208
+ width: 213px;
209
+ position: absolute;
210
+ background: #fff;
211
+ top: 111%;
212
+ right: 0;
213
+ display: none;
214
+ box-shadow: rgb(26 26 26 / 20%) 0 0 12px;
215
+ border-radius: 4px;
216
+ }
217
+
218
+ .file-pick-dropdown i {
219
+ margin: 0;
220
+ }
221
+
222
+ .file-pick-dropdown {
223
+ color: #000;
224
+ cursor: pointer;
225
+ display: inline-flex;
226
+ background: #fff;
227
+ height: 54px;
228
+ border-left: 1px solid rgba(95, 88, 88, 0.75);
229
+ padding: 13px 20px;
230
+ border-top-right-radius: 4px;
231
+ border-bottom-right-radius: 4px;
232
+ align-items: center;
233
+ position: relative;
234
+ }
235
+
236
+ #dropfile {
237
+ font-size: 16px;
238
+ margin-top: 15px;
239
+ text-align: center;
240
+ color: #fff;
241
+ }
242
+
243
+ .file-icon {
244
+ width: 20px;
245
+ }
246
+
247
+ .file-picker-dropdown a,
248
+ .file-picker-dropdown button {
249
+ border: none;
250
+ width: 100%;
251
+ border-radius: 4px;
252
+ text-align: left;
253
+ background: #fff;
254
+ font-weight: 400;
255
+ font-size: 16px;
256
+ line-height: 24px;
257
+ padding: 15px 24px;
258
+ list-style: none;
259
+ height: 54px;
260
+ }
261
+
262
+ /* user css */
263
+ input[type='range'] {
264
+ width: 100%;
265
+ -webkit-appearance: none;
266
+ }
267
+
268
+ input[type='range']:focus {
269
+ outline: none;
270
+ }
271
+
272
+ input[type='range']::-webkit-slider-thumb:focus {
273
+ background-color: var(--maincolor);
274
+ }
275
+
276
+ input[type='range']::-webkit-slider-runnable-track {
277
+ width: 100%;
278
+ height: 3px;
279
+ cursor: pointer;
280
+ box-shadow: none;
281
+ background: #ccc;
282
+ border-radius: 0px;
283
+ border: 0px solid var(--maincolor);
284
+ }
285
+
286
+ input[type='range']::-moz-range-track {
287
+ width: 100%;
288
+ height: 3px;
289
+ cursor: pointer;
290
+ box-shadow: none;
291
+ background: #ccc;
292
+ border-radius: 0px;
293
+ border: 0px solid var(--maincolor);
294
+ }
295
+
296
+ input[type='range']::-webkit-slider-thumb {
297
+ box-shadow: none;
298
+ border: 0px solid #fff;
299
+ height: 15px;
300
+ width: 15px;
301
+ border-radius: 22px;
302
+ background: var(--maincolor);
303
+ cursor: pointer;
304
+ -webkit-appearance: none;
305
+ margin-top: -5px;
306
+ }
307
+
308
+ input[type='range']::-moz-range-thumb {
309
+ box-shadow: none;
310
+ border: 0px solid #fff;
311
+ height: 42px;
312
+ width: 22px;
313
+ border-radius: 22px;
314
+ background: var(--maincolor);
315
+ cursor: pointer;
316
+ -webkit-appearance: none;
317
+ margin-top: -20px;
318
+ }
319
+
320
+ input[type='range']::-moz-focus-outer {
321
+ border: 0;
322
+ }
323
+
324
+ .options-panel {
325
+ box-shadow: 0 2px 4px rgb(0 0 0 / 20%);
326
+ border-radius: 4px;
327
+ padding: 15px;
328
+ width: 100%;
329
+ }
330
+
331
+ .options-panel .title {
332
+ width: 100%;
333
+ margin-bottom: 20px;
334
+ font-size: 22px;
335
+ line-height: 36px;
336
+ color: #000;
337
+ font-weight: 700;
338
+ text-align: left;
339
+ }
340
+
341
+ .options-panel .description {
342
+ width: 100%;
343
+ font-size: 17px;
344
+ color: #666;
345
+ font-weight: 400;
346
+ text-align: left;
347
+ }
348
+
349
+ .options-title {
350
+ width: 100%;
351
+ font-size: 17px;
352
+ color: #666;
353
+ font-weight: 400;
354
+ text-align: left;
355
+ }
356
+
357
+ .download-format,
358
+ .download-wrapper {
359
+ display: flex;
360
+ align-items: flex-start;
361
+ border-bottom: 1px solid #ddd;
362
+ margin: 12px 0px;
363
+ padding: 12px 0px;
364
+ flex-direction: column;
365
+ }
366
+
367
+ .download-format .select-format-title {
368
+ font-size: 17px;
369
+ color: #666;
370
+ font-weight: 400;
371
+ text-align: left;
372
+ }
373
+
374
+ #download-button,
375
+ #addMore,
376
+ #common_btn,
377
+ #download-zip {
378
+ cursor: pointer;
379
+ display: inline-block;
380
+ width: 100%;
381
+ padding: 14px 0;
382
+ margin-bottom: 20px;
383
+ text-align: center;
384
+ border-radius: 50px;
385
+ background: var(--maincolor) !important;
386
+ font-size: 18px;
387
+ color: #fff;
388
+ font-weight: 700;
389
+ text-decoration: none;
390
+ transition: all 0.3s;
391
+ border: none;
392
+ }
393
+
394
+ #download-button svg {
395
+ fill: #fff;
396
+ margin-right: 4px;
397
+ height: 20px;
398
+ }
399
+
400
+ #download-zip {
401
+ padding: 10px 16px;
402
+ display: none;
403
+ /* backgr/ound: #fff; */
404
+ }
405
+
406
+ @media (max-width: 768px) {
407
+ .options-panel {
408
+ margin-top: 15px;
409
+ }
410
+
411
+ .fileName {
412
+ font-size: 12px;
413
+ }
414
+
415
+ .download-file-btn {
416
+ font-size: 10px;
417
+ }
418
+
419
+ .download-icon {
420
+ display: none;
421
+ }
422
+
423
+ }
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
@@ -0,0 +1 @@
1
+ <svg id="Capa_1" enable-background="new 0 0 512 512" height="512" viewBox="0 0 512 512" width="512" xmlns="http://www.w3.org/2000/svg"><g><path d="m408.42 213.557c-.581.3-1.235.458-1.893.458s-1.313-.159-1.894-.458c-49.456-25.54-79.495-65.46-86.293-113.851-27.401-13.379-58.188-20.897-90.734-20.897-114.36 0-207.066 92.707-207.066 207.066s92.707 207.066 207.066 207.066 207.066-92.707 207.066-207.066c0-27.738-5.468-54.195-15.362-78.371-3.519 2.097-7.145 4.119-10.89 6.053z" fill="#d8ecfe"/><g><g><path d="m57.701 343.045c2.901-2.901 7.604-2.901 10.505 0l3.018 3.018c-5.778-19.048-8.898-39.252-8.898-60.188 0-107.307 81.626-195.547 186.174-206.022-6.871-.688-13.84-1.044-20.893-1.044-114.36 0-207.066 92.707-207.066 207.066 0 27.9 5.531 54.504 15.535 78.795z" fill="#c4e2ff"/></g></g><g><path d="m321.188 360.306c-11.462 11.461-26.702 17.774-42.909 17.774-.747 0-1.496-.014-2.245-.042l-14.704-.543c-.775-.028-1.547-.042-2.319-.042-11.381 0-22.296 3.02-31.84 8.669l59.088 59.088 92.922-92.922-24.987-24.987z" fill="#ffe5c2"/><path d="m275.997 379.038-14.705-.544c-11.802-.436-23.362 2.526-33.378 8.372l57.636 57.636 32.075-32.075-33.633-33.633c-2.643.247-5.311.344-7.995.244z" fill="#fed2a4"/><g><path d="m312.176 509.824-40.721-40.721c-2.901-2.901-2.901-7.604 0-10.505l115.554-115.554c2.901-2.901 7.604-2.901 10.505 0l40.721 40.721c2.901 2.901 2.901 7.604 0 10.505l-115.554 115.554c-2.901 2.901-7.604 2.901-10.505 0z" fill="#fe646f"/></g><g><path d="m314.715 469.104c-2.901-2.901-2.901-7.604 0-10.505l99.177-99.177-16.377-16.378c-2.901-2.901-7.604-2.901-10.505 0l-115.555 115.555c-2.901 2.901-2.901 7.604 0 10.505l40.721 40.721c2.901 2.901 7.604 2.901 10.505 0l16.377-16.378z" fill="#fd4755"/></g><path d="m392.295 260.223c-7.089-7.579-18.123-9.061-26.755-4.444-.864.462-1.823-.462-1.36-1.325 4.518-8.423 3.223-19.141-3.884-26.247-7.105-7.105-17.82-8.401-26.242-3.887-.852.457-1.797-.488-1.34-1.34 4.514-8.422 3.218-19.136-3.887-26.242-7.107-7.107-17.825-8.401-26.248-3.884-.863.463-1.787-.496-1.325-1.36 4.624-8.645 3.131-19.701-4.48-26.789-8.829-8.223-22.729-7.591-31.261.941l-1.951 1.951-1.679.265-27.012 27.011.184 1.23 16.349 16.349c4.247 4.247 6.784 10.011 6.622 16.015-.157 5.809-2.609 11.171-6.911 15.111-3.802 3.48-8.796 5.396-14.063 5.396-.001 0-.001 0-.002 0-5.866 0-11.62-2.39-15.786-6.555l-1.414 1.414 5.968 5.968c3.977 3.977 6.455 9.294 6.573 14.917.147 7.029-3.073 13.548-8.892 17.769-2.727 1.978-5.929 3.264-9.265 3.731-6.805.952-13.381-1.273-18.116-6.008l-10.273-10.273-1.414 1.414c5.007 5.007 7.201 12.05 5.817 19.261-.48 2.501-1.434 4.907-2.81 7.05-4.439 6.915-12.009 10.581-19.955 9.882-5.093-.448-9.819-2.85-13.434-6.466l-11.984-11.984-1.418 1.418c4.403 4.453 6.603 10.488 6.06 16.82-.338 3.941-1.783 7.746-4.179 10.893-4.13 5.425-10.347 8.474-16.99 8.474-5.635 0-10.934-2.184-14.937-6.142l-33.149 33.149 90.376 90.376 47.563-47.563c12.128-12.128 28.758-18.659 45.899-18.026l14.705.544c17.14.634 33.77-5.897 45.898-18.025l69.457-69.457c8.554-8.551 9.206-22.5.945-31.332z" fill="#d88a55"/><g fill="#c57a44"><path d="m252.52 212.151c3.786 3.786 5.904 8.597 6.391 13.539l44.954-44.954c-.067-5.605-2.228-11.19-6.505-15.467-8.69-8.69-22.779-8.69-31.468 0l-30.127 30.127z"/><path d="m147.977 336.624 29.513-29.512c-7.984 3.109-17.388 1.433-23.82-5l-12.31-12.31-.005.005c8.698 8.793 8.562 23.003-.331 31.622-8.697 8.429-22.528 8.344-31.128-.162l-31.735 31.733 90.376 90.376 28.528-28.527-49.088-49.087c-8.046-8.046-8.046-21.092 0-29.138z"/></g><path d="m252.52 212.151-51.568-51.568c-8.69-8.69-22.779-8.69-31.468 0-8.69 8.69-8.69 22.779 0 31.468-8.69-8.69-22.778-8.69-31.468 0-8.69 8.69-8.69 22.779 0 31.468-8.69-8.69-22.779-8.69-31.469 0s-8.69 22.779 0 31.468l9.631 9.631c-8.69-8.69-22.778-8.69-31.468 0s-8.69 22.779 0 31.468l25.096 25.096c8.594 8.594 22.492 8.703 31.22.245 8.923-8.647 9.035-22.927.249-31.713l12.397 12.397c8.594 8.594 22.492 8.703 31.22.245 8.923-8.647 9.035-22.927.249-31.713l10.274 10.273c8.594 8.594 22.492 8.703 31.22.245 8.923-8.647 9.035-22.927.249-31.713l-6.322-6.322c8.5 8.499 22.368 9.306 31.234 1.189 9.407-8.615 9.65-23.238.724-32.164z" fill="#ffe5c2"/><g><path d="m242.046 150.992h-39.732c-6.724 0-12.175 5.451-12.175 12.175v5.054c0 15.063 12.211 27.274 27.274 27.274l18.352-.098 27.799-27.8c-2.497-9.54-11.168-16.605-21.518-16.605z" fill="#ffbd86"/></g><g><path d="m239.808 234.058-51.075-51.075c-7.872-7.872-8.588-20.162-2.197-28.868-6.126-.362-12.373 1.787-17.053 6.468-8.69 8.69-8.69 22.778 0 31.468l51.075 51.075c8.5 8.5 22.368 9.307 31.234 1.19 1.167-1.069 2.179-2.237 3.058-3.471-5.489-.349-10.902-2.648-15.042-6.787z" fill="#fed2a4"/><g><path d="m216.984 270.086-57.397-57.397c-7.327-7.327-8.45-18.481-3.422-27.012-6.471-.703-13.19 1.414-18.15 6.374-8.69 8.69-8.69 22.779 0 31.468l57.397 57.397c8.594 8.594 22.493 8.703 31.22.245 1.471-1.425 2.678-3.014 3.669-4.695-4.867-.529-9.591-2.654-13.317-6.38z" fill="#fed2a4"/></g><g><path d="m174.746 291.72-47.124-47.124c-7.462-7.462-8.497-18.896-3.144-27.483-6.403-.632-13.028 1.501-17.933 6.406-8.69 8.69-8.69 22.779 0 31.469l47.124 47.124c8.594 8.594 22.492 8.703 31.22.245 1.335-1.293 2.447-2.724 3.388-4.232-4.942-.489-9.75-2.624-13.531-6.405z" fill="#fed2a4"/></g><g><path d="m131.026 310.84-25.096-25.096c-7.469-7.469-8.499-18.919-3.129-27.508-6.453-.684-13.147 1.437-18.093 6.383-8.69 8.69-8.69 22.779 0 31.468l25.096 25.096c8.594 8.594 22.492 8.702 31.22.245 1.325-1.284 2.432-2.703 3.368-4.2-4.884-.52-9.628-2.649-13.366-6.388z" fill="#fed2a4"/></g></g><g><path d="m183.76 469.104-40.721 40.721c-2.901 2.901-7.604 2.901-10.505 0l-115.554-115.555c-2.901-2.901-2.901-7.604 0-10.505l40.721-40.721c2.901-2.901 7.604-2.901 10.505 0l115.554 115.555c2.901 2.901 2.901 7.604 0 10.505z" fill="#97d729"/></g><g><path d="m59.351 394.27c-2.901-2.901-2.901-7.604 0-10.505l24.788-24.788-15.933-15.933c-2.901-2.901-7.604-2.901-10.505 0l-40.721 40.721c-2.901 2.901-2.901 7.604 0 10.505l115.554 115.554c2.901 2.901 7.604 2.901 10.505 0l15.933-15.933z" fill="#8bc727"/></g></g><g><g><path d="m406.527 0c-26.888 0-52.254 26.844-74.646 19.542-2.619-.854-5.45.608-6.382 3.2-6.231 17.328-9.64 36.001-9.64 55.475 0 63.284 35.836 109.127 88.317 136.229 1.471.76 3.233.76 4.704 0 52.481-27.102 88.317-72.945 88.317-136.229 0-19.474-3.41-38.147-9.64-55.475-.932-2.592-3.763-4.054-6.382-3.2-22.394 7.302-47.761-19.542-74.648-19.542z" fill="#fed402"/></g><g><path d="m393.086 156.285c-27.157-6.139-47.503-30.446-47.503-59.432 0-15.04 5.487-28.814 14.55-39.455.558-15.729 3.339-30.889 8.025-45.187-12.734 5.927-24.891 11.044-36.277 7.331-2.619-.854-5.45.608-6.382 3.2-6.231 17.328-9.64 36.001-9.64 55.475 0 63.284 35.836 109.127 88.317 136.229 1.471.76 3.233.76 4.704 0 11.08-5.722 21.407-12.289 30.823-19.67-18.108-10.455-33.935-23.309-46.617-38.491z" fill="#fac600"/></g><g><g><circle cx="406.527" cy="96.852" fill="#97d729" r="53.444"/></g><g><path d="m390.954 96.852c0-22.847 14.341-42.335 34.509-49.98-5.887-2.232-12.266-3.464-18.935-3.464-29.516 0-53.444 23.928-53.444 53.444s23.928 53.444 53.444 53.444c6.669 0 13.048-1.232 18.935-3.464-20.168-7.645-34.509-27.133-34.509-49.98z" fill="#8bc727"/></g><g><path d="m406.526 157.796c-33.604 0-60.943-27.339-60.943-60.944s27.339-60.944 60.943-60.944 60.944 27.339 60.944 60.944-27.339 60.944-60.944 60.944zm0-106.887c-25.333 0-45.943 20.61-45.943 45.944s20.61 45.944 45.943 45.944c25.334 0 45.944-20.61 45.944-45.944s-20.61-45.944-45.944-45.944z" fill="#e8b800"/></g><g><path d="m402.913 120.352c-1.989 0-3.896-.79-5.304-2.197l-22.096-22.096c-2.929-2.929-2.929-7.678 0-10.606 2.931-2.929 7.679-2.929 10.607 0l16.792 16.793 24.02-24.02c2.93-2.929 7.678-2.929 10.607 0s2.929 7.678 0 10.606l-29.323 29.323c-1.406 1.407-3.314 2.197-5.303 2.197z" fill="#fff"/></g></g></g></g></svg>
@@ -0,0 +1,6 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" version="1.0" width="512.000000" height="512.000000" preserveAspectRatio="xMidYMid meet" style=""><rect id="backgroundrect" width="100%" height="100%" x="0" y="0" fill="none" stroke="none"/>
2
+
3
+
4
+ <g class="currentLayer" style=""><title>Layer 1</title><g transform="translate(0,512) scale(0.10000000149011612,-0.10000000149011612) " fill="#ffffff" stroke="none" id="svg_1" class="selected" fill-opacity="1">
5
+ <path d="M0 2560 l0 -2560 2560 0 2560 0 0 2560 0 2560 -2560 0 -2560 0 0 -2560z m2653 1407 c69 -53 67 -31 67 -671 l0 -576 576 0 c641 0 618 2 672 -68 39 -51 39 -133 0 -184 -54 -70 -31 -68 -672 -68 l-576 0 0 -576 c0 -641 2 -618 -68 -672 -51 -39 -133 -39 -184 0 -70 54 -68 31 -68 672 l0 576 -576 0 c-641 0 -618 -2 -672 68 -39 51 -39 133 0 184 54 70 31 68 672 68 l576 0 2 588 3 589 27 35 c55 72 152 88 221 35z" id="svg_2" fill="#ffffff" fill-opacity="1"/>
6
+ </g></g></svg>
@@ -0,0 +1,190 @@
1
+ const getScript = document.currentScript
2
+ const pageTool = getScript.dataset.tool
3
+ const lang = getScript.dataset.lang
4
+ const inputBox = document.querySelector('#Inputbox')
5
+ const addFiles = document.querySelector(".add-more-files")
6
+ const gdrive = document.querySelector('#filepicker')
7
+ const fileDropBox = document.querySelector('.custom-box')
8
+ const workspace = document.querySelector(".workspace")
9
+ const selectedFilesList = document.querySelector('.selectedFilesList')
10
+ const downloadButton = document.querySelector('#download-button')
11
+ const submitButton = document.querySelector("#submit-button")
12
+ const showProcessingFiles = document.querySelector(".files-processing-list")
13
+
14
+ let root = document.querySelector(':root')
15
+ root.style.setProperty('--maincolor', fileDropBox.dataset.color)
16
+
17
+ const getFile = (file) => {
18
+ handleFile(file)
19
+ }
20
+ fileDropBox.addEventListener('dragover', (e) => {
21
+ e.preventDefault()
22
+ })
23
+ fileDropBox.addEventListener('drop', (e) => {
24
+ e.preventDefault()
25
+ handleFile(e.dataTransfer.files[0])
26
+ })
27
+ const fileOnChange = () => {
28
+ handleFile(file.files)
29
+ }
30
+ inputBox.onclick = function () {
31
+ document.querySelector('#file').click()
32
+ }
33
+ const fileOnChange2 = () => {
34
+ addMoreFiles(document.querySelector('#file2').files)
35
+ }
36
+ addFiles.onclick = function () {
37
+ document.querySelector('#file2').click()
38
+ }
39
+ var files = []
40
+ let fileName = "";
41
+ let blobList = []
42
+ const addMoreFiles = (addFiles) => {
43
+ handleFile(addFiles)
44
+ }
45
+ const onSubmit = (files) => {
46
+ blobList = []
47
+ Promise.all(
48
+ files.map((item, index) => {
49
+ document.querySelector(`#loader-${index}`).innerHTML = `<span class="processing">processing</span>
50
+ <div class="spinner-border" role="status"><span class="sr-only">Loading...</span></div>`
51
+ return new Promise((resolve, reject) => {
52
+ batchConversion(item, index).then(([indexValue, blob, type]) => {
53
+ blobList.push(blob)
54
+ document.querySelector(`#loader-${indexValue}`).innerHTML = `<span class="done">finished</span>`
55
+ document.querySelector(`#download-${indexValue}`).style.display = "inline-block"
56
+ resolve()
57
+ })
58
+ }).catch((error) => {
59
+ console.log(error)
60
+ })
61
+ })).then(() => {
62
+ document.querySelector('#download-zip').style.display = "block"
63
+ let zip = new JSZip()
64
+ let zipFiles = zip.folder(`safeimagekit-batch`)
65
+ blobList.map((file, index) => {
66
+ zipFiles.file(
67
+ `safeimagekit-${index + 1}.png`,
68
+ getBase64String(file),
69
+ { base64: true }
70
+ )
71
+ })
72
+ document.querySelector('#download-zip').addEventListener('click', () => {
73
+ zip.generateAsync({ type: 'blob' }).then(function (content) {
74
+ saveAs(content, `safeimagekit-batch.zip`)
75
+ if (lang === 'en') {
76
+ window.location.href = `/download?tool=${pageTool}`
77
+ } else {
78
+ window.location.href = `/${lang}/download?tool=${pageTool}`
79
+ }
80
+ })
81
+ })
82
+ })
83
+ }
84
+ const renderFiles = (files) => {
85
+ files.map((file, index) => {
86
+ if (file) {
87
+ let loader = "Ready"
88
+ showProcessingFiles.innerHTML += `
89
+ <tr>
90
+ <th scope="row" class="file-icon-row">
91
+ <img src="/assets/images/file.png" alt="file" class="file-icon">
92
+ </th>
93
+ <td class="fileName">${file.name}</td>
94
+ <td id=loader-${index} class="file-processing"><span class="ready">${loader}</span></td>
95
+ <td class="file-download-button text-right">
96
+ <button style="display:none;" id=download-${index} data-type="image" onclick="handleDownload(this)" class="btn download-file-btn">
97
+ <svg class="download-icon" width="16px" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"
98
+ fill="currentColor">
99
+ <path
100
+ d="M18 20H5V15H6V19H17V15H18V20ZM12 4V15.19L14.3 13L15 13.6667L11.5 17L8 13.6667L8.7 13L11 15.19V4H12Z">
101
+ </path>
102
+ </svg> Download
103
+ </button>
104
+ </td>
105
+ </tr>
106
+ `
107
+ }
108
+ })
109
+ }
110
+ const handleFile = (file) => {
111
+ showProcessingFiles.innerHTML = ""
112
+ if (file) {
113
+ for (let i = 0; i < file.length; i++) {
114
+ files.push(file[i])
115
+ stopLoading()
116
+ workspace.style.display = 'block'
117
+ document.querySelector('#file').style.display = "block"
118
+ let listItem = document.createElement('li')
119
+ listItem.style.listStyle = "none"
120
+ let getFileSize = formatBytes(file[i].size)
121
+ listItem.innerHTML = `${file[i].name} (${getFileSize})`
122
+ selectedFilesList.appendChild(listItem)
123
+ }
124
+ }
125
+ renderFiles(files)
126
+ submitButton.addEventListener("click", () => onSubmit(files))
127
+ }
128
+ function formatBytes(bytes, decimals = 2) {
129
+ if (bytes === 0) return '0 Bytes';
130
+
131
+ const k = 1024;
132
+ const dm = decimals < 0 ? 0 : decimals;
133
+ const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
134
+
135
+ const i = Math.floor(Math.log(bytes) / Math.log(k));
136
+
137
+ return parseFloat((bytes / Math.pow(k, i)).toFixed(dm)) + ' ' + sizes[i];
138
+ }
139
+ const handleDownload = (e) => {
140
+ let find = blobList[Number(e.id.replace(/^\D+/g, ''))]
141
+ switch (e.dataset.type) {
142
+ case "image":
143
+ let a = document.createElement('a')
144
+ a.href = find
145
+ a.download = `safeimagekit.png`
146
+ document.body.appendChild(a)
147
+ a.click()
148
+ break;
149
+ default:
150
+ break;
151
+ }
152
+ }
153
+ const showLoading = () => {
154
+ document.querySelector('#file-loader').style.display = 'flex'
155
+ document.querySelector('.file-input').style.display = 'none'
156
+ }
157
+ const stopLoading = () => {
158
+ fileDropBox.style.display = 'none'
159
+ }
160
+ const showDropDown = document.querySelector('.file-pick-dropdown')
161
+ const icon = document.querySelector('.arrow-sign')
162
+ const dropDown = document.querySelector('.file-picker-dropdown')
163
+ showDropDown.addEventListener('click', () => {
164
+ addScripts()
165
+ if (dropDown.style.display !== 'none') {
166
+ dropDown.style.display = 'none'
167
+ icon.classList.remove('fa-angle-up')
168
+ icon.classList.add('fa-angle-down')
169
+ } else {
170
+ dropDown.style.display = 'block'
171
+ icon.classList.remove('fa-angle-down')
172
+ icon.classList.add('fa-angle-up')
173
+ }
174
+ })
175
+
176
+ const getBase64String = (dataURL) => {
177
+ const idx = dataURL.indexOf('base64,') + 'base64,'.length
178
+ return dataURL.substring(idx)
179
+ }
180
+ const dataURLtoBlob = (dataurl) => {
181
+ let arr = dataurl.split(','),
182
+ mime = arr[0].match(/:(.*?);/)[1],
183
+ bstr = atob(arr[1]),
184
+ n = bstr.length,
185
+ u8arr = new Uint8Array(n)
186
+ while (n--) {
187
+ u8arr[n] = bstr.charCodeAt(n)
188
+ }
189
+ return new Blob([u8arr], { type: mime })
190
+ }