PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.12.3
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.12.3
1.8.13.1 1.8.13 1.8.12.3 1.8.12.2 1.8.12.1 1.8.12 1.8.11.3 1.8.11.2 1.8.11.1 1.8.11 1.6.6 1.6.60 1.6.7 1.6.8 1.6.9 1.7.0 1.7.0.1 1.7.0.11 1.7.0.12 1.7.0.14 1.7.0.2 1.7.0.3 1.7.0.5 1.7.0.6 1.7.0.7 All 212 releases
charitable / includes / css-templates / admin / disaster-relief.php

disaster-relief.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.12.3, at includes/css-templates/admin/disaster-relief.php

480 lines 15.0 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 // Exit if accessed directly.
4 if ( ! defined( 'ABSPATH' ) ) {
5 exit;
6 }
7
8 /**
9 * Display custom CSS.
10 *
11 * @package Charitable
12 * @author WP Charitable LLC
13 * @since 1.8.0
14 * @version 1.8.3.7
15 */
16
17 header( 'Content-type: text/css; charset: UTF-8' );
18
19 if ( ! function_exists( 'charitable_sanitize_hex_color' ) ) {
20 /**
21 * Sanitize a hex color.
22 *
23 * @param string $color The color to sanitize.
24 * @return string|null The sanitized color or null if the color is invalid.
25 */
26 function charitable_sanitize_hex_color( $color ) {
27 // Ensure the value is a string.
28 $color = trim( $color );
29
30 // Check if it's a valid 6-character hex color including the hash.
31 if ( preg_match( '/^#[a-fA-F0-9]{6}$/', $color ) ) {
32 return $color;
33 }
34
35 // Optionally return a default color or handle errors.
36 return null; // Or return default color.
37 }
38 }
39
40 if ( ! function_exists( 'charitable_esc_attr_php' ) ) {
41 /**
42 * Escapes a string for use in PHP.
43 *
44 * @param string $text The text to escape.
45 * @return string The escaped text.
46 */
47 function charitable_esc_attr_php( $text ) {
48 return htmlspecialchars( $text, ENT_QUOTES, 'UTF-8' );
49 }
50 }
51
52 // @codingStandardsIgnoreStart
53
54 $primary = isset( $_GET['p'] ) ? '#' . preg_replace("/[^A-Za-z0-9 ]/", '', $_GET['p'] ) : '#9F190E';
55 $secondary = isset( $_GET['s'] ) ? '#' . preg_replace("/[^A-Za-z0-9 ]/", '', $_GET['s'] ) : '#202020';
56 $tertiary = isset( $_GET['t'] ) ? '#' . preg_replace("/[^A-Za-z0-9 ]/", '', $_GET['t'] ) : '#FFFFFF';
57 $button = isset( $_GET['b'] ) ? '#' . preg_replace("/[^A-Za-z0-9 ]/", '', $_GET['b'] ) : '#9F190E';
58
59 $slug = 'disaster-relief'; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variable used in CSS selectors.
60 $wrapper = '.charitable-preview.charitable-builder-template-' . $slug . ' #charitable-design-wrap .charitable-campaign-preview'; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variable used in CSS selectors.
61
62 ?>
63
64 .charitable-preview.charitable-builder-template-<?php echo $slug; ?> { /* everything wraps in this */
65
66 font-family: -apple-system, BlinkMacSystemFont, sans-serif;
67
68 }
69
70 /* this narrows things down a little to the preview area header/tabs */
71
72 <?php echo charitable_esc_attr_php( $wrapper ); ?> {
73 /* field items in preview area */
74 }
75 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field {
76 display: flex;
77 }
78 /* wide spread changes in header vs tabs */
79
80 <?php echo charitable_esc_attr_php( $wrapper ); ?> header {
81 background-color: <?php echo $tertiary; ?>;
82 color: #606060;
83 }
84 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h1,
85 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h2,
86 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h3,
87 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h4,
88 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h5,
89 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h6 {
90 color: <?php echo $secondary; ?>
91 }
92 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h1,
93 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h2,
94 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h3,
95 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h4,
96 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h5,
97 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h6 {
98 color: <?php echo $primary; ?>;
99 }
100
101 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content > * {
102 color: black;
103 }
104
105 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h5 {
106 font-size: 24px;
107 line-height: 28px;
108 }
109
110 <?php echo charitable_esc_attr_php( $wrapper ); ?> .placeholder {
111 padding: 0;
112 }
113
114 /* aligns */
115
116 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-left > div,
117 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-left img.charitable-campaign-builder-preview-photo {
118 margin-left: 0;
119 margin-right: auto;
120 }
121 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-center > div,
122 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-center img.charitable-campaign-builder-preview-photo {
123 margin-left: auto;
124 margin-right: auto;
125 }
126 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-right > div,
127 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-right img.charitable-campaign-builder-preview-photo {
128 margin-left: auto;
129 margin-right: 0;
130 }
131
132
133
134 /* column specifics */
135
136 <?php echo charitable_esc_attr_php( $wrapper ); ?> .column[data-column-id="0"] {
137 flex: 0 0 66%;
138 }
139 <?php echo charitable_esc_attr_php( $wrapper ); ?> .column[data-column-id="1"] {
140 border: 1px solid #ECECEC;
141 }
142
143 /* headlines in general */
144 <?php echo charitable_esc_attr_php( $wrapper ); ?> h5.charitable-field-preview-headline {
145 color: <?php echo $primary; ?>;
146 }
147
148 /* field: campaign title */
149
150 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-campaign-title h1 {
151 margin: 5px 0 5px 0;
152 color: <?php echo $primary; ?>;
153 font-size: 27px;
154 line-height: 29px;
155 font-weight: 600;
156 }
157
158 /* field: campaign description */
159
160 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-campaign-description .charitable-campaign-builder-placeholder-preview-text {
161 padding: 0;
162 color: #202020;
163 }
164
165
166 /* field: text */
167
168 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-text .charitable-campaign-builder-placeholder-preview-text {
169 padding: 0;
170 color: #202020;
171 }
172 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-text h5.charitable-field-preview-headline {
173 color: <?php echo $primary; ?>;
174 }
175
176
177 /* field: button */
178
179 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-donate-button .charitable-field-preview-donate-button span.placeholder.button {
180 background-color: <?php echo $button; ?> !important;
181 border-color: <?php echo $button; ?> !important;
182 text-transform: uppercase;
183 border-radius: 35px;
184 margin-top: 0;
185 margin-bottom: 0;
186 width: 100%;
187 font-weight: 400;
188 min-height: 50px;
189 height: 50px;
190 font-size: 16px;
191 line-height: 50px;
192 }
193
194 /* field: photo */
195
196 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-photo .primary-image {
197 border: transparent;
198 border-radius: 0px;
199 }
200
201 <?php echo charitable_esc_attr_php( $wrapper ); ?> .primary-image-container {
202 margin: 0;
203 padding: 0;
204 }
205
206 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content .primary-image-container {
207 margin: 0;
208 padding: 0;
209 }
210
211 <?php echo charitable_esc_attr_php( $wrapper ); ?> img.charitable-campaign-builder-preview-photo {
212 max-width: 100%;
213 display: block;
214 }
215
216
217
218 /* field: progress bar */
219
220 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar-info-row div.campaign-percent-raised {
221 color: #202020;
222 font-weight: 500;
223 font-size: 18px;
224 line-height: 21px;
225 }
226 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar-info-row div.campaign-goal {
227 color: <?php echo $primary; ?>;
228 font-weight: 600;
229 font-size: 24px;
230 line-height: 28px;
231 }
232 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress {
233 border: 0;
234 padding: 0;
235 background-color: #E0E0E0;
236 border-radius: 5px;
237 margin-top: 15px;
238 }
239 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar {
240 background-color: <?php echo $primary; ?>;
241 height: 8px !important;
242 border-radius: 5px;
243 text-align: right;
244 opacity: 1.0;
245 }
246 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar span {
247 display: inline-block;
248 background-color: <?php echo $primary; ?>;
249 border-radius: 25px;
250 width: 25px;
251 height: 25px;
252 margin-right: -15px;
253 margin-top: -10px;
254 }
255
256 /* field: social linking */
257
258 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking {
259 display: table;
260 }
261
262 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-field-preview-social-linking-headline-container {
263 display: block;
264 float: left;
265 padding: 0;
266 }
267 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-field-row {
268 display: block;
269 float: left;
270 width: auto;
271 margin: 0 0 0 0;
272 }
273 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking h5.charitable-field-preview-headline {
274 font-size: 14px;
275 line-height: 16px;
276 color: #24231E;
277 font-weight: 300;
278 margin: 0 15px 0 0;
279 padding: 5px;
280 }
281 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-placeholder {
282 padding: 10px;
283 }
284
285 /* field: social sharing */
286
287 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing {
288 display: table;
289 }
290
291 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-field-preview-social-sharing-headline-container {
292 display: block;
293 float: left;
294 padding: 0;
295 }
296 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-field-row {
297 display: block;
298 float: left;
299 width: auto;
300 margin: 0 0 0 0;
301 }
302 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing h5.charitable-field-preview-headline {
303 font-size: 14px;
304 line-height: 16px;
305 color: #24231E;
306 font-weight: 300;
307 margin: 0 15px 0 0;
308 padding: 5px;
309 }
310 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-placeholder {
311 padding: 10px;
312 }
313
314 /* field: campaign summary */
315
316 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary {
317 padding-left: 0;
318 padding-right: 0;
319 }
320 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary div {
321 color: #92918E;
322 font-weight: 400;
323 font-size: 14px;
324 line-height: 16px;
325 }
326 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary div span {
327 color: <?php echo $secondary; ?>;
328 font-weight: 600;
329 font-size: 32px;
330 line-height: 38px;
331 }
332 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary .campaign-summary-item {
333 border: 0;
334 margin-top: 5px;
335 margin-bottom: 5px;
336 }
337
338 /* field: donate amount */
339
340 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount label,
341 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount input.custom-donation-input[type="text"] {
342 color: <?php echo $secondary; ?>;
343 border: 1px solid <?php echo $secondary; ?> !important;
344 }
345 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount ul li.suggested-donation-amount.selected {
346 background-color: <?php echo $primary; ?>;
347 }
348 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount ul li.suggested-donation-amount.selected span.amount {
349 color: <?php echo $tertiary; ?>;
350 }
351
352 /* tabs: tab nav */
353
354 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav {
355 border: 1px solid transparent;
356 background-color: transparent;
357 width: auto;
358 margin-left: 0;
359 margin-right: 0;
360 }
361 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li {
362 border-top: 0;
363 border-right: 0;
364 border-bottom: 0;
365 border-left: 0;
366 background-color: transparent;
367 margin: 0 10px 0 0;
368 }
369 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li a {
370 color: black;
371 display: block;
372 text-transform: none;
373 }
374 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li.active {
375 background-color: <?php echo $primary; ?>;
376 color: white;
377 text-decoration: none;
378 }
379 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li:hover {
380 background-color: <?php echo $primary; ?>;
381 color: white;
382 text-decoration: none;
383 filter: brightness(90%);
384 }
385 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li.active a,
386 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li:hover a {
387 color: white;
388 }
389
390 /* tabs: style */
391
392 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li {
393
394 }
395 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li a {
396
397 }
398 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li {
399
400 }
401 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li a {
402
403 }
404 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li {
405 background-color: transparent;
406 border-top: 0;
407 border-right: 0;
408 border-left: 0;
409 }
410 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li:hover {
411 background-color: transparent;
412 border-bottom: 1px solid <?php echo $button; ?> !important;
413 }
414 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li:hover a {
415 color: black;
416 }
417 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li.active {
418 background-color: transparent;
419 }
420 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li a {
421 color: <?php echo $primary; ?>;
422 border-top: 0;
423 border-right: 0;
424 border-left: 0;
425 }
426 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li.active {
427 border-bottom: 1px solid <?php echo $button; ?> !important;
428 }
429
430 /* tabs: sized */
431
432 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-small li {
433
434 }
435 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-small li a {
436 font-weight: 500;
437 font-size: inherit;
438 line-height: inherit;
439 }
440 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-medium li {
441
442 }
443 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-medium li a {
444 font-weight: 500;
445 font-size: inherit;
446 line-height: inherit;
447 }
448 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-large li {
449
450 }
451 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-large li a {
452 font-weight: 500;
453 font-size: inherit;
454 line-height: inherit;
455 }
456 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-small li {
457 font-size:10px;
458 padding:0
459 }
460 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-small li a {
461 font-size:16px;
462 padding:18px
463 }
464 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-medium li {
465 font-size:14px;
466 padding:0
467 }
468 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-medium li a {
469 font-size:21px;
470 padding:23px
471 }
472 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-large li {
473 font-size:21px;
474 padding:0
475 }
476 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-large li a {
477 font-size:30px;
478 padding:32px
479 }
480 // @codingStandardsIgnoreEnd