PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.13
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.13
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-colors.php

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

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