This commit is contained in:
Michał 2023-04-22 14:11:47 +00:00
parent 13a0b21710
commit 113391dc74
3 changed files with 4 additions and 4 deletions

View file

@ -126,7 +126,7 @@ def create_app(): # pylint: disable=R0914
app.register_blueprint(api_media.blueprint)
app.register_blueprint(api_group.blueprint)
app.register_blueprint(api_account.blueprint)
# FILTERS
app.register_blueprint(filters.blueprint)

View file

@ -44,4 +44,4 @@ INSTANCE_DIR = instance_dir
MIGRATIONS_DIR = os.path.join(INSTANCE_DIR, "migrations")
# App
APP_VERSION = importlib.metadata.version("OnlyLegs")
APP_VERSION = importlib.metadata.version("OnlyLegs")

View file

@ -6,7 +6,7 @@ from flask import Blueprint
from onlylegs.utils import contrast
blueprint = Blueprint('filters', __name__)
blueprint = Blueprint("filters", __name__)
@blueprint.app_template_filter()
@ -18,5 +18,5 @@ def colour_contrast(colour):
"""
bright = "var(--fg-white)"
dark = "var(--fg-black)"
return "color: RGB(" + contrast.contrast(colour, dark, bright) + ");"