PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.11
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.11
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 1.7.0.9 All 211 releases
charitable / includes / css-templates / admin / simple-1-col.php

simple-1-col.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.11, at includes/css-templates/admin/simple-1-col.php

574 lines 18.2 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'] ) : '#000000';
55 $secondary = isset( $_GET['s'] ) ? '#' . preg_replace("/[^A-Za-z0-9 ]/", '', $_GET['s'] ) : '#2B66D1';
56 $tertiary = isset( $_GET['t'] ) ? '#' . preg_replace("/[^A-Za-z0-9 ]/", '', $_GET['t'] ) : '#F99E36';
57 $button = isset( $_GET['b'] ) ? '#' . preg_replace("/[^A-Za-z0-9 ]/", '', $_GET['b'] ) : '#5AA152';
58
59 $slug = 'simple-1-col'; // 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 $wrapper_no_fields = '.charitable-preview.charitable-builder-template-' . $slug . ' #charitable-design-wrap.no-fields-mode .charitable-campaign-preview'; // phpcs:ignore WordPress.NamingConventions.PrefixAllGlobals.NonPrefixedVariableFound -- Template variable used in CSS selectors.
62
63 ?>
64
65 .charitable-preview.charitable-builder-template-<?php echo $slug; ?> { /* everything wraps in this */
66
67 font-family: -apple-system, BlinkMacSystemFont, sans-serif;
68
69 }
70
71 /* this narrows things down a little to the preview area header/tabs */
72
73 <?php echo charitable_esc_attr_php( $wrapper ); ?> {
74 /* field items in preview area */
75 font-family: -apple-system, BlinkMacSystemFont, sans-serif;
76 }
77
78 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field {
79 display: flex;
80 }
81
82 /* wide spread changes in header vs tabs */
83
84 <?php echo charitable_esc_attr_php( $wrapper ); ?> > header {
85 margin-bottom: 40px;
86 font-size: 40px;
87 line-height: 70px;
88 font-weight: 600;
89 }
90 <?php echo charitable_esc_attr_php( $wrapper ); ?> h1:empty,
91 <?php echo charitable_esc_attr_php( $wrapper ); ?> h2:empty,
92 <?php echo charitable_esc_attr_php( $wrapper ); ?> h3:empty,
93 <?php echo charitable_esc_attr_php( $wrapper ); ?> h4:empty,
94 <?php echo charitable_esc_attr_php( $wrapper ); ?> h5:empty,
95 <?php echo charitable_esc_attr_php( $wrapper ); ?> h6:empty {
96 display: none;
97 }
98 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h1,
99 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h2,
100 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h3,
101 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h4,
102 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h5,
103 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h6 {
104
105 }
106 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h1,
107 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h2,
108 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h3,
109 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h4,
110 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h5,
111 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h6 {
112
113 }
114
115 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content > * {
116 color: black;
117 }
118
119 <?php echo charitable_esc_attr_php( $wrapper ); ?> header h5 {
120 font-size: 18px;
121 line-height: 21px;
122 font-weight: 500;
123 }
124
125 <?php echo charitable_esc_attr_php( $wrapper ); ?> .placeholder {
126 padding-left: 0;
127 padding-right: 0;
128 padding-top: 0;
129 padding-bottom: 0;
130 }
131
132 <?php echo charitable_esc_attr_php( $wrapper ); ?> > .charitable-preview-header .charitable-field-wrap.charitable-field-target{
133 min-height: 150px;
134 }
135 <?php echo charitable_esc_attr_php( $wrapper ); ?> > .charitable-preview-row .charitable-field-wrap.charitable-field-target {
136 min-height: 600px;
137 }
138
139 /* aligns */
140
141 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-left > div {
142 margin-left: 0;
143 margin-right: auto;
144 display: table;
145 width: 100%;
146 }
147 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-center > div {
148 margin-left: auto;
149 margin-right: auto;
150 display: table;
151 width: 100%;
152 }
153 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-right > div {
154 margin-left: auto;
155 margin-right: 0;
156 display: table;
157 width: 100%;
158 }
159
160 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-left div.charitable-field-campaign-title,
161 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-center div.charitable-field-campaign-title,
162 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-right div.charitable-field-campaign-title {
163 width: auto;
164 }
165
166 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-left .donation-wall h5,
167 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-left .donation-wall ol {
168 text-align: left;
169 }
170 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-center .donation-wall h5,
171 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-center .donation-wall ol {
172 text-align: center;
173 }
174 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-right .donation-wall h5,
175 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-right .donation-wall ol {
176 text-align: right;
177 }
178
179 /* column specifics */
180
181 <?php echo charitable_esc_attr_php( $wrapper ); ?> .column[data-column-id="0"] {
182 flex: 1;
183 border: 0;
184 padding-left: 0;
185 padding-top: 0;
186 padding-bottom: 0;
187 }
188 <?php echo charitable_esc_attr_php( $wrapper ); ?> .column[data-column-id="0"] .charitable-field-photo {
189 padding: 0;
190 margin: 0;
191 border: 0;
192 }
193 <?php echo charitable_esc_attr_php( $wrapper ); ?> .column[data-column-id="1"] {
194 flex: 1;
195 border: 0;
196 }
197
198 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-panel-fields .charitable-field-wrap {
199 padding-bottom: 0;
200 }
201
202 /* headlines in general */
203
204 <?php echo charitable_esc_attr_php( $wrapper ); ?> h5.charitable-field-preview-headline {
205
206 }
207
208 /* field: campaign title */
209
210 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-campaign-title h1 {
211 margin: 15px auto;
212 font-size: 72px;
213 line-height: 84px;
214 font-weight: 600;
215 }
216
217 /* field: campaign description */
218
219 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-campaign-description h5.charitable-field-preview-headline {
220 font-size: 27px;
221 line-height: 29px;
222 font-weight: 500;
223 }
224 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-campaign-description .charitable-campaign-builder-placeholder-preview-text {
225 padding: 0;
226 margin: 0;
227 color: #000000;
228 }
229 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-campaign-builder-no-description-preview div {
230 margin: 0;
231 float: none;
232 }
233
234
235 /* field: text */
236
237 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-text .charitable-campaign-builder-placeholder-preview-text {
238 padding: 0;
239 color: #202020;
240 }
241 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-text h5.charitable-field-preview-headline {
242
243 }
244
245 /* field: html */
246
247 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-html .placeholder {
248 padding: 0;
249 margin: 0;
250 }
251
252 /* field: button */
253
254 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-donate-button .charitable-field-preview-donate-button span.placeholder {
255 padding: 0;
256 }
257 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-donate-button .charitable-field-preview-donate-button span.placeholder.button {
258 text-transform: none;
259 border-radius: 0px;
260 margin-top: 0;
261 margin-bottom: 0;
262 width: 100%;
263 font-weight: 400;
264 min-height: 50px;
265 height: 50px;
266 font-size: 16px;
267 line-height: 50px;
268 }
269
270 /* field: photo */
271
272 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-photo .primary-image {
273 border: transparent;
274 border-radius: 0px;
275 }
276 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-photo .primary-image img {
277 max-width: 100%;
278 }
279 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content .charitable-field.charitable-field-photo .primary-image img {
280 border-radius: 0px;
281 }
282
283
284 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-photo .charitable-preview-align-center .primary-image-container {
285 text-align: center;
286 }
287 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-photo .charitable-preview-align-left .primary-image-container {
288 text-align: left;
289 }
290 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-photo .charitable-preview-align-right .primary-image-container {
291 text-align: right;
292 }
293
294 /* field: photo */
295
296 <?php echo charitable_esc_attr_php( $wrapper ); ?> header .primary-image-container {
297 margin: 0;
298 padding: 0;
299 }
300
301 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content .primary-image-container {
302 margin: 0;
303 padding: 0;
304 }
305
306 /* field: progress bar */
307
308 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar-info-row div.campaign-percent-raised {
309 color: <?php echo $primary; ?>;
310 font-weight: 400;
311 font-size: 18px;
312 line-height: 21px;
313 }
314 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar-info-row div.campaign-goal {
315 font-weight: 400;
316 font-size: 18px;
317 line-height: 21px;
318 }
319 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress {
320 border: 0;
321 padding: 0;
322 background-color: #E0E0E0;
323 border-radius: 5px;
324 margin-top: 15px;
325 }
326 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar {
327 background-color: <?php echo $secondary; ?>;
328 height: 8px !important;
329 border-radius: 5px;
330 text-align: right;
331 opacity: 1.0;
332 }
333 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar span {
334 display: inline-block;
335 border-radius: 25px;
336 width: 25px;
337 height: 25px;
338 margin-right: -15px;
339 margin-top: -10px;
340 }
341
342 /* field: social linking */
343
344 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking {
345 display: table;
346 width: auto !important;
347 }
348
349 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-field-preview-social-linking-headline-container {
350 display: block;
351 float: left;
352 padding: 0;
353 }
354 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-field-row {
355 display: block;
356 float: left;
357 width: auto;
358 margin: 0 0 0 0;
359 }
360 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking h5.charitable-field-preview-headline {
361 font-size: 14px;
362 line-height: 26px;
363 font-weight: 300;
364 margin: 0 20px 0 0;
365 padding: 0;
366 color: <?php echo $primary; ?>;
367 }
368 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-placeholder {
369 padding: 10px;
370 }
371 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-field-column {
372 padding-top: 10px;
373 }
374
375 /* field: social sharing */
376
377 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing {
378 display: table;
379 width: auto !important;
380 }
381
382 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-field-preview-social-sharing-headline-container {
383 display: block;
384 float: left;
385 padding: 0;
386 }
387 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-field-row {
388 display: block;
389 float: left;
390 width: auto;
391 margin: 0 0 0 0;
392 }
393 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing h5.charitable-field-preview-headline {
394 font-size: 14px;
395 line-height: 26px;
396 font-weight: 300;
397 margin: 0 20px 0 0;
398 padding: 0;
399 color: <?php echo $primary; ?>;
400 }
401 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-placeholder {
402 padding: 10px;
403 }
404
405 /* field: campaign summary */
406
407 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary {
408 padding-left: 0;
409 padding-right: 0;
410 }
411 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary div {
412 color: <?php echo $primary; ?>;
413 font-weight: 400;
414 font-size: 14px;
415 line-height: 16px;
416 }
417 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary div span {
418 color: <?php echo $secondary; ?>;
419 font-weight: 600;
420 font-size: 32px;
421 line-height: 38px;
422 }
423 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary .campaign-summary-item {
424 color: <?php echo $primary; ?>;
425 border: 0;
426 margin-top: 5px;
427 margin-bottom: 5px;
428 }
429
430 /* field: donate amount */
431
432 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount label,
433 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount input.custom-donation-input[type="text"] {
434 color: <?php echo $primary; ?>;
435 border: 1px solid <?php echo $primary; ?> !important;
436 }
437 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount ul li.suggested-donation-amount.selected {
438 border: 10px solid <?php echo $tertiary; ?>;
439 }
440 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount ul li.suggested-donation-amount.selected span.amount {
441 color: <?php echo $primary; ?>;
442 }
443
444 /* field: donate form */
445
446 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donation-form .charitable-form-placeholder {
447 width: 100%;
448 margin-left: auto;
449 margin-right: auto;
450 background-color: #f6f6f6;
451 height: auto;
452 max-height: auto;
453 min-height: 200px;
454 padding-top: 0;
455 padding-bottom: 0;
456 display: inline-block;
457 }
458
459 /* field: shortcode */
460
461 <?php echo charitable_esc_attr_php( $wrapper ); ?> .shortcode-preview {
462 padding-left: 10px;
463 padding-right: 10px;
464 }
465
466 /* tabs: container */
467
468 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-tab-container {
469 background-color: transparent;
470 margin-top: 0px;
471 }
472
473 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-tab-container .tab-content img {
474 max-width: 100%;
475 }
476 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-tab-container .tab-content > ul {
477 margin-left: 0;
478 margin-right: 0;
479 }
480
481 /* tabs: tab nav */
482
483 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav {
484 border: 1px solid transparent;
485 background-color: transparent;
486 width: auto;
487 margin-left: 0;
488 margin-right: 0;
489 }
490 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li {
491 border-top: 0;
492 border-right: 0;
493 border-bottom: 0;
494 border-left: 0;
495 background-color: transparent;
496 margin: 0 10px 0 0;
497 }
498 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li a {
499 color: black;
500 display: block;
501 text-transform: none;
502 }
503 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li.active {
504 background-color: <?php echo $primary; ?>;
505 color: white;
506 text-decoration: none;
507 }
508 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li:hover {
509 background-color: <?php echo $primary; ?>;
510 color: white;
511 text-decoration: none;
512 filter: brightness(90%);
513 }
514 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li.active a,
515 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li:hover a {
516 color: white;
517 }
518
519 /* tabs: style */
520
521 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li {
522
523 }
524 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-boxed li a {
525
526 }
527 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li {
528
529 }
530 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-rounded li a {
531
532 }
533 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li {
534 background-color: transparent;
535 border-bottom: 1px solid <?php echo $button; ?>;
536 border-top: 0;
537 border-right: 0;
538 border-left: 0;
539 }
540 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-style-minimum li a {
541 color: <?php echo $primary; ?>;
542 border-top: 0;
543 border-right: 0;
544 border-left: 0;
545 }
546
547 /* tabs: sized */
548
549 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-small li {
550
551 }
552 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-small li a {
553 font-weight: 500;
554 font-size: inherit;
555 line-height: inherit;
556 }
557 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-medium li {
558
559 }
560 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-medium li a {
561 font-weight: 500;
562 font-size: inherit;
563 line-height: inherit;
564 }
565 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-large li {
566
567 }
568 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav.tab-size-large li a {
569 font-weight: 500;
570 font-size: inherit;
571 line-height: inherit;
572 }
573
574 // @codingStandardsIgnoreEnd