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-single.php

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

305 lines 10.3 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 Single (1 Column) 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.12
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-single';
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 (same as Beacon Split).
49 include __DIR__ . '/partials/beacon-hero.php';
50 ?>
51
52 /* ── Body row — single full-width column ─────────────────────────────── */
53
54 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> {
55 padding: 80px 32px 48px;
56 display: block;
57 }
58
59 /* When the hero has no logo, the avatar overhang isn't there — pull the body column up. */
60 <?php echo $wrapper; // phpcs:ignore ?>:not(:has(.charitable-campaign-hero__avatar)) .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-column:first-child {
61 margin-top: -60px;
62 }
63
64 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-container {
65 display: block;
66 }
67
68 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-column {
69 padding: 0;
70 border: 0;
71 max-width: none;
72 flex: none;
73 width: 100%;
74 }
75
76 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-column .charitable-field {
77 margin-bottom: 24px;
78 }
79
80 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> h5.charitable-field-template-headline {
81 font-size: 24px;
82 font-weight: 700;
83 margin: 0 0 24px;
84 line-height: 1.3;
85 text-wrap: balance;
86 }
87
88 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-hero__title,
89 <?php echo $wrapper; // phpcs:ignore ?> .charitable-campaign-hero__title {
90 text-wrap: balance;
91 }
92
93 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-field-content p {
94 font-size: 15px;
95 line-height: 1.6;
96 color: #333;
97 margin-bottom: 16px;
98 }
99
100 /* Campaign description — frame the description body (matches preview). */
101 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-field-campaign-description .charitable-campaign-builder-placeholder-template-text {
102 border: 1px solid <?php echo $secondary; // phpcs:ignore ?>;
103 border-radius: 4px;
104 padding: 12px 16px;
105 }
106
107 <?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 {
108 margin: 0;
109 }
110
111 <?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 {
112 margin-bottom: 0;
113 }
114
115 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-field-content > *:first-child {
116 margin-top: 0;
117 }
118
119 /* Photos — full-width landscape, generous breathing room. */
120 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-field-photo {
121 margin-bottom: 24px;
122 }
123
124 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-field-photo img {
125 display: block;
126 width: 100%;
127 max-width: 100%;
128 height: auto;
129 border-radius: 0;
130 }
131
132 /* Social sharing — compact horizontal row */
133
134 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-field-social-sharing {
135 margin-bottom: 24px;
136 }
137
138 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing {
139 display: flex;
140 align-items: center;
141 flex-wrap: wrap;
142 gap: 12px;
143 }
144
145 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-field-template-social-sharing-headline-container {
146 margin: 0;
147 padding: 0;
148 display: flex;
149 align-items: center;
150 }
151
152 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing h5.charitable-field-template-headline {
153 font-size: 14px !important;
154 font-weight: 600 !important;
155 margin: 0 8px 0 0 !important;
156 padding: 0 !important;
157 line-height: 1 !important;
158 }
159
160 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-field-row {
161 display: flex;
162 flex-wrap: wrap;
163 align-items: center;
164 gap: 8px;
165 margin: 0;
166 padding: 0;
167 }
168
169 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-field-row .charitable-social-field-column {
170 margin: 0;
171 padding: 0;
172 display: flex;
173 align-items: center;
174 }
175
176 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-campaign-social-link {
177 margin: 0 !important;
178 padding: 0 !important;
179 display: flex;
180 align-items: center;
181 min-height: 0 !important;
182 }
183
184 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-campaign-social-link a {
185 display: flex;
186 align-items: center;
187 }
188
189 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-campaign-social-link img,
190 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-campaign-social-link a {
191 width: 24px;
192 height: 24px;
193 }
194
195 <?php echo $wrapper; // phpcs:ignore ?> .charitable-field-template-social-sharing .charitable-campaign-social-link p {
196 display: none;
197 }
198
199 /* ── Donor wall — Beacon-scoped restyle ───────────────────────────────── */
200
201 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal {
202 list-style: none;
203 display: grid;
204 grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
205 gap: 16px;
206 margin: 0;
207 padding: 0;
208 }
209
210 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor {
211 display: flex;
212 align-items: center;
213 gap: 14px;
214 padding: 14px 16px;
215 background: #fff;
216 border: 1px solid #e6e8eb;
217 border-radius: 10px;
218 transition: border-color 160ms ease, transform 160ms ease, box-shadow 160ms ease;
219 min-width: 0;
220 }
221
222 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor:hover {
223 border-color: var(--charitable-hero-accent, #1d3a8a);
224 transform: translateY(-1px);
225 box-shadow: 0 4px 14px rgba(15, 23, 42, 0.06);
226 }
227
228 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor .avatar {
229 width: 44px !important;
230 height: 44px !important;
231 border-radius: 50%;
232 object-fit: cover;
233 flex-shrink: 0;
234 background: #f1f3f5;
235 border: 1px solid #e6e8eb;
236 }
237
238 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor .donor-name {
239 font-size: 14px;
240 font-weight: 600;
241 line-height: 1.25;
242 color: #111827;
243 margin: 0;
244 padding: 0;
245 min-width: 0;
246 white-space: nowrap;
247 overflow: hidden;
248 text-overflow: ellipsis;
249 flex: 1 1 auto;
250 }
251
252 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor .donor-donation-amount {
253 font-size: 13px;
254 font-weight: 600;
255 line-height: 1.25;
256 color: var(--charitable-hero-accent, #1d3a8a);
257 margin-top: 4px;
258 letter-spacing: 0.01em;
259 }
260
261 /* Reflow name + amount into a single column so they stack inside the card. */
262 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor::after {
263 content: none;
264 }
265
266 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor {
267 flex-wrap: wrap;
268 }
269
270 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor .donor-name {
271 flex: 1 1 calc(100% - 60px);
272 white-space: normal;
273 }
274
275 <?php echo $wrapper; // phpcs:ignore ?> .donors-list.donors-list-horizontal .donor .donor-donation-amount {
276 flex: 1 1 calc(100% - 60px);
277 margin-left: 58px;
278 margin-top: -2px;
279 }
280
281 /* Empty-state message — match the body typography rather than the theme default. */
282 <?php echo $wrapper; // phpcs:ignore ?> .charitable-campaign-field_donation-wall p,
283 <?php echo $wrapper; // phpcs:ignore ?> .charitable-campaign-field-donation-wall .charitable-campaign-field-inner > .charitable-campaign-field_donation-wall p {
284 font-family: inherit;
285 font-size: 15px;
286 font-weight: 400;
287 font-style: normal;
288 line-height: 1.6;
289 color: #6b7280;
290 margin: 8px 0 0;
291 padding: 0 !important;
292 text-align: left;
293 }
294
295 /* ── Mobile reflow ────────────────────────────────────────────────────── */
296
297 @media ( max-width: <?php echo intval( $mobile_width ); // phpcs:ignore ?>px ) {
298 <?php echo $wrapper; // phpcs:ignore ?> .<?php echo $body_row_class; // phpcs:ignore ?> {
299 padding: 32px 16px;
300 }
301 <?php echo $wrapper; // phpcs:ignore ?>:not(:has(.charitable-campaign-hero__avatar)) .<?php echo $body_row_class; // phpcs:ignore ?> .charitable-campaign-column:first-child {
302 margin-top: 0;
303 }
304 }
305