Easier to customise title/tagline

Also added description that can replace frontpage blurb
This commit is contained in:
Ben Arc
2021-07-02 12:31:05 +01:00
parent c1c1332e37
commit ae0849143b
6 changed files with 66 additions and 49 deletions

View File

@@ -14,7 +14,9 @@ LNBITS_FORCE_HTTPS=true
LNBITS_SERVICE_FEE="0.0" LNBITS_SERVICE_FEE="0.0"
# Change theme # Change theme
LNBITS_SITE_TITLE=LNbits 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'"
# Choose from mint, flamingo, salvador, autumn, monochrome, classic # Choose from mint, flamingo, salvador, autumn, monochrome, classic
LNBITS_THEME_OPTIONS="mint, flamingo, classic, autumn, monochrome, salvador" LNBITS_THEME_OPTIONS="mint, flamingo, classic, autumn, monochrome, salvador"

View File

@@ -104,6 +104,8 @@ def register_assets(app: QuartTrio):
def register_filters(app: QuartTrio): def register_filters(app: QuartTrio):
"""Jinja filters.""" """Jinja filters."""
app.jinja_env.globals["SITE_TITLE"] = app.config["LNBITS_SITE_TITLE"] app.jinja_env.globals["SITE_TITLE"] = app.config["LNBITS_SITE_TITLE"]
app.jinja_env.globals["SITE_TAGLINE"] = app.config["LNBITS_SITE_TAGLINE"]
app.jinja_env.globals["SITE_DESCRIPTION"] = app.config["LNBITS_SITE_DESCRIPTION"]
app.jinja_env.globals["LNBITS_THEME_OPTIONS"] = app.config["LNBITS_THEME_OPTIONS"] app.jinja_env.globals["LNBITS_THEME_OPTIONS"] = app.config["LNBITS_THEME_OPTIONS"]
app.jinja_env.globals["LNBITS_VERSION"] = app.config["LNBITS_COMMIT"] app.jinja_env.globals["LNBITS_VERSION"] = app.config["LNBITS_COMMIT"]
app.jinja_env.globals["EXTENSIONS"] = get_valid_extensions() app.jinja_env.globals["EXTENSIONS"] = get_valid_extensions()

View File

@@ -37,55 +37,58 @@
<q-card> <q-card>
<q-card-section> <q-card-section>
<h3 class="q-my-none"><strong>LN</strong>bits</h3> <h3 class="q-my-none">{{SITE_TITLE}}</h3>
<h5 class="q-my-md">Free and open-source lightning wallet</h5> <h5 class="q-my-md">{{SITE_TAGLINE}}</h5>
<p> <div v-if="'{{SITE_TITLE}}' == 'LNbits'">
Easy to set up and lightweight, LNbits can run on any <p>
lightning-network funding source, currently supporting LND, Easy to set up and lightweight, LNbits can run on any
c-lightning, OpenNode, lntxbot, LNPay and even LNbits itself! lightning-network funding source, currently supporting LND,
</p> c-lightning, OpenNode, lntxbot, LNPay and even LNbits itself!
<p> </p>
You can run LNbits for yourself, or easily offer a custodian solution <p>
for others. You can run LNbits for yourself, or easily offer a custodian
</p> solution for others.
<p> </p>
Each wallet has its own API keys and there is no limit to the number <p>
of wallets you can make. Being able to partition funds makes LNbits a Each wallet has its own API keys and there is no limit to the number
useful tool for money management and as a development tool. of wallets you can make. Being able to partition funds makes LNbits
</p> a useful tool for money management and as a development tool.
<p> </p>
Extensions add extra functionality to LNbits so you can experiment <p>
with a range of cutting-edge technologies on the lightning network. We Extensions add extra functionality to LNbits so you can experiment
have made developing extensions as easy as possible, and as a free and with a range of cutting-edge technologies on the lightning network.
open-source project, we encourage people to develop and submit their We have made developing extensions as easy as possible, and as a
own. free and open-source project, we encourage people to develop and
</p> submit their own.
<div class="row q-mt-md q-gutter-sm"> </p>
<q-btn <div class="row q-mt-md q-gutter-sm">
outline <q-btn
color="grey" outline
type="a" color="grey"
href="https://github.com/lnbits/lnbits" type="a"
target="_blank" href="https://github.com/lnbits/lnbits"
rel="noopener" target="_blank"
>View project in GitHub</q-btn rel="noopener"
> >View project in GitHub</q-btn
<q-btn >
outline <q-btn
color="grey" outline
type="a" color="grey"
href="https://lnbits.com/paywall/GAqKguK5S8f6w5VNjS9DfK" type="a"
target="_blank" href="https://lnbits.com/paywall/GAqKguK5S8f6w5VNjS9DfK"
rel="noopener" target="_blank"
>Donate</q-btn rel="noopener"
> >Donate</q-btn
>
</div>
</div> </div>
<p v-else>{{SITE_DESCRIPTION}}</p>
</q-card-section> </q-card-section>
</q-card> </q-card>
</div> </div>
<!-- Ads --> <!-- Ads -->
<div class="col-12 col-md-3 col-lg-3"> <div class="col-12 col-md-3 col-lg-3" v-if="'{{SITE_TITLE}}' == 'LNbits'">
<div class="row q-col-gutter-lg justify-center"> <div class="row q-col-gutter-lg justify-center">
<div class="col-6 col-sm-4 col-md-8 q-gutter-y-sm"> <div class="col-6 col-sm-4 col-md-8 q-gutter-y-sm">
<q-btn <q-btn

