PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.3.48
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.3.48
1.4.17 1.4.16 1.4.15 1.4.14 1.4.13 1.4.12 1.4.11 1.4.10 1.4.9 1.4.8 1.4.7 1.4.6 1.4.5 1.4.4 1.4.3 1.4.2 1.4.1 1.4.0 1.3.54 1.3.53 1.3.52 1.3.51 1.3.50 1.3.49 1.3.48 All 180 releases
disco / backend / views / components / Main / utilities / text-highlight-design.js

text-highlight-design.js in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.3.48, at backend/views/components/Main/utilities/text-highlight-design.js

510 lines 11.8 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 /**
2 * Pre-made text highlight designs
3 * Each design contains CSS properties for easy PHP HTML generation
4 * Structure: container, title, subtitle, box_container, box, number, label, separator
5 */
6
7 import comingSoon from '../../../asset/img/badge-images/badge/comingSoon.svg';
8 import textHighlight1 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight1.svg';
9 import textHighlight11 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight11.svg';
10 import textHighlight12 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight12.svg';
11 import textHighlight13 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight13.svg';
12 import textHighlight14 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight14.svg';
13 import textHighlight2 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight2.svg';
14 import textHighlight3 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight3.svg';
15 import textHighlight4 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight4.svg';
16 import textHighlight5 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight5.svg';
17 import textHighlight6 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight6.svg';
18 import textHighlight7 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight7.svg';
19 import textHighlight8 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight8.svg';
20 import textHighlight9 from '../../../asset/img/badge-images/badge/text-highlight/textHighlight9.svg';
21
22 export const TextHighlightImg = {
23 editable: {
24 design1: textHighlight7,
25 design2: textHighlight13,
26 design3: textHighlight12,
27 design4: textHighlight11,
28 design5: textHighlight14,
29 design6: textHighlight9,
30 },
31 value_editable: {
32 preview: {
33 design1: textHighlight1,
34 design2: textHighlight2,
35 design3: textHighlight3,
36 design4: textHighlight4,
37 design5: textHighlight5,
38 design6: textHighlight6,
39 design7: textHighlight8,
40 },
41 },
42
43 comingSoon,
44 };
45
46 const VALUE_EDITABLE_TEXT_HIGHLIGHT_IMG_DIR =
47 DISCO.DISCO_BADGE_IMAGES_DIR +
48 '/badge-images/badge/text-highlight/value-editable/';
49
50 // Default selected design ID
51 export const DEFAULT_TEXT_HIGHLIGHT_DESIGN = 'editable_design1';
52
53 const { editable, value_editable } = TextHighlightImg;
54
55 export const textHighlightDesign = {
56 editable: [
57 // DESIGN 1
58 {
59 id: 'editable_design1',
60 name: 'Big savings',
61 isDefault: true,
62 hasSeparator: false,
63 singleContainer: false,
64 // Main container styles
65 image: {
66 url: editable.design1,
67 },
68 container: {
69 width: '180px',
70 height: '40px',
71 display: 'flex',
72 padding: '5px 20px',
73 alignItems: 'center',
74 justifyContent: 'center',
75 'background-color': 'rgb(146, 81, 227)',
76 'border-color': '#fff',
77 'border-width': '0px',
78 radius: {
79 'top-left': 0,
80 'top-right': 0,
81 'bottom-right': 0,
82 'bottom-left': 0,
83 },
84 'border-style': 'solid',
85 clipPath:
86 'polygon(100% 0%, 90% 50%, 100% 100%, 0% 100%, 10% 50%, 0% 0%)',
87 },
88 // Title styles
89 title: {
90 text: 'Big savings: [discounted_amount]',
91 color: '#FFFFFF',
92 'font-family': 'Manrope, sans-serif',
93 'font-size': '14px',
94 'font-weight': 600,
95 'text-align': 'center',
96 },
97 },
98
99 // DESIGN 2
100 {
101 id: 'editable_design2',
102 name: 'Holiday Offer',
103 isDefault: false,
104 hasSeparator: false,
105 singleContainer: true,
106 image: {
107 url: editable.design2,
108 },
109 // Main container styles
110 container: {
111 width: '180px',
112 height: '40px',
113 display: 'flex',
114 'justify-content': 'center',
115 'align-items': 'center',
116 padding: '5px 15px',
117 'background-color': 'rgba(240, 200, 8, 1)',
118 'border-color': '#fff',
119 'border-width': '0px',
120 radius: {
121 'top-left': '4px',
122 'top-right': '4px',
123 'bottom-right': '4px',
124 'bottom-left': '4px',
125 },
126 'border-style': 'solid',
127 'clip-path': 'polygon(15% 0%, 100% 0%, 85% 100%, 0% 100%)',
128 },
129 // Title styles
130 title: {
131 text: 'Holiday Offer',
132 color: '#000000',
133 'font-family': 'Manrope, sans-serif',
134 'font-size': '14px',
135 'font-weight': 700,
136 'text-align': 'center',
137 },
138 },
139
140 // DESIGN 3
141 {
142 id: 'editable_design3',
143 name: 'Instant off',
144 isDefault: false,
145 hasSeparator: false,
146 singleContainer: false,
147 // Main container styles
148 image: {
149 url: editable.design3,
150 },
151 container: {
152 width: '150px',
153 height: '40px',
154 display: 'flex',
155 'justify-content': 'center',
156 'align-items': 'center',
157 padding: '5px 15px',
158 'background-color': '#000000',
159 'border-color': '#fff',
160 'border-width': '0px',
161 radius: {
162 'top-left': '50px',
163 'top-right': '50px',
164 'bottom-right': '50px',
165 'bottom-left': '50px',
166 },
167 'border-style': 'solid',
168 },
169 // Title styles
170 title: {
171 text: 'Instant [discounted_amount] off',
172 color: '#FFFFFF',
173 'font-family': 'inherit',
174 'font-size': '14px',
175 'font-weight': 700,
176 'text-align': 'center',
177 },
178 },
179
180 // DESIGN 4
181 {
182 id: 'editable_design4',
183 name: 'Limited Stock',
184 isDefault: false,
185 hasSeparator: true,
186 singleContainer: false,
187 // Main container styles
188 image: {
189 url: editable.design4,
190 },
191 container: {
192 width: '150px',
193 height: '40px',
194 display: 'flex',
195 'justify-content': 'center',
196 'align-items': 'center',
197 padding: '5px 15px',
198 'background-color': 'rgba(255, 45, 83, 1)',
199 'border-color': '#fff',
200 'border-width': '0px',
201 radius: {
202 'top-left': '50px',
203 'top-right': 0,
204 'bottom-right': 0,
205 'bottom-left': '50px',
206 },
207 'border-style': 'solid',
208 },
209 // Title styles
210 title: {
211 text: 'Limited Stock',
212 color: '#FFFFFF',
213 'font-family': 'inherit',
214 'font-size': '14px',
215 'font-weight': 600,
216 'text-align': 'center',
217 },
218 },
219
220 // Design 5
221 {
222 id: 'editable_design5',
223 name: 'Limited Stock',
224 isDefault: false,
225 hasSeparator: true,
226 singleContainer: false,
227 // Main container styles
228 image: {
229 url: editable.design5,
230 },
231 container: {
232 width: '150px',
233 height: '40px',
234 display: 'flex',
235 'justify-content': 'center',
236 'align-items': 'center',
237 padding: '5px 15px',
238 'background-color': '#812DFF',
239 'border-color': '#fff',
240 'border-width': '0px',
241 radius: {
242 'top-left': '0px',
243 'top-right': '50px',
244 'bottom-right': '50px',
245 'bottom-left': '0px',
246 },
247 'border-style': 'solid',
248 },
249 // Title styles
250 title: {
251 text: 'Limited Stock',
252 color: '#FFFFFF',
253 'font-family': 'inherit',
254 'font-size': '14px',
255 'font-weight': 600,
256 'text-align': 'center',
257 },
258 },
259
260 // Design 6
261 {
262 id: 'editable_design6',
263 name: 'Save Instantly',
264 isDefault: false,
265 hasSeparator: true,
266 singleContainer: false,
267 // Main container styles
268 image: {
269 url: editable.design6,
270 },
271 container: {
272 width: '200px',
273 height: '40px',
274 display: 'flex',
275 'justify-content': 'center',
276 'align-items': 'center',
277 padding: '5px 15px',
278 'background-color': '',
279 'border-color': '',
280 'border-width': '0px',
281 radius: {
282 'top-left': '0px',
283 'top-right': '0px',
284 'bottom-right': '0px',
285 'bottom-left': '0px',
286 },
287 'border-style': 'solid',
288 },
289 // Title styles
290 title: {
291 text: '💰 Save Instantly [discounted_percentage]',
292 color: '#000',
293 'font-family': '',
294 'font-size': '14px',
295 'font-weight': 400,
296 'text-align': 'center',
297 },
298 },
299 ],
300
301 // Only value Editable designs
302 value_editable: [
303 // DESIGN 1
304 {
305 id: 'value_editable_design1',
306 name: 'Special Offer',
307 isDefault: true,
308 hasSeparator: false,
309 singleContainer: true,
310 // Main container styles
311 image: {
312 url: value_editable.preview.design1,
313 },
314 design: {
315 url: VALUE_EDITABLE_TEXT_HIGHLIGHT_IMG_DIR + 'img1.svg',
316 },
317 container: {
318 position: 'relative',
319 width: '180px',
320 'min-height': '30px',
321 margin: '10px 0px',
322 },
323 // Title styles
324 title: {
325 text: '[discounted_percentage]',
326 position: 'absolute',
327 left: '26px',
328 top: '6px',
329 'font-weight': 800,
330 'font-size': '20px',
331 'font-family': 'Impact, sans-serif',
332 },
333 },
334 // DESIGN 2
335 {
336 id: 'value_editable_design2',
337 name: 'Special Offer',
338 isDefault: false,
339 hasSeparator: false,
340 singleContainer: true,
341 // Main container styles
342 image: {
343 url: value_editable.preview.design2,
344 },
345 design: {
346 url: VALUE_EDITABLE_TEXT_HIGHLIGHT_IMG_DIR + 'img2.svg',
347 },
348 container: {
349 position: 'relative',
350 width: '180px',
351 'min-height': '30px',
352 margin: '10px 0px',
353 },
354 // Title styles
355 title: {
356 text: '[discounted_percentage]',
357 position: 'absolute',
358 left: '10px',
359 top: '8px',
360 'font-weight': 600,
361 'font-size': '14px',
362 'font-family': 'Poppins, sans-serif',
363 color: '#FFFFFF',
364 },
365 },
366
367 // DESIGN 3
368 {
369 id: 'value_editable_design3',
370 name: 'Biggest Sale',
371 isDefault: false,
372 hasSeparator: false,
373 singleContainer: true,
374 // Main container styles
375 image: {
376 url: value_editable.preview.design3,
377 },
378 design: {
379 url: VALUE_EDITABLE_TEXT_HIGHLIGHT_IMG_DIR + 'img3.svg',
380 },
381 container: {
382 position: 'relative',
383 width: '180px',
384 'min-height': '30px',
385 margin: '10px 0px',
386 },
387 // Title styles
388 title: {
389 text: '[discounted_percentage]',
390 position: 'absolute',
391 left: '20px',
392 top: '33px',
393 'font-weight': 600,
394 'font-size': '18px',
395 'font-family': 'Poppins, sans-serif',
396 color: '#000',
397 },
398 },
399
400 // DESIGN 4
401 {
402 id: 'value_editable_design4',
403 name: 'Special Offer',
404 isDefault: false,
405 hasSeparator: false,
406 singleContainer: true,
407 // Main container styles
408 image: {
409 url: value_editable.preview.design4,
410 },
411 design: {
412 url: VALUE_EDITABLE_TEXT_HIGHLIGHT_IMG_DIR + 'img4.svg',
413 },
414 container: {
415 position: 'relative',
416 width: '200px',
417 'min-height': '30px',
418 margin: '10px 0px',
419 },
420 // Title styles
421 title: {
422 text: '[discounted_percentage]',
423 position: 'absolute',
424 left: '133px',
425 top: '0',
426 'font-weight': 500,
427 'font-size': '16px',
428 'font-family': 'Poppins, sans-serif',
429 color: '#fff',
430 },
431 },
432
433 // DESIGN 5
434 {
435 id: 'value_editable_design5',
436 name: 'Special Offer',
437 isDefault: false,
438 hasSeparator: false,
439 singleContainer: true,
440 // Main container styles
441 image: {
442 url: value_editable.preview.design5,
443 },
444 design: {
445 url: VALUE_EDITABLE_TEXT_HIGHLIGHT_IMG_DIR + 'img5.svg',
446 },
447 container: {
448 position: 'relative',
449 width: '200px',
450 'min-height': '30px',
451 margin: '10px 0px',
452 },
453 // Title styles
454 title: {
455 text: '[discounted_percentage]',
456 position: 'absolute',
457 left: '4px',
458 top: '3px',
459 'font-weight': 600,
460 'font-size': '16px',
461 'font-family': 'Impact, sans-serif',
462 color: '#000',
463 },
464 },
465
466 // DESIGN 6
467 {
468 id: 'value_editable_design6',
469 name: 'Special Offer',
470 isDefault: false,
471 hasSeparator: false,
472 singleContainer: true,
473 // Main container styles
474 image: {
475 url: value_editable.preview.design6, //Image use for items preview. It's not store in global state.
476 },
477 design: {
478 url: VALUE_EDITABLE_TEXT_HIGHLIGHT_IMG_DIR + 'img6.svg', //This image url used for design real time preview. It's store in global state as well as database.
479 },
480 container: {
481 position: 'relative',
482 width: '180px',
483 'min-height': '30px',
484 margin: '10px 0px',
485 },
486 // Title styles
487 title: {
488 text: '[discounted_amount]',
489 position: 'absolute',
490 left: '125px',
491 top: '3px',
492 'font-weight': 600,
493 'font-size': '20px',
494 'font-family': 'Impact, sans-serif',
495 color: '#000',
496 },
497 },
498 ],
499 image: {
500 id: '',
501 url: '',
502 container: {
503 'max-width': '150px',
504 margin: '10px 0px',
505 },
506 },
507 };
508
509 export default textHighlightDesign;
510