forked from Github-Mirrors/canaille
feat: THEME can be a relative path
This commit is contained in:
parent
97394823bf
commit
445d854af1
10 changed files with 13 additions and 9 deletions
|
@ -6,6 +6,10 @@ and this project adheres to `Semantic Versioning <https://semver.org/spec/v2.0.0
|
|||
[0.0.39] - 2023-12-15
|
||||
=====================
|
||||
|
||||
Added
|
||||
*****
|
||||
- ``THEME`` can be a relative path
|
||||
|
||||
Fixed
|
||||
*****
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@ if flask_themer:
|
|||
|
||||
def setup_themer(app):
|
||||
additional_themes_dir = (
|
||||
os.path.dirname(app.config["THEME"])
|
||||
os.path.abspath(os.path.dirname(app.config["THEME"]))
|
||||
if app.config.get("THEME") and os.path.exists(app.config["THEME"])
|
||||
else None
|
||||
)
|
||||
|
|
|
@ -17,7 +17,7 @@ SECRET_KEY = "change me before you go in production"
|
|||
# Your favicon. If unset the LOGO will be used.
|
||||
# FAVICON = "/static/img/canaille-c.webp"
|
||||
|
||||
# The name of a theme in the 'theme' directory, or an absolute path
|
||||
# The name of a theme in the 'theme' directory, or a path path
|
||||
# to a theme. Defaults to 'default'. Theming is done with
|
||||
# https://github.com/tktech/flask-themer
|
||||
# THEME = "default"
|
||||
|
|
|
@ -17,7 +17,7 @@ LOGO = "/static/img/canaille-head.webp"
|
|||
# Your favicon. If unset the LOGO will be used.
|
||||
FAVICON = "/static/img/canaille-c.webp"
|
||||
|
||||
# The name of a theme in the 'theme' directory, or an absolute path
|
||||
# The name of a theme in the 'theme' directory, or a path path
|
||||
# to a theme. Defaults to 'default'. Theming is done with
|
||||
# https://github.com/tktech/flask-themer
|
||||
# THEME = "default"
|
||||
|
|
|
@ -17,7 +17,7 @@ LOGO = "/static/img/canaille-head.webp"
|
|||
# Your favicon. If unset the LOGO will be used.
|
||||
FAVICON = "/static/img/canaille-c.webp"
|
||||
|
||||
# The name of a theme in the 'theme' directory, or an absolute path
|
||||
# The name of a theme in the 'theme' directory, or a path path
|
||||
# to a theme. Defaults to 'default'. Theming is done with
|
||||
# https://github.com/tktech/flask-themer
|
||||
# THEME = "default"
|
||||
|
|
|
@ -17,7 +17,7 @@ LOGO = "/static/img/canaille-head.webp"
|
|||
# Your favicon. If unset the LOGO will be used.
|
||||
FAVICON = "/static/img/canaille-c.webp"
|
||||
|
||||
# The name of a theme in the 'theme' directory, or an absolute path
|
||||
# The name of a theme in the 'theme' directory, or a path path
|
||||
# to a theme. Defaults to 'default'. Theming is done with
|
||||
# https://github.com/tktech/flask-themer
|
||||
# THEME = "default"
|
||||
|
|
|
@ -17,7 +17,7 @@ LOGO = "/static/img/canaille-head.webp"
|
|||
# Your favicon. If unset the LOGO will be used.
|
||||
FAVICON = "/static/img/canaille-c.webp"
|
||||
|
||||
# The name of a theme in the 'theme' directory, or an absolute path
|
||||
# The name of a theme in the 'theme' directory, or a path path
|
||||
# to a theme. Defaults to 'default'. Theming is done with
|
||||
# https://github.com/tktech/flask-themer
|
||||
# THEME = "default"
|
||||
|
|
|
@ -17,7 +17,7 @@ LOGO = "/static/img/canaille-head.webp"
|
|||
# Your favicon. If unset the LOGO will be used.
|
||||
FAVICON = "/static/img/canaille-c.webp"
|
||||
|
||||
# The name of a theme in the 'theme' directory, or an absolute path
|
||||
# The name of a theme in the 'theme' directory, or a path path
|
||||
# to a theme. Defaults to 'default'. Theming is done with
|
||||
# https://github.com/tktech/flask-themer
|
||||
# THEME = "default"
|
||||
|
|
|
@ -17,7 +17,7 @@ LOGO = "/static/img/canaille-head.webp"
|
|||
# Your favicon. If unset the LOGO will be used.
|
||||
FAVICON = "/static/img/canaille-c.webp"
|
||||
|
||||
# The name of a theme in the 'theme' directory, or an absolute path
|
||||
# The name of a theme in the 'theme' directory, or a path path
|
||||
# to a theme. Defaults to 'default'. Theming is done with
|
||||
# https://github.com/tktech/flask-themer
|
||||
# THEME = "default"
|
||||
|
|
|
@ -38,7 +38,7 @@ Canaille is based on Flask, so any `flask configuration <https://flask.palletspr
|
|||
|
||||
:THEME:
|
||||
*Optional.* The name or the path to a canaille theme.
|
||||
If the value is just a name, the theme should be in a directory with that namein the *themes* directory.
|
||||
If the value is just a name, the theme should be in a directory with that name in the *themes* directory.
|
||||
|
||||
:LANGUAGE:
|
||||
*Optional.* The locale code of the language to use. If not set, the language of the browser will be used.
|
||||
|
|
Loading…
Reference in a new issue