Public Access
22 lines
668 B
Python
22 lines
668 B
Python
import os
|
|
from fasthtml.common import *
|
|
|
|
def render_paypal_donation_widget():
|
|
"""Génère le bouton de don PayPal pour l'interface sidebar."""
|
|
|
|
# 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")
|
|
|
|
return Div(
|
|
A(
|
|
"☕ Faire un don",
|
|
href=paypal_url,
|
|
target="_blank",
|
|
cls="export-btn",
|
|
style="text-align: center; color: #00e5ff; border-color: #00e5ff; display: block; text-decoration: none;"
|
|
),
|
|
style="margin-top: 10px;"
|
|
) |