PluginProbe
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) / 1.8.12.2
Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) v1.8.12.2
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 / frontend / beacon-split.php

beacon-split.php in Charitable – Donation & Fundraising Platform (Donation Forms, Recurring Donations & Fundraising Campaigns) 1.8.12.2, at includes/css-templates/frontend/beacon-split.php

311 lines 10.6 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 for Beacon Split campaign template (frontend).
10 *
11 * @package Charitable
12 * @author WP Charitable LLC
13 * @copyright Copyright (c) 2026, WP Charitable LLC
14 * @license GPL-2.0+
15 * @since 1.8.11.1
16 */
17
18 header( 'Content-type: text/css; charset: UTF-8' );
19
20 $primary = isset( $_GET['p'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['p'] ), 0, 6 ) : '#1d3a8a'; // phpcs:ignore
21 $secondary = isset( $_GET['s'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['s'] ), 0, 6 ) : '#0D0D0D'; // phpcs:ignore
22 $tertiary = isset( $_GET['t'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['t'] ), 0, 6 ) : '#5F5F5F'; // phpcs:ignore
23 $button = isset( $_GET['b'] ) ? '#' . substr( preg_replace( '/[^A-Fa-f0-9]/', '', $_GET['b'] ), 0, 6 ) : '#1d3a8a'; // phpcs:ignore
24 $mobile_width = isset( $_GET['mw'] ) ? max( 320, min( 2000, intval( $_GET['mw'] ) ) ) : 800; // phpcs:ignore
25
26 $charitable_slug = 'beacon-split';
27 $wrapper = '.charitable-campaign-wrap.template-' . $charitable_slug;
28 $hero_row_class = 'beacon-hero-row';
29 $body_row_class = 'beacon-body-row';
30
31 require_once dirname( __DIR__, 2 ) . '/admin/campaign-builder/templates/functions-campaign-templates.php';
32
33 ?>
34
35 :root {
36 --charitable_campaign_theme_primary: <?php echo $primary; // phpcs:ignore ?>;
37 --charitable_campaign_theme_secondary: <?php echo $secondary; // phpcs:ignore ?>;
38 --charitable_campaign_theme_tertiary: <?php echo $tertiary; // phpcs:ignore ?>;
39 --charitable_campaign_theme_button: <?php echo $button; // phpcs:ignore ?>;
40 }
41
42 <?php echo $wrapper; // phpcs:ignore ?> {
43 --charitable-hero-accent: <?php echo $primary; // phpcs:ignore ?>;
44 font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
45 }
46
47 <?php
48 // Include the shared hero positioning partial.
49 include __DIR__ . '/partials/beacon-hero.php';
50 ?>
51
52 /* ── Body row — two columns: story + media ──────────────────────────── */
53
54 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> {
55 padding: 80px 32px 48px;
56 }
57
58 /* When the hero has no logo, the avatar overhang isn't there — pull the story column up. */
59 <?php echo $wrapper; // phpcs:ignore ?>:not(:has(.charitable-campaign-hero__avatar)) .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-column:first-child {
60 margin-top: -60px;
61 }
62
63 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-container,
64 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> {
65 display: block;
66 }
67
68 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> {
69 display: grid;
70 grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
71 gap: 32px;
72 align-items: start;
73 }
74
75 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-column {
76 padding: 0;
77 border: 0;
78 max-width: none;
79 flex: none;
80 }
81
82 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-column:first-child .charitable-field {
83 margin-bottom: 24px;
84 }
85
86 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-column:last-child .charitable-field {
87 margin-bottom: 16px;
88 }
89
90 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> h5.charitable-field-template-headline {
91 font-size: 24px;
92 font-weight: 700;
93 margin: 0 0 24px;
94 line-height: 1.3;
95 text-wrap: balance;
96 }
97
98 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-hero__title,
99 <?php echo $wrapper; // phpcs:ignore ?> .charitable-campaign-hero__title {
100 text-wrap: balance;
101 }
102
103 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-field-content p {
104 font-size: 15px;
105 line-height: 1.6;
106 color: #333;
107 margin-bottom: 16px;
108 }
109
110 /* Campaign description — frame the description body (matches preview). */
111 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-field-campaign-description .charitable-campaign-builder-placeholder-template-text {
112 border: 1px solid <?php echo $secondary; // phpcs:ignore ?>;
113 border-radius: 4px;
114 padding: 12px 16px;
115 }
116
117 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-field-campaign-description .charitable-campaign-builder-placeholder-template-text p:first-child {
118 margin: 0;
119 }
120
121 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-field-campaign-description .charitable-campaign-builder-placeholder-template-text p:last-child {
122 margin-bottom: 0;
123 }
124
125 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-field-content > *:first-child {
126 margin-top: 0;
127 }
128
129 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-field-photo img {
130 display: block;
131 width: 100%;
132 height: auto;
133 border-radius: 0;
134 }
135
136 /* Social sharing — compact horizontal row */
137
138 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-field-social-sharing {
139 margin-bottom: 24px;
140 }
141
142 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing {
143 display: flex;
144 align-items: center;
145 flex-wrap: wrap;
146 gap: 12px;
147 }
148
149 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-field-template-social-sharing-headline-container {
150 margin: 0;
151 padding: 0;
152 display: flex;
153 align-items: center;
154 }
155
156 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing h5.charitable-field-template-headline {
157 font-size: 14px !important;
158 font-weight: 600 !important;
159 margin: 0 8px 0 0 !important;
160 padding: 0 !important;
161 line-height: 1 !important;
162 }
163
164 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-field-row {
165 display: flex;
166 flex-wrap: wrap;
167 align-items: center;
168 gap: 8px;
169 margin: 0;
170 padding: 0;
171 }
172
173 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-field-row .charitable-social-field-column {
174 margin: 0;
175 padding: 0;
176 display: flex;
177 align-items: center;
178 }
179
180 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-campaign-social-link {
181 margin: 0 !important;
182 padding: 0 !important;
183 display: flex;
184 align-items: center;
185 min-height: 0 !important;
186 }
187
188 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-campaign-social-link a {
189 display: flex;
190 align-items: center;
191 }
192
193 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-campaign-social-link img,
194 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-campaign-social-link a {
195 width: 24px;
196 height: 24px;
197 }
198
199 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-campaign-social-link p {
200 display: none;
201 }
202
203 /* ── Donor wall — Beacon-scoped restyle ───────────────────────────────── */
204
205 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal {
206 list-style: none;
207 display: grid;
208 grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
209 gap: 16px;
210 margin: 0;
211 padding: 0;
212 }
213
214 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor {
215 display: flex;
216 align-items: center;
217 gap: 14px;
218 padding: 14px 16px;
219 background: #fff;
220 border: 1px solid #e6e8eb;
221 border-radius: 10px;
222 transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
223 min-width: 0;
224 }
225
226 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor:hover {
227 border-color: var(--charitable-hero-accent, #1d3a8a);
228 transform: translateY(-1px);
229 box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
230 }
231
232 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor .avatar {
233 width: 44px !important;
234 height: 44px !important;
235 border-radius: 50%;
236 object-fit: cover;
237 flex-shrink: 0;
238 background: #f1f3f5;
239 border: 1px solid #e6e8eb;
240 }
241
242 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor .donor-name {
243 font-size: 14px;
244 font-weight: 600;
245 line-height: 1.25;
246 color: #111827;
247 margin: 0;
248 padding: 0;
249 min-width: 0;
250 white-space: nowrap;
251 overflow: hidden;
252 text-overflow: ellipsis;
253 flex: 1 1 auto;
254 }
255
256 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor .donor-donation-amount {
257 font-size: 13px;
258 font-weight: 600;
259 line-height: 1.25;
260 color: var(--charitable-hero-accent, #1d3a8a);
261 margin-top: 4px;
262 letter-spacing: 0.01em;
263 }
264
265 /* Reflow name + amount into a single column so they stack inside the card. */
266 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor::after {
267 content: none;
268 }
269
270 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor {
271 flex-wrap: wrap;
272 }
273
274 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor .donor-name {
275 flex: 1 1 calc(100% - 60px);
276 white-space: normal;
277 }
278
279 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor .donor-donation-amount {
280 flex: 1 1 calc(100% - 60px);
281 margin-left: 58px;
282 margin-top: -2px;
283 }
284
285 /* Empty-state message — match the body typography rather than the theme default. */
286 <?php echo $wrapper; // phpcs:ignore ?> .charitable-campaign-field_donation-wall p,
287 <?php echo $wrapper; // phpcs:ignore ?> .charitable-campaign-field-donation-wall .charitable-campaign-field-inner > .charitable-campaign-field_donation-wall p {
288 font-family: inherit;
289 font-size: 15px;
290 font-weight: 400;
291 font-style: normal;
292 line-height: 1.6;
293 color: #6b7280;
294 margin: 8px 0 0;
295 padding: 0 !important;
296 text-align: left;
297 }
298
299 /* ── Mobile reflow ────────────────────────────────────────────────────── */
300
301 @media ( max-width: <?php echo intval( $mobile_width ); // phpcs:ignore ?>px ) {
302 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> {
303 grid-template-columns: 1fr;
304 padding: 32px 16px;
305 gap: 24px;
306 }
307 <?php echo $wrapper; // phpcs:ignore ?>:not(:has(.charitable-campaign-hero__avatar)) .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-column:first-child {
308 margin-top: 0;
309 }
310 }
311