PluginProbe
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO / 1.4.17
Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO v1.4.17
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 / count-down.js

count-down.js in Discount Rules for WooCommerce – Disco | Dynamic Pricing, Conditions, Bulk, Bundle, BOGO 1.4.17, at backend/views/components/Main/utilities/count-down.js

397 lines 8.6 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 import countDown1 from '../../../asset/img/badge-images/countdown/countDown1.svg';
2 import countDown2 from '../../../asset/img/badge-images/countdown/countDown2.svg';
3 import countDown3 from '../../../asset/img/badge-images/countdown/countDown3.svg';
4 import countDown4 from '../../../asset/img/badge-images/countdown/countDown4.svg';
5
6 const CountDownImg = {
7 countDown1,
8 countDown2,
9 countDown3,
10 countDown4,
11 };
12
13 /**
14 * Pre-made countdown timer designs
15 * Each design contains CSS properties for easy PHP HTML generation
16 * Structure: container, title, subtitle, box_container, box, number, label, separator
17 */
18
19 // Default selected design ID
20 export const DEFAULT_COUNTDOWN_DESIGN = 'design4';
21
22 export const countdownDesigns = {
23 // ------------------- DESIGN 4 - Multi Gradient (Default) -------------------
24 design4: {
25 id: 'design4',
26 name: 'Multi Gradient',
27 isDefault: true,
28 hasSeparator: false,
29 singleContainer: false,
30 // Main container styles
31 container: {
32 background:
33 'linear-gradient(90deg, #F39177 0%, #F61F48 35.5%, #A758EE 69%, #86C5FE 100%)',
34 'border-radius': '6px',
35 padding: '12px 16px',
36 'max-width': '370px',
37 border: 0,
38 'border-color': 'FFFFFF',
39 },
40 // Title styles
41 title: {
42 text: 'Exclusive Deals',
43 color: '#FFFFFF',
44 'font-family': 'inherit',
45 'font-size': '14px',
46 'font-weight': 600,
47 'font-style': 'normal',
48 'text-align': 'center',
49 margin: '0',
50 },
51 // Subtitle styles
52 subtitle: {
53 text: 'Available for a limited time only!',
54 color: '#FFFFFF',
55 'font-family': 'inherit',
56 'font-size': '12px',
57 'font-weight': 400,
58 'font-style': 'normal',
59 'text-align': 'center',
60 margin: '4px 0 0 0',
61 },
62 // Box container (wrapper for all time boxes)
63 box_container: {
64 display: 'flex',
65 'flex-wrap': 'wrap',
66 'justify-content': 'center',
67 'align-items': 'center',
68 gap: '6px',
69 'margin-top': '8px',
70 },
71 // Individual time box styles
72 box: {
73 background: '#FFFFFF',
74 'border-radius': '2px',
75 padding: '8px 12px',
76 'min-width': '60px',
77 display: 'flex',
78 'flex-direction': 'column',
79 'align-items': 'center',
80 'justify-content': 'center',
81 flex: '1 1 auto',
82 },
83 // Number styles (countdown digits)
84 number: {
85 color: '#FF4133',
86 'font-family': 'inherit',
87 'font-size': '20px',
88 'font-weight': 700,
89 'line-height': '1.2',
90 },
91 // Label styles (DAYS, HOURS, etc.)
92 label: {
93 color: '#1A1D1F',
94 'font-family': 'inherit',
95 'font-size': '9px',
96 'font-weight': 400,
97 'margin-top': '2px',
98 'text-transform': 'uppercase',
99 },
100 // Separator styles (colon between boxes)
101 separator: {
102 color: '#FFFFFF',
103 'font-size': '20px',
104 'font-weight': 700,
105 padding: '0 2px',
106 display: 'flex',
107 'align-items': 'center',
108 },
109
110 // preview image
111 image: {
112 url: CountDownImg.countDown4,
113 },
114 },
115
116 // ------------------- DESIGN 1 - Dark Blue -------------------
117 design1: {
118 id: 'design1',
119 name: 'Dark Blue',
120 isDefault: false,
121 hasSeparator: false,
122 singleContainer: true,
123 // Main container styles
124 container: {
125 background: '#FF5501',
126 'border-radius': '6px',
127 padding: '12px 16px',
128 'max-width': '370px',
129 border: 0,
130 'border-color': 'FF5501',
131 },
132 // Title styles
133 title: {
134 text: 'Exclusive Deals',
135 color: '#FFFFFF',
136 'font-family': 'inherit',
137 'font-size': '14px',
138 'font-weight': 600,
139 'font-style': 'normal',
140 'text-align': 'center',
141 margin: '0',
142 },
143 // Subtitle styles
144 subtitle: {
145 text: 'Limited time only!',
146 color: '#FFFFFF',
147 'font-family': 'inherit',
148 'font-size': '12px',
149 'font-weight': 400,
150 'font-style': 'normal',
151 'text-align': 'center',
152 margin: '4px 0 0 0',
153 },
154 // Box container (single white container for all counters)
155 box_container: {
156 display: 'flex',
157 'flex-wrap': 'wrap',
158 'justify-content': 'center',
159 'align-items': 'center',
160 gap: '4px',
161 'margin-top': '8px',
162 background: '#FFFFFF',
163 'border-radius': '4px',
164 padding: '8px',
165 },
166 // Individual time box styles (no background since container has it)
167 box: {
168 background: '#FFFFFF',
169 'border-radius': '0',
170 padding: '4px 8px',
171 'min-width': '60px',
172 display: 'flex',
173 'flex-direction': 'column',
174 'align-items': 'center',
175 'justify-content': 'center',
176 flex: '1 1 auto',
177 },
178 // Number styles
179 number: {
180 color: '#1A1D1F',
181 'font-family': 'inherit',
182 'font-size': '20px',
183 'font-weight': 700,
184 'line-height': '1.2',
185 },
186 // Label styles
187 label: {
188 color: '#1A1D1F',
189 'font-family': 'inherit',
190 'font-size': '9px',
191 'font-weight': 400,
192 'margin-top': '2px',
193 'text-transform': 'uppercase',
194 },
195 // Separator styles
196 separator: {
197 color: '#FFFFFF',
198 'font-size': '20px',
199 'font-weight': 700,
200 padding: '0 2px',
201 display: 'flex',
202 'align-items': 'center',
203 },
204
205 // preview image
206 image: {
207 url: CountDownImg.countDown3,
208 },
209 },
210
211 // ------------------- DESIGN 2 - Purple Gradient with Border -------------------
212 design2: {
213 id: 'design2',
214 name: 'Dark',
215 isDefault: false,
216 hasSeparator: false,
217 singleContainer: false,
218 // Main container styles
219 container: {
220 background: '#0F2846',
221 'border-radius': '6px',
222 padding: '12px 16px',
223 'max-width': '370px',
224 border: 1,
225 'border-color': '#0F2846',
226 },
227 // Title styles
228 title: {
229 text: 'Premium Collection',
230 color: '#FFFFFF',
231 'font-family': 'inherit',
232 'font-size': '14px',
233 'font-weight': 600,
234 'font-style': 'normal',
235 'text-align': 'center',
236 margin: '0',
237 },
238 // Subtitle styles
239 subtitle: {
240 text: 'For a limited time only!',
241 color: '#FFFFFF',
242 'font-family': 'inherit',
243 'font-size': '12px',
244 'font-weight': 400,
245 'font-style': 'normal',
246 'text-align': 'center',
247 margin: '4px 0 0 0',
248 },
249 // Box container
250 box_container: {
251 display: 'flex',
252 'flex-wrap': 'wrap',
253 'justify-content': 'center',
254 'align-items': 'center',
255 gap: '6px',
256 'margin-top': '8px',
257 },
258 // Individual time box styles
259 box: {
260 background: '#0091FF',
261 'border-radius': '2px',
262 padding: '8px 12px',
263 'min-width': '60px',
264 display: 'flex',
265 'flex-direction': 'column',
266 'align-items': 'center',
267 'justify-content': 'center',
268 flex: '1 1 auto',
269 },
270 // Number styles
271 number: {
272 color: '#FFFFFF',
273 'font-family': 'inherit',
274 'font-size': '20px',
275 'font-weight': 700,
276 'line-height': '1.2',
277 },
278 // Label styles
279 label: {
280 color: '#FFFFFF',
281 'font-family': 'inherit',
282 'font-size': '9px',
283 'font-weight': 400,
284 'margin-top': '2px',
285 'text-transform': 'uppercase',
286 },
287 // Separator styles
288 separator: {
289 color: '#FFFFFF',
290 'font-size': '20px',
291 'font-weight': 700,
292 padding: '0 2px',
293 display: 'flex',
294 'align-items': 'center',
295 },
296
297 // preview image
298 image: {
299 url: CountDownImg.countDown1,
300 },
301 },
302
303 // ------------------- DESIGN 3 - Orange with Colon Separators -------------------
304 design3: {
305 id: 'design3',
306 name: 'Orange',
307 isDefault: false,
308 hasSeparator: true,
309 singleContainer: false,
310 // Main container styles
311 container: {
312 background: '#BD51FE',
313 'border-radius': '6px',
314 padding: '12px 16px',
315 'max-width': '370px',
316 border: 0,
317 'border-color': 'BD51FE',
318 },
319 // Title styles
320 title: {
321 text: 'Elite Selection',
322 color: '#FFFFFF',
323 'font-family': 'inherit',
324 'font-size': '14px',
325 'font-weight': 600,
326 'font-style': 'normal',
327 'text-align': 'center',
328 margin: '0',
329 },
330 // Subtitle styles
331 subtitle: {
332 text: "Catch it before it's gone!",
333 color: '#FFFFFF',
334 'font-family': 'inherit',
335 'font-size': '12px',
336 'font-weight': 400,
337 'font-style': 'normal',
338 'text-align': 'center',
339 margin: '4px 0 0 0',
340 },
341 // Box container
342 box_container: {
343 display: 'flex',
344 'flex-wrap': 'wrap',
345 'justify-content': 'center',
346 'align-items': 'center',
347 gap: '0',
348 'margin-top': '8px',
349 },
350 // Individual time box styles
351 box: {
352 background: '#FFFFFF',
353 'border-radius': '2px',
354 padding: '8px 12px',
355 'min-width': '60px',
356 display: 'flex',
357 'flex-direction': 'column',
358 'align-items': 'center',
359 'justify-content': 'center',
360 flex: '1 1 auto',
361 },
362 // Number styles
363 number: {
364 color: '#BD51FE',
365 'font-family': 'inherit',
366 'font-size': '20px',
367 'font-weight': 700,
368 'line-height': '1.2',
369 },
370 // Label styles
371 label: {
372 color: '#BD51FE',
373 'font-family': 'inherit',
374 'font-size': '9px',
375 'font-weight': 400,
376 'margin-top': '2px',
377 'text-transform': 'uppercase',
378 },
379 // Separator styles (visible colons)
380 separator: {
381 color: '#FFFFFF',
382 'font-size': '20px',
383 'font-weight': 700,
384 padding: '0 4px',
385 display: 'flex',
386 'align-items': 'center',
387 },
388
389 // preview image
390 image: {
391 url: CountDownImg.countDown2,
392 },
393 },
394 };
395
396 export default CountDownImg;
397