Restored custom CSS file functionality, fix GH-135

This commit is contained in:
krateng 2022-04-26 19:43:35 +02:00
parent 0c948561a8
commit 6171d1d2e1
3 changed files with 8 additions and 0 deletions

View File

@ -1,5 +1,6 @@
from . import filters from . import filters
from ..pkg_global.conf import malojaconfig from ..pkg_global.conf import malojaconfig
from ..pkg_global import conf
from .. import database, malojatime, images, malojauri, thirdparty, __pkginfo__ from .. import database, malojatime, images, malojauri, thirdparty, __pkginfo__
from ..database import jinjaview from ..database import jinjaview
@ -32,6 +33,7 @@ def update_jinja_environment():
"mlj_uri": malojauri, "mlj_uri": malojauri,
"settings": malojaconfig, "settings": malojaconfig,
"thirdparty": thirdparty, "thirdparty": thirdparty,
"conf":conf,
"pkginfo": __pkginfo__, "pkginfo": __pkginfo__,
# external # external
"urllib": urllib, "urllib": urllib,

View File

@ -326,6 +326,9 @@ config(
custom_css_files = [f for f in os.listdir(data_dir['css']()) if f.lower().endswith('.css')]
# what the fuck did i just write # what the fuck did i just write
# this spaghetti file is proudly sponsored by the rice crackers i'm eating at the # this spaghetti file is proudly sponsored by the rice crackers i'm eating at the

View File

@ -14,6 +14,9 @@
<link rel="stylesheet" href="/maloja.css" /> <link rel="stylesheet" href="/maloja.css" />
<link rel="stylesheet" href="/static/css/themes/{{ settings.theme }}.css" /> <link rel="stylesheet" href="/static/css/themes/{{ settings.theme }}.css" />
{% for cssf in conf.custom_css_files %}
<link rel="stylesheet" href="/static_custom/css/{{ cssf }}" />
{% endfor %}
<script src="/search.js"></script> <script src="/search.js"></script>
<script src="/neopolitan.js"></script> <script src="/neopolitan.js"></script>