PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.11.3
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.11.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 / save-the-museum.php

save-the-museum.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.11.3, at includes/css-templates/admin/save-the-museum.php

466 lines 18.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'] ) : '#F58A07';
55 $secondary = isset( $_GET['s'] ) ? '#' . preg_replace("/[^A-Za-z0-9 ]/", '', $_GET['s'] ) : '#1D3444';
56 $tertiary = isset( $_GET['t'] ) ? '#' . preg_replace("/[^A-Za-z0-9 ]/", '', $_GET['t'] ) : '#5B5B5B';
57 $button = isset( $_GET['b'] ) ? '#' . preg_replace("/[^A-Za-z0-9 ]/", '', $_GET['b'] ) : '#FFFFFF';
58
59 $slug = 'save-the-museum'; // 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 div.charitable-preview-row/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
79 /* wide spread changes in div.charitable-preview-row vs tabs */
80
81 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row {
82 background-color: white;
83 color: #606060;
84 }
85 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row h1,
86 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row h2,
87 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row h3,
88 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row h4,
89 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row h5,
90 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row h6 {
91 color: <?php echo $secondary; ?>
92 }
93 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h1,
94 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h2,
95 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h3,
96 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h4,
97 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h5,
98 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h6 {
99 color: black;
100 }
101 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content {
102 color: <?php echo $tertiary; ?>;
103 }
104 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content > * {
105 color: #92908F;
106 }
107 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row > * {
108 color: #D8DAD7;
109 }
110 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row h5 {
111 font-size: 24px;
112 line-height: 28px;
113 }
114
115 <?php echo charitable_esc_attr_php( $wrapper ); ?> .placeholder {
116 padding: 0;
117 }
118
119 /* aligns */
120
121 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-left > div {
122 margin-left: 0;
123 margin-right: auto;
124 }
125 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-center > div {
126 margin-left: auto;
127 margin-right: auto;
128 }
129 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-align-right > div {
130 margin-left: auto;
131 margin-right: 0;
132 }
133
134 /* column specifics */
135
136 <?php echo charitable_esc_attr_php( $wrapper ); ?> .column[data-column-id="1"] {
137 flex: 2;
138 border: 0;
139
140 }
141 <?php echo charitable_esc_attr_php( $wrapper ); ?> .column[data-column-id="0"] {
142 border: 0;
143 flex: 1;
144
145 }
146
147 /* headlines in general */
148
149 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row h5.charitable-field-preview-headline {
150 color: <?php echo $secondary; ?>;
151 font-weight: 500;
152 text-transform: inherit;
153 font-size: 42px;
154 line-height: 50px;
155 }
156 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content h5.charitable-field-preview-headline {
157 color: black;
158 font-weight: 500;
159 text-transform: inherit;
160 font-size: 32px;
161 line-height: 38px;
162 margin-bottom: 10px;
163 }
164
165 /* field: campaign title */
166
167 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-campaign-title h1 {
168 margin: 5px 0 5px 0;
169 color: <?php echo $secondary; ?>;
170 font-size: 68px !important;
171 line-height: 72px !important;
172 font-weight: 500 !important;
173 }
174
175 /* field: campaign description */
176
177 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-campaign-description .charitable-campaign-builder-placeholder-preview-text {
178 padding: 0;
179 color: #D8DAD7;
180 }
181 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-campaign-description .charitable-campaign-builder-placeholder-preview-text,
182 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-campaign-description .charitable-campaign-builder-placeholder-preview-text p {
183 font-size: 18px;
184 line-height: 27px;
185 font-weight: 300;
186 color: <?php echo $tertiary; ?>;
187 }
188
189
190 /* field: text */
191
192 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-text .charitable-campaign-builder-placeholder-preview-text {
193 padding: 0;
194
195 }
196 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-text h5.charitable-field-preview-headline {
197
198 }
199
200
201 /* field: button */
202
203 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-donate-button .charitable-field-preview-donate-button span.placeholder.button {
204 background-color: <?php echo $button; ?> !important;
205 border-color: black !important;
206 text-transform: uppercase;
207 border-radius: 0px;
208 margin-top: 0;
209 margin-bottom: 0;
210 width: 100%;
211 font-weight: 400;
212 min-height: 50px;
213 height: 50px;
214 font-size: 16px;
215 line-height: 50px;
216 color: black;
217 }
218
219 /* field: photo */
220
221 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-photo .primary-image {
222 border: transparent;
223 border-radius: 0px;
224 }
225
226 /* field: photo */
227
228 <?php echo charitable_esc_attr_php( $wrapper ); ?> div.charitable-preview-row .primary-image-container {
229 margin: 0;
230 padding: 0;
231 }
232
233 <?php echo charitable_esc_attr_php( $wrapper ); ?> .tab-content .primary-image-container {
234 margin: 0;
235 padding: 0;
236 }
237
238 /* field: progress bar */
239
240 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar-info-row div.campaign-percent-raised {
241 color: <?php echo $secondary; ?>;
242 font-size: 21px;
243 line-height: 21px;
244 font-weight: 100;
245 padding-left: 0;
246 }
247 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar-info-row div.campaign-goal {
248 color: <?php echo $primary; ?>;
249 font-weight: 100;
250 font-size: 21px;
251 line-height: 21px;
252 }
253 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress {
254 border: 0;
255 padding: 0;
256 background-color: #E0E0E0;
257 border-radius: 0px;
258 margin-top: 15px;
259 }
260 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar {
261 background-color: <?php echo $primary; ?>;
262 height: 13px !important;
263 border-radius: 0px;
264 text-align: right;
265 opacity: 1.0;
266 }
267 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field.charitable-field-progress-bar .progress-bar span {
268 display: none;
269 }
270
271 /* field: social linking */
272
273 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking {
274 display: table;
275 }
276
277 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-field-preview-social-linking-headline-container {
278 display: block;
279 float: left;
280 padding: 0;
281 }
282 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-field-row {
283 display: block;
284 float: left;
285 width: auto;
286 margin: 0 0 0 0;
287 }
288 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking h5.charitable-field-preview-headline {
289 font-size: 14px !important;
290 line-height: 16px !important;
291 color: <?php echo $secondary; ?>;
292 font-weight: 300;
293 margin: 0 15px 0 0;
294 padding: 5px 5px 5px 0;
295 }
296 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-placeholder {
297 padding: 10px;
298 }
299
300 /* field: social sharing */
301
302 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing {
303 display: table;
304 }
305
306 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-field-preview-social-sharing-headline-container {
307 display: block;
308 float: left;
309 padding: 0;
310 }
311 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-field-row {
312 display: block;
313 float: left;
314 width: auto;
315 margin: 0 0 0 0;
316 }
317 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing h5.charitable-field-preview-headline {
318 font-size: 14px;
319 line-height: 16px;
320 color: <?php echo $secondary; ?>;
321 font-weight: 300;
322 margin: 0 15px 0 0;
323 padding: 5px 5px 5px 0;
324 }
325 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-placeholder {
326 padding: 10px;
327 }
328
329 /* social icons */
330
331 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-linking-preview-twitter .charitable-placeholder,
332 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-social-sharing-preview-twitter .charitable-placeholder {
333 background-image: url('../../../../../assets/images/campaign-builder/fields/social-links/twitter-dark.svg');
334 }
335 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-linking-preview-facebook .charitable-placeholder,
336 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-social-sharing-preview-facebook .charitable-placeholder {
337 background-image: url('../../../../../assets/images/campaign-builder/fields/social-links/facebook-dark.svg');
338 }
339
340 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-linking-preview-linkedin .charitable-placeholder,
341 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-social-sharing-preview-linkedin .charitable-placeholder {
342 background-image: url('../../../../../assets/images/campaign-builder/fields/social-links/linkedin-dark.svg');
343 }
344 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-linking-preview-instagram .charitable-placeholder,
345 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-social-sharing-preview-instagram .charitable-placeholder {
346 background-image: url('../../../../../assets/images/campaign-builder/fields/social-links/instagram-dark.svg');
347 }
348 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-linking-preview-pinterest .charitable-placeholder,
349 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-social-sharing-preview-pinterest .charitable-placeholder {
350 background-image: url('../../../../../assets/images/campaign-builder/fields/social-links/pinterest-dark.svg');
351 }
352 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-linking-preview-tiktok .charitable-placeholder,
353 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-social-sharing-preview-tiktok .charitable-placeholder {
354 background-image: url('../../../../../assets/images/campaign-builder/fields/social-links/tiktok-dark.svg');
355 }
356 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-linking-preview-mastodon .charitable-placeholder,
357 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-social-sharing-preview-mastodon .charitable-placeholder {
358 background-image: url('../../../../../assets/images/campaign-builder/fields/social-links/mastodon-dark.svg');
359 }
360 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-linking-preview-youtube .charitable-placeholder,
361 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-social-sharing-preview-youtube .charitable-placeholder {
362 background-image: url('../../../../../assets/images/campaign-builder/fields/social-links/youtube-dark.svg');
363 }
364 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-linking-preview-threads .charitable-placeholder,
365 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-social-sharing-preview-threads .charitable-placeholder {
366 background-image: url('../../../../../assets/images/campaign-builder/fields/social-links/threads-dark.svg');
367 }
368 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-linking .charitable-social-linking-preview-bluesky .charitable-placeholder,
369 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-social-sharing .charitable-social-sharing-preview-bluesky .charitable-placeholder {
370 background-image: url('../../../../../assets/images/campaign-builder/fields/social-links/bluesky-dark.svg');
371 }
372
373 /* field: campaign summary */
374
375 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary {
376 padding-left: 0;
377 padding-right: 0;
378 }
379 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary div {
380 font-weight: 400;
381 font-size: 14px;
382 line-height: 16px;
383 }
384 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary div span {
385 color: <?php echo $primary; ?>;
386 font-weight: 500;
387 font-size: 32px;
388 line-height: 38px;
389 }
390 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary .campaign-summary-item {
391 border: 0;
392 margin-top: 5px;
393 margin-bottom: 5px;
394 color: <?php echo $secondary; ?>
395 }
396 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary .campaign-summary-item.campaign_hide_percent_raised {
397 width: 34%;
398 }
399 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary .campaign-summary-item.campaign_hide_amount_donated {
400 width: 43%;
401 }
402 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary .campaign-summary-item.campaign_hide_number_of_donors {
403 width: 23%;
404 }
405 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-preview-campaign-summary .campaign-summary-item.campaign_hide_time_remaining {
406 width: 100%;
407 }
408
409
410 /* field: donate amount */
411
412 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount label,
413 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount input.custom-donation-input[type="text"] {
414 color: <?php echo $secondary; ?>;
415 border: 1px solid <?php echo $secondary; ?> !important;
416 }
417 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount ul li.suggested-donation-amount.selected {
418 background-color: <?php echo $primary; ?>;
419 }
420 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-field-donate-amount ul li.suggested-donation-amount.selected span.amount {
421 color: <?php echo $tertiary; ?>;
422 }
423
424 /* tabs: container */
425
426 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-tab-container {
427 background-color: white;
428 }
429
430 <?php echo charitable_esc_attr_php( $wrapper ); ?> .charitable-preview-tab-container .tab-content img {
431 max-width: 100%;
432 }
433
434 /* tabs: tab nav */
435
436 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav {
437 border: 1px solid <?php echo $primary; ?>;
438 background-color: <?php echo $primary; ?>;
439 width: auto;
440 }
441 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li {
442 border-top: 0;
443 border-right: 1px solid <?php echo $primary; ?>;
444 border-bottom: 0;
445 border-left: 0;
446 background-color: transparent;
447 margin: 0;
448 }
449 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li a {
450 color: white;
451 display: block;
452 font-weight: 500;
453 font-size: 14px;
454 line-height: 15px;
455 text-transform: none;
456 }
457 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li.active,
458 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li:hover {
459 background-color: <?php echo $primary; ?>;
460 text-decoration: none;
461 filter: brightness(90%);
462 }
463 <?php echo charitable_esc_attr_php( $wrapper ); ?> article nav li.active a {
464 color: white;
465 }
466 // @codingStandardsIgnoreEnd