Skip to content

Commit a3ddb19

Browse files
committed
Publish 2025-11-27
1 parent 3de61d0 commit a3ddb19

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

elements/pay-tiers.js

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,9 @@ const htmlText = `
293293
</div>
294294
</label>
295295
</div>
296+
<div class="discount-description js-discount-description">
297+
50% off until December 1
298+
</div>
296299
<div class="button-wrapper button-wrapper-paddle">
297300
<a class="button-link button-link--paypal button-link--inactive js-link-paypal" href="${DEFAULT_LINK_PAYPAL}" target="_blank" rel="noopener" data-s="d-side-paypal">
298301
<span class="button-link__text"><span data-text="pay_with">Pay with</span> <span class="button-link__text--paypal">PayPal</span></span>
@@ -538,6 +541,9 @@ const cssText = `
538541
position: relative;
539542
top: 0.375rem;
540543
}
544+
.tier__price--cross {
545+
font-weight: normal;
546+
}
541547
.tier__price--cross::after {
542548
background-color: hsla(355deg, 80%, 50%, 0.8);
543549
content: "";
@@ -935,6 +941,13 @@ darkreader-donate-mascot {
935941
pointer-events: none;
936942
}
937943
944+
.discount-description {
945+
color: #63b79f;
946+
font-size: 0.875rem;
947+
font-weight: bold;
948+
text-align: center;
949+
}
950+
938951
/* Wide */
939952
:host {
940953
container-type: inline-size;
@@ -988,10 +1001,7 @@ darkreader-donate-mascot {
9881001
/*
9891002
display: inline-block;
9901003
*/
991-
/*
9921004
display: none;
993-
*/
994-
display: inline-block;
9951005
}
9961006
.tier__hint {
9971007
/*
@@ -1082,6 +1092,8 @@ class PayTiersElement extends HTMLElement {
10821092
s('.js-price-save').each((node) => node.textContent = Prices.SAVE[currency]);
10831093
s('.js-price-save-2').each((node) => node.textContent = Prices.SAVE_2[currency]);
10841094
s('.js-currency-text').each((node) => node.textContent = currency);
1095+
1096+
s('.js-discount-description').each((node) => node.style.display = tier === Tiers.DISCOUNT ? '' : 'none');
10851097
};
10861098

10871099
shadowRoot.querySelector('.tiers')?.addEventListener('change', update);

0 commit comments

Comments
 (0)