Browse Source

add app icons and the PWA manifest

pull/13/head
Wojciech Kwolek 6 months ago
parent
commit
07e6660199
20 changed files with 182 additions and 0 deletions
  1. 4
      .gitignore
  2. BIN
      app/static/favicon.png
  3. 101
      app/static/icon.svg
  4. BIN
      app/static/icons/favicon.ico
  5. BIN
      app/static/icons/icon-120.png
  6. BIN
      app/static/icons/icon-128.png
  7. BIN
      app/static/icons/icon-152.png
  8. BIN
      app/static/icons/icon-16.png
  9. BIN
      app/static/icons/icon-167.png
  10. BIN
      app/static/icons/icon-180.png
  11. BIN
      app/static/icons/icon-192.png
  12. BIN
      app/static/icons/icon-196.png
  13. BIN
      app/static/icons/icon-228.png
  14. BIN
      app/static/icons/icon-256.png
  15. BIN
      app/static/icons/icon-32.png
  16. BIN
      app/static/icons/icon-512.png
  17. BIN
      app/static/icons/icon-64.png
  18. 20
      app/static/manifest.json
  19. 27
      app/templates/_skel.html
  20. 30
      gen_icons.sh

4
.gitignore

@ -2,6 +2,10 @@ node_modules/
*.db
__pycache__
# styles are generated by tailwind
app/static/style.css
# these are generated by flask digest compile
*-[0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f][0-9a-f].*
*.gz
cache_manifest.json

BIN
app/static/favicon.png

Before After
Width: 16  |  Height: 16  |  Size: 850 B

101
app/static/icon.svg

@ -0,0 +1,101 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
width="100mm"
height="100mm"
viewBox="0 0 100 100"
version="1.1"
id="svg8"
sodipodi:docname="icon.svg"
inkscape:export-filename="/home/wojciech/proj/@own/doneth.at/backend/app/static/icon-512.png"
inkscape:export-xdpi="130.05"
inkscape:export-ydpi="130.05"
inkscape:version="0.92.4 (5da689c313, 2019-01-14)">
<defs
id="defs2" />
<sodipodi:namedview
id="base"
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1.0"
inkscape:pageopacity="0.0"
inkscape:pageshadow="2"
inkscape:zoom="2.0584583"
inkscape:cx="188.97638"
inkscape:cy="199.99617"
inkscape:document-units="mm"
inkscape:current-layer="layer1"
showgrid="false"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0"
showguides="false"
inkscape:window-width="1344"
inkscape:window-height="726"
inkscape:window-x="9"
inkscape:window-y="9"
inkscape:window-maximized="0" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
<dc:title></dc:title>
</cc:Work>
</rdf:RDF>
</metadata>
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1"
transform="translate(-19.867501,-177.1325)">
<rect
id="rect10"
width="99.735703"
height="99.735703"
x="19.999651"
y="177.26465"
style="fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.2642996;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1"
ry="13.861281" />
<g
id="g5600"
transform="rotate(-90,69.8675,227.1325)">
<rect
ry="2.0045204"
y="193.42708"
x="32.447857"
height="17.764883"
width="25"
id="rect1848"
style="fill:#48bb78;fill-opacity:1;stroke:none;stroke-width:0.153162;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="2.0045204"
y="218.25006"
x="32.447857"
height="17.764883"
width="50"
id="rect1848-6"
style="fill:#ed8936;fill-opacity:1;stroke:none;stroke-width:0.21660379;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
<rect
ry="2.0045204"
y="243.07304"
x="32.447857"
height="17.764883"
width="74.839287"
id="rect1848-7"
style="fill:#f56565;fill-opacity:1;stroke:none;stroke-width:0.26499999;stroke-linecap:butt;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1" />
</g>
</g>
</svg>

BIN
app/static/icons/favicon.ico

Before After

BIN
app/static/icons/icon-120.png

Before After
Width: 120  |  Height: 120  |  Size: 1.4 KiB

BIN
app/static/icons/icon-128.png

Before After
Width: 128  |  Height: 128  |  Size: 1.5 KiB

BIN
app/static/icons/icon-152.png

Before After
Width: 152  |  Height: 152  |  Size: 1.8 KiB

BIN
app/static/icons/icon-16.png

Before After
Width: 16  |  Height: 16  |  Size: 327 B

BIN
app/static/icons/icon-167.png

Before After
Width: 167  |  Height: 167  |  Size: 2.0 KiB

BIN
app/static/icons/icon-180.png

