1
0
mirror of https://github.com/krateng/maloja.git synced 2023-08-10 21:12:55 +03:00

Added ability to add custom css files, fix GH-79

This commit is contained in:
krateng
2021-12-12 13:53:02 +01:00
parent 98ec5885e7
commit 383c24511f
4 changed files with 10 additions and 3 deletions

View File

@@ -0,0 +1 @@
In this folder, you can place any number of CSS files to change Maloja's style.

View File

@@ -123,6 +123,7 @@ data_directories = {
"rules":pthj(dir_settings['config'],"rules"),
"clients":pthj(dir_settings['config'],"clients"),
"settings":pthj(dir_settings['config'],"settings"),
"css":pthj(dir_settings['config'],"custom_css"),
"logs":pthj(dir_settings['logs']),
"cache":pthj(dir_settings['cache']),
}

View File

@@ -70,6 +70,11 @@ def generate_css():
with open(os.path.join(STATICFOLDER,"css",f),"r") as fd:
css += fd.read()
for f in os.listdir(data_dir['css']()):
if f.endswith(".css"):
with open(os.path.join(data_dir['css'](f)),"r") as fd:
css += fd.read()
css = css_minify(css)
return css