mirror of
https://github.com/Derpy-Leggies/OnlyLegs.git
synced 2025-06-29 03:26:16 +00:00
Black
This commit is contained in:
parent
13a0b21710
commit
113391dc74
3 changed files with 4 additions and 4 deletions
|
@ -126,7 +126,7 @@ def create_app(): # pylint: disable=R0914
|
||||||
app.register_blueprint(api_media.blueprint)
|
app.register_blueprint(api_media.blueprint)
|
||||||
app.register_blueprint(api_group.blueprint)
|
app.register_blueprint(api_group.blueprint)
|
||||||
app.register_blueprint(api_account.blueprint)
|
app.register_blueprint(api_account.blueprint)
|
||||||
|
|
||||||
# FILTERS
|
# FILTERS
|
||||||
app.register_blueprint(filters.blueprint)
|
app.register_blueprint(filters.blueprint)
|
||||||
|
|
||||||
|
|
|
@ -44,4 +44,4 @@ INSTANCE_DIR = instance_dir
|
||||||
MIGRATIONS_DIR = os.path.join(INSTANCE_DIR, "migrations")
|
MIGRATIONS_DIR = os.path.join(INSTANCE_DIR, "migrations")
|
||||||
|
|
||||||
# App
|
# App
|
||||||
APP_VERSION = importlib.metadata.version("OnlyLegs")
|
APP_VERSION = importlib.metadata.version("OnlyLegs")
|
||||||
|
|
|
@ -6,7 +6,7 @@ from flask import Blueprint
|
||||||
from onlylegs.utils import contrast
|
from onlylegs.utils import contrast
|
||||||
|
|
||||||
|
|
||||||
blueprint = Blueprint('filters', __name__)
|
blueprint = Blueprint("filters", __name__)
|
||||||
|
|
||||||
|
|
||||||
@blueprint.app_template_filter()
|
@blueprint.app_template_filter()
|
||||||
|
@ -18,5 +18,5 @@ def colour_contrast(colour):
|
||||||
"""
|
"""
|
||||||
bright = "var(--fg-white)"
|
bright = "var(--fg-white)"
|
||||||
dark = "var(--fg-black)"
|
dark = "var(--fg-black)"
|
||||||
|
|
||||||
return "color: RGB(" + contrast.contrast(colour, dark, bright) + ");"
|
return "color: RGB(" + contrast.contrast(colour, dark, bright) + ");"
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue