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:
1
maloja/data_files/config/custom_css/customcss.info
Normal file
1
maloja/data_files/config/custom_css/customcss.info
Normal file
@@ -0,0 +1 @@
|
||||
In this folder, you can place any number of CSS files to change Maloja's style.
|
||||
@@ -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']),
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user