Skip to content

Commit cca4c7a

Browse files
committed
Added donation section
1 parent 60e5591 commit cca4c7a

3 files changed

Lines changed: 140 additions & 0 deletions

File tree

wasp/assets/css/style.css

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,38 @@ footer {
605605
font-size: 1.2rem;
606606
}
607607

608+
609+
/* Donation Section Styles */
610+
.donation-btn {
611+
border-color: rgba(0, 255, 65, 0.3);
612+
color: var(--text-muted);
613+
font-weight: 600;
614+
}
615+
616+
.donation-btn:hover,
617+
.donation-btn:active,
618+
.donation-btn:focus {
619+
background-color: var(--terminal-green);
620+
color: var(--bg-color);
621+
border-color: var(--terminal-green);
622+
box-shadow: 0 0 10px rgba(0, 255, 65, 0.4);
623+
}
624+
625+
#paypal-custom-amount,
626+
#bmac-custom-amount {
627+
background-color: var(--card-bg) !important;
628+
border-color: rgba(0, 255, 65, 0.2) !important;
629+
color: var(--terminal-green) !important;
630+
text-align: center;
631+
}
632+
633+
#paypal-custom-amount:focus,
634+
#bmac-custom-amount:focus {
635+
border-color: var(--terminal-green) !important;
636+
box-shadow: 0 0 10px rgba(0, 255, 65, 0.2) !important;
637+
outline: none;
638+
}
639+
608640
/* RTL Support */
609641
body.rtl-mode {
610642
direction: rtl;

wasp/assets/js/script.js

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,4 +134,42 @@ $(document).ready(function () {
134134
console.log("%c WASP INITIALIZED ", "background: #000; color: #00ff41; font-size: 20px; font-weight: bold;");
135135
console.log("If you're reading this, you're either a developer or HR. If you're HR, move along, nothing to see here.");
136136

137+
// Donation Handling
138+
window.donate = function (platform, amount) {
139+
if (platform === 'paypal') {
140+
const email = "salilmhatre88@gmail.com"; // TODO: Replace with actual PayPal email
141+
if (email === "salilmhatre88@gmail.com") {
142+
alert("Please configure the PayPal email in assets/js/script.js");
143+
return;
144+
}
145+
const url = `https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=${email}&currency_code=USD&amount=${amount}&item_name=WASP%20Donation`;
146+
window.open(url, '_blank');
147+
} else if (platform === 'bmac') {
148+
const username = "deadpool2k"; // TODO: Replace with actual BMAC username
149+
if (username === "deadpool2k") {
150+
alert("Please configure the Buy Me a Coffee username in assets/js/script.js");
151+
return;
152+
}
153+
// BMAC doesn't support direct amount via URL easily, usually it's per 'coffee'
154+
const url = `https://www.buymeacoffee.com/${username}`;
155+
window.open(url, '_blank');
156+
}
157+
};
158+
159+
window.donateCustom = function (platform) {
160+
let amount;
161+
if (platform === 'paypal') {
162+
amount = $('#paypal-custom-amount').val();
163+
} else {
164+
amount = $('#bmac-custom-amount').val();
165+
}
166+
167+
if (!amount || amount <= 0) {
168+
alert("Please enter a valid amount.");
169+
return;
170+
}
171+
172+
donate(platform, amount);
173+
};
174+
137175
});

wasp/index.html

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -544,6 +544,76 @@ <h5 class="mb-2" data-i18n="dl_src">Source</h5>
544544
</div>
545545
</section>
546546

547+
<!-- Support Section -->
548+
<section id="donate" class="py-5">
549+
<div class="container py-5 text-center">
550+
<h2 class="section-title" data-i18n="donate_title">Fuel the Rebellion</h2>
551+
<p class="text-secondary lead mb-5" data-i18n="donate_desc">
552+
Caffeine is the only fuel that keeps this resistance alive. Support the developers who save your sanity.
553+
</p>
554+
555+
<div class="row justify-content-center g-4">
556+
<!-- PayPal -->
557+
<div class="col-md-5">
558+
<div
559+
class="p-5 border border-secondary rounded-3 h-100 feature-card position-relative overflow-hidden">
560+
<i class="fab fa-paypal platform-icon mb-4" style="color: #00457C;"></i>
561+
<h4 class="mb-4">PayPal</h4>
562+
563+
<div class="d-flex flex-wrap justify-content-center gap-2 mb-3">
564+
<button onclick="donate('paypal', 2)" class="btn btn-outline-secondary btn-sm donation-btn"
565+
data-amount="2">$2</button>
566+
<button onclick="donate('paypal', 5)" class="btn btn-outline-secondary btn-sm donation-btn"
567+
data-amount="5">$5</button>
568+
<button onclick="donate('paypal', 10)" class="btn btn-outline-secondary btn-sm donation-btn"
569+
data-amount="10">$10</button>
570+
</div>
571+
572+
<div class="input-group mb-3 justify-content-center">
573+
<span class="input-group-text bg-dark border-secondary text-secondary">$</span>
574+
<input type="number" id="paypal-custom-amount"
575+
class="form-control bg-dark border-secondary text-white" placeholder="Custom"
576+
style="max-width: 100px;">
577+
</div>
578+
579+
<button onclick="donateCustom('paypal')" class="btn btn-terminal w-100">Donate</button>
580+
</div>
581+
</div>
582+
583+
<!-- Buy Me a Coffee -->
584+
<div class="col-md-5">
585+
<div
586+
class="p-5 border border-secondary rounded-3 h-100 feature-card position-relative overflow-hidden">
587+
<i class="fas fa-mug-hot platform-icon mb-4" style="color: #FFDD00;"></i>
588+
<h4 class="mb-4">Buy Me a Coffee</h4>
589+
590+
<div class="d-flex flex-wrap justify-content-center gap-2 mb-3">
591+
<button onclick="donate('bmac', 2)" class="btn btn-outline-secondary btn-sm donation-btn"
592+
data-amount="2">$2</button>
593+
<button onclick="donate('bmac', 5)" class="btn btn-outline-secondary btn-sm donation-btn"
594+
data-amount="5">$5</button>
595+
<button onclick="donate('bmac', 10)" class="btn btn-outline-secondary btn-sm donation-btn"
596+
data-amount="10">$10</button>
597+
</div>
598+
599+
<div class="input-group mb-3 justify-content-center">
600+
<span class="input-group-text bg-dark border-secondary text-secondary">$</span>
601+
<input type="number" id="bmac-custom-amount"
602+
class="form-control bg-dark border-secondary text-white" placeholder="Custom"
603+
style="max-width: 100px;">
604+
</div>
605+
606+
<button onclick="donateCustom('bmac')" class="btn btn-terminal w-100">Support</button>
607+
</div>
608+
</div>
609+
</div>
610+
611+
<p class="mt-5 text-secondary x-small opacity-50">
612+
* All donations go towards server costs and developer coffee consumption.
613+
</p>
614+
</div>
615+
</section>
616+
547617
<!-- Footer -->
548618
<footer class="text-center">
549619
<div class="container">

0 commit comments

Comments
 (0)