diff --git a/.env.example b/.env.example index e76296ab4..de9cb3f7e 100644 --- a/.env.example +++ b/.env.example @@ -6,15 +6,16 @@ PORT=5000 DEBUG=false -# Find "usr" string in wallet url to explicit allow users or set admins (comma separated list) LNBITS_ALLOWED_USERS="" LNBITS_ADMIN_USERS="" # Extensions only admin can access LNBITS_ADMIN_EXTENSIONS="ngrok" LNBITS_DEFAULT_WALLET_NAME="LNbits wallet" -# csv ad image filepaths or urls, extensions can choose to honor -LNBITS_AD_SPACE="" +# Ad space description +# LNBITS_AD_SPACE_TITLE="Supported by" +# csv ad space, format ";;, ;;", extensions can choose to honor +# LNBITS_AD_SPACE="" # Hides wallet api, extensions can choose to honor LNBITS_HIDE_API=false diff --git a/lnbits/core/templates/core/index.html b/lnbits/core/templates/core/index.html index 68a7b7ede..5f26cb038 100644 --- a/lnbits/core/templates/core/index.html +++ b/lnbits/core/templates/core/index.html @@ -183,6 +183,23 @@
 
+ + {% if AD_SPACE %} {% for ADS in AD_SPACE %} {% set AD = ADS.split(';') %} +
+ {{ AD_TITLE }} + + + + + +
+ {% endfor %} {% endif %} diff --git a/lnbits/core/templates/core/wallet.html b/lnbits/core/templates/core/wallet.html index 4bf6067c0..22fbd05de 100644 --- a/lnbits/core/templates/core/wallet.html +++ b/lnbits/core/templates/core/wallet.html @@ -388,9 +388,14 @@ {% endif %} {% if AD_SPACE %} {% for ADS in AD_SPACE %} {% set AD = ADS.split(';') %} - +
{{ AD_TITLE }}
+ + + + + + {% endfor %} {% endif %} diff --git a/lnbits/helpers.py b/lnbits/helpers.py index e213240cd..838761603 100644 --- a/lnbits/helpers.py +++ b/lnbits/helpers.py @@ -163,6 +163,7 @@ def template_renderer(additional_folders: List = []) -> Jinja2Templates: ) if settings.LNBITS_AD_SPACE: + t.env.globals["AD_TITLE"] = settings.LNBITS_AD_SPACE_TITLE t.env.globals["AD_SPACE"] = settings.LNBITS_AD_SPACE t.env.globals["HIDE_API"] = settings.LNBITS_HIDE_API t.env.globals["SITE_TITLE"] = settings.LNBITS_SITE_TITLE diff --git a/lnbits/settings.py b/lnbits/settings.py index 73b0d6c9e..17fce293c 100644 --- a/lnbits/settings.py +++ b/lnbits/settings.py @@ -40,6 +40,9 @@ LNBITS_DISABLED_EXTENSIONS: List[str] = [ for x in env.list("LNBITS_DISABLED_EXTENSIONS", default=[], subcast=str) ] +LNBITS_AD_SPACE_TITLE = env.str( + "LNBITS_AD_SPACE_TITLE", default="Optional Advert Space" +) LNBITS_AD_SPACE = [x.strip(" ") for x in env.list("LNBITS_AD_SPACE", default=[])] LNBITS_HIDE_API = env.bool("LNBITS_HIDE_API", default=False) LNBITS_SITE_TITLE = env.str("LNBITS_SITE_TITLE", default="LNbits") diff --git a/lnbits/static/images/lnbits-shop-dark.png b/lnbits/static/images/lnbits-shop-dark.png new file mode 100644 index 000000000..3dd677dc9 Binary files /dev/null and b/lnbits/static/images/lnbits-shop-dark.png differ diff --git a/lnbits/static/images/lnbits-shop-light.png b/lnbits/static/images/lnbits-shop-light.png new file mode 100644 index 000000000..96607cb44 Binary files /dev/null and b/lnbits/static/images/lnbits-shop-light.png differ