Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions themes/le-2025/assets/js/donate-2026.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ const Donate2026 = {

this.page = page;
this.forms = page.querySelector('#cmp-DonationForms2026');
this.topGrid = page.querySelector('#cmp-Donate2026TopGrid');
this.formOverlay = page.querySelector('#cmp-Donate2026FormOverlay');
this.formSpacer = page.querySelector('#cmp-Donate2026FormSpacer');
this.lowerContent = page.querySelector('#cmp-Donate2026WaysToGive');
Expand Down Expand Up @@ -99,13 +100,26 @@ const Donate2026 = {
syncFormSpacerHeight() {
if (!this.formOverlay || !this.formSpacer) return;

if (this.topGrid) {
this.topGrid.style.paddingBottom = '';
}

if (!this.desktopMediaQuery?.matches) {
this.formSpacer.style.minHeight = '';
return;
}

this.formSpacer.style.minHeight = '';

const otherPanel = this.forms?.querySelector('#donate-2026-panel-other');
if (this.topGrid && otherPanel?.classList.contains('active')) {
const formBottom = this.formOverlay.getBoundingClientRect().bottom;
const gridBottom = this.topGrid.getBoundingClientRect().bottom;
const overflow = Math.max(Math.ceil(formBottom - gridBottom), 0);

this.topGrid.style.paddingBottom = overflow ? `${overflow}px` : '';
}

const formBottom = this.formOverlay.getBoundingClientRect().bottom;
const spacerTop = this.formSpacer.getBoundingClientRect().top;
const shortfall = Math.max(Math.ceil(formBottom - spacerTop), 0);
Expand Down
1 change: 1 addition & 0 deletions themes/le-2025/layouts/partials/donation-forms-2026.html
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
aria-labelledby="donate-2026-tab-other"
aria-hidden="true"
>
<p class="mx-auto mt-0 mb-5 max-w-md text-sm leading-6 text-gray-600">Due to tax reasons, we cannot provide thank-you gifts for donations made via The Giving Block platform.</p>
<div id="cmp-TheGivingBlockEmbed2026" class="donate-2026-embed-frame donate-2026-embed-frame--tgb">
<script id="tgb-widget-script">
!function t(e,i,n,g,x,r,s,d,a,y,w,q,f,u,t,c,o){var p="widgetOptions";e[p]?(e[p]=e[p].length?e[p]:[e[p]],e[p].push({id:r,apiUserUuid:x,domain:g,buttonId:d,scriptId:s,uiVersion:a,campaignId:q,donationFlow:y,fundraiserId:w,preselectedCryptocurrencies:f,donationFormTitle:u,iframeTitle:t})):e[p]={id:r,apiUserUuid:x,domain:g,buttonId:d,scriptId:s,uiVersion:a,campaignId:q,donationFlow:y,fundraiserId:w,preselectedCryptocurrencies:f,donationFormTitle:u,iframeTitle:t},(c=i.createElement(n)).src=[g,"/widget/script.js"].join(""),c.async=1,(o=i.getElementById(s)).parentNode.insertBefore(c,o)}(window,document,"script","https://widget.thegivingblock.com","e6cf7d18-41b6-4a6c-954a-338578fd90b0","1189132012","tgb-widget-script","tgb-widget-button","2","","","",undefined,undefined,"Donation form powered by The Giving Block");
Expand Down
Loading