-
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add dynamic PayPal/UPI toggle with improved UI interaction.
- Implemented a toggle feature between UPI and PayPal options. - Added a dynamic QR code that switches between UPI and PayPal based on the selected payment method. - Updated the hyperlink to toggle between "Wanna donate via PayPal" and "Wanna donate via UPI" accordingly. - Modified the UPI copy button to change to "Open PayPal" when PayPal is selected. - Hid the Lottie animation when switching to PayPal for a cleaner UI. - General UI improvements and bug fixes to maintain consistent layout.
- Loading branch information
Showing
5 changed files
with
291 additions
and
50 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width"> | ||
<link rel="stylesheet" href="styles.css"> | ||
<link rel="icon" href="assets/inulute_icn.ico" type="image/x-icon" /> | ||
<script src="https://unpkg.com/@lottiefiles/lottie-player@latest/dist/lottie-player.js"></script> | ||
<script> | ||
window.va = window.va || function () { (window.vaq = window.vaq || []).push(arguments); }; | ||
</script> | ||
<script defer src="/_vercel/insights/script.js"></script> | ||
<title>UPI and PayPal Donation</title> | ||
</head> | ||
<body> | ||
<div class="container"> | ||
<!-- UPI Section --> | ||
<div class="qr-container"> | ||
<div class="qr-code"> | ||
<img src="assets/qr-code.png" alt="UPI QR Code"> | ||
</div> | ||
<div class="upi-id"> | ||
<p>Scan the QR code or use the UPI ID</p> | ||
<div class="upi-id-content"> | ||
<strong id="upi-id">inulute@boi</strong> | ||
<button id="copy-button" class="copy-button">Copy</button> | ||
<lottie-player | ||
src="https://lottie.host/2b51d7af-7099-49f5-93df-f8190dde11bb/WU9eejAueC.json" | ||
background="#FFFFFF" | ||
speed="1.5" | ||
loop | ||
autoplay | ||
direction="1" | ||
mode="normal" class="upi-icon" | ||
></lottie-player> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<!-- PayPal Section --> | ||
<div class="paypal-container"> | ||
<p>Or, you can donate via PayPal</p> | ||
<div class="paypal-id-content"> | ||
<a href="https://www.paypal.com/paypalme/inulute" target="_blank" class="paypal-link"> | ||
<img src="assets/paypalqr.png" alt="PayPal" class="paypal-icon"> | ||
</a> | ||
</div> | ||
</div> | ||
</div> | ||
|
||
<script> | ||
document.addEventListener("DOMContentLoaded", function () { | ||
const copyButton = document.getElementById("copy-button"); | ||
const upiIdText = document.getElementById("upi-id"); | ||
|
||
copyButton.addEventListener("click", function () { | ||
const textToCopy = upiIdText.textContent; | ||
const tempInput = document.createElement("input"); | ||
tempInput.value = textToCopy; | ||
document.body.appendChild(tempInput); | ||
tempInput.select(); | ||
document.execCommand("copy"); | ||
document.body.removeChild(tempInput); | ||
copyButton.textContent = "Copied!"; | ||
setTimeout(function () { | ||
copyButton.textContent = "Copy"; | ||
}, 2500); | ||
}); | ||
|
||
document.addEventListener("contextmenu", function (event) { | ||
event.preventDefault(); | ||
}); | ||
}); | ||
</script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
body { | ||
font-family: Arial, sans-serif; | ||
margin: 0; | ||
padding: 0; | ||
background-color: #f2f2f2; | ||
user-select: none; | ||
background-image: url("/assets/background.svg"); | ||
} | ||
|
||
.container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
|
||
.qr-container, .paypal-container { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
padding: 20px; | ||
background-color: #ffffff; | ||
border-radius: 10px; | ||
box-shadow: 0px 4px 10px rgba(0.2, 0.2, 0.2, 0.2); | ||
margin-top: 10px; | ||
margin-bottom: 10px; | ||
max-width: 350px; | ||
width: 100%; | ||
margin: 5%; | ||
height: auto; | ||
} | ||
|
||
.qr-code img { | ||
max-width: 100%; | ||
height: auto; | ||
} | ||
|
||
.upi-id { | ||
margin-top: 20px; | ||
text-align: center; | ||
} | ||
|
||
.upi-id-content { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
margin-top: 10px; | ||
} | ||
|
||
.upi-id strong { | ||
color: #007bff; | ||
user-select: text; | ||
display: inline-block; | ||
margin-right: 10px; | ||
} | ||
|
||
.copy-button { | ||
display: inline-block; | ||
padding: 8px 15px; | ||
background-color: #007bff; | ||
color: white; | ||
border: none; | ||
margin-top: 10px; | ||
border-radius: 5px; | ||
height: min-content; | ||
cursor: pointer; | ||
} | ||
|
||
* { | ||
-webkit-tap-highlight-color: transparent; | ||
} | ||
|
||
.upi-icon { | ||
width: 40px; | ||
height: auto; | ||
margin-top: 10px; | ||
} | ||
|
||
.paypal-container { | ||
margin-top: 20px; | ||
text-align: center; | ||
} | ||
|
||
.paypal-id-content { | ||
display: flex; | ||
flex-direction: column; | ||
align-items: center; | ||
margin-top: 10px; | ||
} | ||
|
||
.paypal-link { | ||
text-decoration: none; | ||
color: #007bff; | ||
} | ||
|
||
.paypal-icon { | ||
width: 250px; | ||
height: auto; | ||
margin-top: 10px; | ||
} |
Oops, something went wrong.