View File

@@ -222,7 +222,7 @@
<q-card> <q-card>
<q-card-section> <q-card-section>
<h6 class="text-subtitle1 q-mt-none q-mb-sm"> <h6 class="text-subtitle1 q-mt-none q-mb-sm">
LNbits wallet: <strong><em>{{ wallet.name }}</em></strong> {{ SITE_TITLE }} wallet: <strong><em>{{ wallet.name }}</em></strong>
</h6> </h6>
</q-card-section> </q-card-section>
<q-card-section class="q-pa-none"> <q-card-section class="q-pa-none">

View File

@@ -31,7 +31,15 @@ LNBITS_DISABLED_EXTENSIONS: List[str] = env.list(
) )
LNBITS_SITE_TITLE = env.str("LNBITS_SITE_TITLE", default="LNbits") LNBITS_SITE_TITLE = env.str("LNBITS_SITE_TITLE", default="LNbits")
LNBITS_THEME_OPTIONS: List[str] = env.list("LNBITS_THEME_OPTIONS", default="classic, flamingo, mint, salvador, monochrome, autumn", subcast=str) LNBITS_SITE_TAGLINE = env.str(
"LNBITS_SITE_TAGLINE", default="free and open-source lightning wallet"
)
LNBITS_SITE_DESCRIPTION = env.str("LNBITS_SITE_DESCRIPTION", default="")
LNBITS_THEME_OPTIONS: List[str] = env.list(
"LNBITS_THEME_OPTIONS",
default="classic, flamingo, mint, salvador, monochrome, autumn",
subcast=str,
)
WALLET = wallet_class() WALLET = wallet_class()
DEFAULT_WALLET_NAME = env.str("LNBITS_DEFAULT_WALLET_NAME", default="LNbits wallet") DEFAULT_WALLET_NAME = env.str("LNBITS_DEFAULT_WALLET_NAME", default="LNbits wallet")

View File

@@ -155,10 +155,12 @@
> >
<q-toolbar> <q-toolbar>
<q-toolbar-title class="text-caption"> <q-toolbar-title class="text-caption">
<strong>LN</strong>bits, free and open-source lightning {{ SITE_TITLE }}, {{SITE_TAGLINE}}
wallet/accounts system
<br /> <br />
<small>Commit version: {{LNBITS_VERSION}}</small>
<small v-if="'{{SITE_TITLE}}' == 'LNbits'"
>Commit version: {{LNBITS_VERSION}}</small
>
</q-toolbar-title> </q-toolbar-title>
<q-space></q-space> <q-space></q-space>
<q-btn <q-btn