Before After
Width: 180  |  Height: 180  |  Size: 2.1 KiB

BIN
app/static/icons/icon-192.png

Before After
Width: 192  |  Height: 192  |  Size: 2.2 KiB

BIN
app/static/icons/icon-196.png

Before After
Width: 196  |  Height: 196  |  Size: 2.3 KiB

BIN
app/static/icons/icon-228.png

Before After
Width: 228  |  Height: 228  |  Size: 2.7 KiB

BIN
app/static/icons/icon-256.png

Before After
Width: 256  |  Height: 256  |  Size: 3.0 KiB

BIN
app/static/icons/icon-32.png

Before After
Width: 32  |  Height: 32  |  Size: 440 B

BIN
app/static/icons/icon-512.png

Before After
Width: 512  |  Height: 512  |  Size: 6.6 KiB

BIN
app/static/icons/icon-64.png

Before After
Width: 64  |  Height: 64  |  Size: 836 B

20
app/static/manifest.json

@ -0,0 +1,20 @@
{
"name": "DoneTh.at",
"short_name": "DoneTh.at",
"start_url": "https://doneth.at",
"display": "standalone",
"background_color": "#fff",
"description": "An app to track your accomplishments.",
"icons": [
{
"src": "static/icons/icon-192.png",
"sizes": "192x192",
"type": "image/png"
},
{
"src": "static/icons/icon-512.png",
"sizes": "512x512",
"type": "image/png"
}
]
}

27
app/templates/_skel.html

@ -8,6 +8,33 @@
<meta charset="utf-8">
<link rel="stylesheet" href="{{ static_url_for('static', filename='style.css') }}">
<script src="{{ static_url_for('static', filename='js/turbolinks/turbolinks.js') }}"></script>
<link rel="manifest" href="{{ static_url_for('static', filename='manifest.json') }}">
<meta name="apple-mobile-web-app-title" content="DoneTh.at">
<meta name="apple-mobile-web-app-capable" content="yes">
<link rel="apple-touch-icon" href="{{ static_url_for('static', filename='icons/icon-180.png') }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ static_url_for('static', filename='icons/icon-120.png') }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ static_url_for('static', filename='icons/icon-180.png') }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ static_url_for('static', filename='icons/icon-152.png') }}">
<link rel="apple-touch-icon" sizes="167x167" href="{{ static_url_for('static', filename='icons/icon-167.png') }}">
<link rel="icon" type="image/png" href="{{ static_url_for('static', filename='icons/icon-32.png') }}" sizes="32x32">
<link rel="icon" type="image/png" href="{{ static_url_for('static', filename='icons/icon-128.png') }}"
sizes="128x128">
<link rel="icon" type="image/png" href="{{ static_url_for('static', filename='icons/icon-152.png') }}"
sizes="152x152">
<link rel="icon" type="image/png" href="{{ static_url_for('static', filename='icons/icon-167.png') }}"
sizes="167x167">
<link rel="icon" type="image/png" href="{{ static_url_for('static', filename='icons/icon-180.png') }}"
sizes="180x180">
<link rel="icon" type="image/png" href="{{ static_url_for('static', filename='icons/icon-192.png') }}"
sizes="192x192">
<link rel="icon" type="image/png" href="{{ static_url_for('static', filename='icons/icon-196.png') }}"
sizes="196x196">
<link rel="icon" type="image/png" href="{{ static_url_for('static', filename='icons/icon-256.png') }}"
sizes="256x256">
<link rel="icon" type="image/png" href="{{ static_url_for('static', filename='icons/icon-228.png') }}" <link
rel="icon" type="image/png" href="{{ static_url_for('static', filename='icons/icon-512.png') }}"
sizes="512x512">
<link rel="shortcut icon" href="{{ static_url_for('static', filename='icons/favicon.ico') }}">
{% endblock %}
</head>

30
gen_icons.sh

@ -0,0 +1,30 @@
#!/usr/bin/env bash
SRC=app/static/icon.svg
OUT=app/static/icons
gen_png() {
inkscape -z -w $1 -h $1 -y 0 $SRC -e $OUT/$2
}
ip() {
echo $OUT/icon-$1.png
}
g() {
gen_png $1 icon-$1.png
}
g 16
g 32
g 64
g 120
g 128
g 152
g 167
g 180
g 192
g 196
g 256
g 228
g 512
convert $(ip 16) $(ip 32) $(ip 64) $(ip 128) $(ip 256) $(ip 512) $OUT/favicon.ico
Loading…
Cancel
Save