{# ---- Glyphes météo 1-bit (silhouettes pleines, nettes sur e-ink) ---- #} {% macro sun(cx, cy, r) -%} {% for a in [0,45,90,135,180,225,270,315] %} {% endfor %} {%- endmacro %} {% macro cloud(ox, oy, s) -%} {%- endmacro %} {% macro wxicon(kind) -%} {% if kind == 'clear' %}{{ sun(50, 50, 21) }} {% elif kind == 'partly' %}{{ sun(34, 32, 15) }}{{ cloud(18, 36, 0.78) }} {% elif kind == 'cloudy' %}{{ cloud(8, 22, 0.95) }} {% elif kind == 'fog' %}{{ cloud(8, 12, 0.9) }} {% for y in [76, 86, 96] %}{% endfor %} {% elif kind == 'rain' %}{{ cloud(8, 8, 0.92) }} {% for x in [30, 50, 70] %}{% endfor %} {% elif kind == 'snow' %}{{ cloud(8, 8, 0.92) }} {% for x in [30, 50, 70] %}{% endfor %} {% elif kind == 'storm' %}{{ cloud(8, 4, 0.92) }} {% else %}{{ cloud(8, 22, 0.95) }}{% endif %} {%- endmacro %} {# ---- Jauge : la signature ---- #} {% macro gauge(g, mini=False) -%}