Public Access
fix: Integration officielle du widget de don PayPal utilisateur et stabilisation
Build and Push Docker Image / build-and-push (push) Successful in 1m48s
Build and Push Docker Image / build-and-push (push) Successful in 1m48s
This commit is contained in:
1 parent
a10c854b2b
commit
a4490944f1
2 files changed
+48
-9
No files matched your search
+5
-8
@@ -2,21 +2,18 @@ import os
|
||||
from fasthtml.common import *
|
||||
|
||||
def render_paypal_donation_widget():
|
||||
"""Génère le bouton de don PayPal pour l'interface sidebar."""
|
||||
"""Génère le bouton de don PayPal pour l'interface sidebar avec le lien configuré."""
|
||||
|
||||
# Lecture forcée de la variable d'environnement
|
||||
paypal_url = os.environ.get("PAYPAL_DONATION_LINK", "")
|
||||
|
||||
if not paypal_url:
|
||||
return Div(id="paypal-widget-placeholder")
|
||||
# Récupération depuis l'environnement ou utilisation directe de votre lien officiel
|
||||
paypal_url = os.environ.get("PAYPAL_DONATION_LINK", "https://www.paypal.com/donate/?hosted_button_id=2B6T9UESCN2W6")
|
||||
|
||||
return Div(
|
||||
A(
|
||||
"☕ Faire un don",
|
||||
"☕ Soutenir l'hébergeur",
|
||||
href=paypal_url,
|
||||
target="_blank",
|
||||
cls="export-btn",
|
||||
style="text-align: center; color: #00e5ff; border-color: #00e5ff; display: block; text-decoration: none;"
|
||||
style="text-align: center; color: #00e5ff; border-color: #00e5ff; display: block; text-decoration: none; margin-top: 10px;"
|
||||
),
|
||||
style="margin-top: 10px;"
|
||||
)
|
||||
Reference in new issue
Block a user