image build
This commit is contained in:
parent
5a02d75f7c
commit
1a9753db49
|
@ -2,3 +2,5 @@
|
|||
|
||||
__pycache__
|
||||
celerybeat-schedule
|
||||
.doit.db
|
||||
static/logotype*.png
|
||||
|
|
Before Width: | Height: | Size: 3.5 KiB After Width: | Height: | Size: 3.5 KiB |
Before Width: | Height: | Size: 146 KiB After Width: | Height: | Size: 146 KiB |
|
@ -0,0 +1,26 @@
|
|||
def task_gen_logo():
|
||||
"""generate versions of the logo in various sizes"""
|
||||
|
||||
from PIL import Image
|
||||
|
||||
widths = (200, 400, 600, 800)
|
||||
|
||||
def gen_logo():
|
||||
with Image.open('assets/logotype.png') as im:
|
||||
im = im.convert('L')
|
||||
for width in widths:
|
||||
height = im.height * width // im.width
|
||||
new = im.resize((width,height), resample=Image.LANCZOS)
|
||||
new.save('static/logotype-{}.png'.format(width))
|
||||
im.save('static/logotype.png')
|
||||
|
||||
return {
|
||||
'actions': [gen_logo],
|
||||
'targets': [f'static/logotype-{width}.png' for width in widths]\
|
||||
+ ['static/logotype.png'],
|
||||
'file_dep': ['assets/logotype.png'],
|
||||
}
|
||||
|
||||
if __name__ == '__main__':
|
||||
import doit
|
||||
doit.run(globals())
|
BIN
media/promo1.png
BIN
media/promo1.png
Binary file not shown.
Before Width: | Height: | Size: 98 KiB |
BIN
media/promo2.png
BIN
media/promo2.png
Binary file not shown.
Before Width: | Height: | Size: 91 KiB |
|
@ -4,7 +4,9 @@ billiard==3.5.0.3
|
|||
blinker==1.4
|
||||
celery==4.1.0
|
||||
click==6.7
|
||||
cloudpickle==0.4.0
|
||||
contextlib2==0.5.5
|
||||
doit==0.30.3
|
||||
Flask==0.12.2
|
||||
Flask-Limiter==0.9.5
|
||||
Flask-Migrate==2.0.4
|
||||
|
@ -18,7 +20,10 @@ kombu==4.1.0
|
|||
limits==1.2.1
|
||||
Mako==1.0.6
|
||||
MarkupSafe==1.0
|
||||
olefile==0.44
|
||||
Pillow==4.2.1
|
||||
psycopg2==2.7.1
|
||||
pyinotify==0.9.6
|
||||
python-dateutil==2.6.0
|
||||
python-editor==1.0.3
|
||||
pytz==2017.2
|
||||
|
|
|
@ -17,7 +17,9 @@
|
|||
<header>
|
||||
<h1>
|
||||
<a href="{{url_for('index')}}">
|
||||
<img src="{{ st('logotype.png') }}" alt="Forget" width=200 />
|
||||
<img src="{{ st('logotype-200.png') }}" alt="Forget" width=200 srcset="{% for width in (200,400,600,800) -%}
|
||||
{{ st('logotype-{}.png'.format(width)) }} {{width}}w,
|
||||
{%- endfor %}"/>
|
||||
</a>
|
||||
</h1>
|
||||
</header>
|
||||
|
|
|
@ -15,6 +15,11 @@ while read old new refname; do
|
|||
pip install -r requirements.txt
|
||||
tools/write-version.sh
|
||||
FLASK_APP='forget.py' flask db upgrade
|
||||
if [[ $(git diff --name-only ${old}..${new} dodo.py) == 'dodo.py' ]]
|
||||
then
|
||||
doit forget
|
||||
fi
|
||||
doit
|
||||
)
|
||||
systemctl --user start forget
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue