diff --git a/.env.example b/.env.example index d06016f65..32f0b47b9 100644 --- a/.env.example +++ b/.env.example @@ -15,7 +15,7 @@ LNBITS_ADMIN_UI=false # Change theme LNBITS_SITE_TITLE="LNbits" LNBITS_SITE_TAGLINE="free and open-source lightning wallet" -LNBITS_SITE_DESCRIPTION="Some description about your service, will display if title is not 'LNbits'" +LNBITS_SITE_DESCRIPTION="The world's most powerful suite of bitcoin tools. Run for yourself, for others, or as part of a stack." # Choose from bitcoin, mint, flamingo, freedom, salvador, autumn, monochrome, classic, cyber LNBITS_THEME_OPTIONS="classic, bitcoin, flamingo, freedom, mint, autumn, monochrome, salvador, cyber" # LNBITS_CUSTOM_LOGO="https://lnbits.com/assets/images/logo/logo.svg" @@ -182,6 +182,9 @@ LNBITS_DEFAULT_WALLET_NAME="LNbits wallet" # LNBITS_AD_SPACE_TITLE="Supported by" # csv ad space, format ";;, ;;", extensions can choose to honor # LNBITS_AD_SPACE="https://shop.lnbits.com/;https://raw.githubusercontent.com/lnbits/lnbits/main/lnbits/static/images/lnbits-shop-light.png;https://raw.githubusercontent.com/lnbits/lnbits/main/lnbits/static/images/lnbits-shop-dark.png" +# LNBITS_SHOW_HOME_PAGE_ELEMENTS=true # if set to true, the ad space will be displayed on the home page +# LNBITS_CUSTOM_BADGE="USE WITH CAUTION - LNbits wallet is still in BETA" +# LNBITS_CUSTOM_BADGE_COLOR="warning" # Hides wallet api, extensions can choose to honor LNBITS_HIDE_API=false diff --git a/lnbits/core/templates/admin/_tab_theme.html b/lnbits/core/templates/admin/_tab_theme.html index c20a53fce..c36b40d03 100644 --- a/lnbits/core/templates/admin/_tab_theme.html +++ b/lnbits/core/templates/admin/_tab_theme.html @@ -4,7 +4,7 @@
-
+

Site Title


-
+

Site Tagline


+
+ +
+

Site Description

-

Denomination

@@ -55,7 +62,6 @@ label="sats" hint="The name for the FakeWallet token" > -

QR code logo

@@ -66,9 +72,33 @@ label="https://example.com/image.svg" hint="URL to logo image in QR code" > -
+
+
+

Custom Badge

+
+
+ +
+
+ +
+
+
+
+

Themes

diff --git a/lnbits/core/templates/core/index.html b/lnbits/core/templates/core/index.html index f64c345d2..2ac8cb63d 100644 --- a/lnbits/core/templates/core/index.html +++ b/lnbits/core/templates/core/index.html @@ -8,12 +8,19 @@ >
-

+

{{SITE_TITLE}}

-
+
{{SITE_TAGLINE}}
+
{% if lnurl and LNBITS_NEW_ACCOUNTS_ALLOWED and ("user-id-only" in LNBITS_AUTH_METHODS)%} @@ -306,7 +313,7 @@

{{SITE_TITLE}}

@@ -540,7 +547,10 @@
{% endif %} -
+
diff --git a/lnbits/helpers.py b/lnbits/helpers.py index 3bbe029e9..165bfcbcc 100644 --- a/lnbits/helpers.py +++ b/lnbits/helpers.py @@ -58,6 +58,11 @@ def template_renderer(additional_folders: Optional[List] = None) -> Jinja2Templa t.env.globals["LNBITS_DENOMINATION"] = settings.lnbits_denomination t.env.globals["SITE_TAGLINE"] = settings.lnbits_site_tagline t.env.globals["SITE_DESCRIPTION"] = settings.lnbits_site_description + t.env.globals["LNBITS_SHOW_HOME_PAGE_ELEMENTS"] = ( + settings.LNBITS_SHOW_HOME_PAGE_ELEMENTS + ) + t.env.globals["LNBITS_CUSTOM_BADGE"] = settings.lnbits_custom_badge + t.env.globals["LNBITS_CUSTOM_BADGE_COLOR"] = settings.lnbits_custom_badge_color t.env.globals["LNBITS_THEME_OPTIONS"] = settings.lnbits_theme_options t.env.globals["LNBITS_QR_LOGO"] = settings.lnbits_qr_logo t.env.globals["LNBITS_VERSION"] = settings.version diff --git a/lnbits/settings.py b/lnbits/settings.py index 33cf04e7e..c2a8f1787 100644 --- a/lnbits/settings.py +++ b/lnbits/settings.py @@ -83,8 +83,13 @@ class InstalledExtensionsSettings(LNbitsSettings): class ThemesSettings(LNbitsSettings): lnbits_site_title: str = Field(default="LNbits") lnbits_site_tagline: str = Field(default="free and open-source lightning wallet") - lnbits_site_description: str = Field(default=None) + lnbits_site_description: str = Field( + default="The world's most powerful suite of bitcoin tools." + ) + LNBITS_SHOW_HOME_PAGE_ELEMENTS: bool = Field(default=True) lnbits_default_wallet_name: str = Field(default="LNbits wallet") + lnbits_custom_badge: str = Field(default=None) + lnbits_custom_badge_color: str = Field(default="warning") lnbits_theme_options: list[str] = Field( default=[ "classic", diff --git a/lnbits/static/js/admin.js b/lnbits/static/js/admin.js index dd0162d0e..173ae3249 100644 --- a/lnbits/static/js/admin.js +++ b/lnbits/static/js/admin.js @@ -44,6 +44,18 @@ new Vue({ isSuperUser: false, wallet: {}, cancel: {}, + colors: [ + 'primary', + 'secondary', + 'accent', + 'positive', + 'negative', + 'info', + 'warning', + 'red', + 'yellow', + 'orange' + ], topUpDialog: { show: false }, diff --git a/lnbits/templates/base.html b/lnbits/templates/base.html index 784897077..e8ffcfe50 100644 --- a/lnbits/templates/base.html +++ b/lnbits/templates/base.html @@ -63,27 +63,23 @@ {%endif%} - {% if LNBITS_SERVICE_FEE > 0 %} {% if LNBITS_SERVICE_FEE_MAX > 0 %} @@ -101,12 +97,7 @@ {%endif%} {% endblock %} - + OFFLINE