process all assets thru doit
This commit is contained in:
parent
d6c45a73a6
commit
dd212ce1c3
|
@ -3,4 +3,5 @@
|
|||
__pycache__
|
||||
celerybeat-schedule
|
||||
.doit.db
|
||||
static/logotype*.png
|
||||
static/
|
||||
|
||||
|
|
Binary file not shown.
After Width: | Height: | Size: 6.7 KiB |
24
dodo.py
24
dodo.py
|
@ -21,6 +21,30 @@ def task_gen_logo():
|
|||
'file_dep': ['assets/logotype.png'],
|
||||
}
|
||||
|
||||
def task_copy_icon():
|
||||
import shutil
|
||||
return {
|
||||
'actions': [lambda: shutil.copy('assets/icon.png', 'static/icon.png')],
|
||||
'targets': ['static/icon.png'],
|
||||
'file_dep': ['assets/icon.png'],
|
||||
}
|
||||
|
||||
def task_minify_css():
|
||||
"""minify css"""
|
||||
|
||||
from csscompressor import compress
|
||||
|
||||
def minify():
|
||||
with open('assets/styles.css') as in_:
|
||||
with open('static/styles.css', 'w') as out:
|
||||
out.write(compress(in_.read()))
|
||||
|
||||
return {
|
||||
'actions': [minify],
|
||||
'targets': ['static/styles.css'],
|
||||
'file_dep': ['assets/styles.css'],
|
||||
}
|
||||
|
||||
if __name__ == '__main__':
|
||||
import doit
|
||||
doit.run(globals())
|
||||
|
|
|
@ -6,6 +6,7 @@ celery==4.1.0
|
|||
click==6.7
|
||||
cloudpickle==0.4.0
|
||||
contextlib2==0.5.5
|
||||
csscompressor==0.9.4
|
||||
doit==0.30.3
|
||||
Flask==0.12.2
|
||||
Flask-Limiter==0.9.5
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
<html lang=en prefix='og: http://ogp.me/ns#'>
|
||||
<head>
|
||||
<title>Forget</title>
|
||||
<link rel='stylesheet' href='{{ st("style.css") }}' />
|
||||
<link rel='stylesheet' href='{{ st("styles.css") }}' />
|
||||
<meta name='viewport' content='width=device-width, initial-scale=1'>
|
||||
<link rel='icon' href='{{ st("icon.png") }}' />
|
||||
<meta name='og:title' content='Forget'/>
|
||||
|
|
Loading…
Reference in New Issue