{# pieces the computers' pages share #}
{# the tile of the system a computer runs, the plain screen while its node has not said #}
{% macro os(host) -%}
{% if host and host.system == "Linux" %}{% include "computers/icons/os-linux.svg" %}{% elif host and host.system == "Darwin" %}{% include "computers/icons/os-apple.svg" %}{% elif host and host.system == "Windows" %}{% include "computers/icons/os-windows.svg" %}{% else %}{% include "computers/icons/monitor.svg" %}{% endif %}
{%- endmacro %}
{# how full something is, as btop draws it: cells in the lanterns' colours by where each sits #}
{% macro cells(percent, n=16, wide=false) -%}
{%- set filled = (percent * n / 100) | round | int -%}
{% for i in range(n) %}{% set at = (i + 1) / n %}{% endfor %}
{%- endmacro %}
{# a mount as people name it: a Windows drive without its backslash #}
{% macro mount(disk) -%}{{ disk.mount[:-1] if disk.mount | length == 3 and disk.mount.endswith(":\\") else disk.mount }}{%- endmacro %}
{# a stall's awning, drawn as the street's: stripes of the stall's hue and the street's light one flaring out from the ridge pole, a band of shade along the front edge, and a scalloped hem with the underside of each fold in shade; drawn 360 wide and stretched to the card #}
{% macro awning() -%}
{%- set n, w, inset, top, front = 13, 360, 10, 9, 41 -%}
{%- set back, step = (w - 2 * inset) / n, w / n -%}
{%- set r = step / 2 -%}
{%- set dip = front + r * 0.55 -%}
{%- endmacro %}