{% macro nav_link(endpoint, cls='', url_args={}) -%} {%- set u = url_for(endpoint, **url_args) -%} {%- if (not url_args and u == request.path) or (request.path != '/' and u.startswith(request.path)) -%} class="nav-link active {{cls}}" href="{{u}}" {%- else -%} class="nav-link {{cls}}" href="{{u}}" {%- endif -%} {%- endmacro -%} {%- macro offsite(svg_offsite, bg, width=10, w2=5.982) -%} data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22{{width}}%22%20height%3D%22{{width}}%22%3E%0A%20%20%3Cg%20transform%3D%22translate%28-826.429%20-698.791%29%22%3E%0A%20%20%20%20%3Crect%20width%3D%22{{w2}}%22%20height%3D%22{{w2}}%22%20x%3D%22826.929%22%20y%3D%22702.309%22%20fill%3D%22%23{{bg[1:]}}%22%20stroke%3D%22%23{{svg_offsite[1:]}}%22%2F%3E%0A%20%20%20%20%3Cg%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M831.194%20698.791h5.234v5.391l-1.571%201.545-1.31-1.31-2.725%202.725-2.689-2.689%202.808-2.808-1.311-1.311z%22%20fill%3D%22%23{{svg_offsite[1:]}}%22%2F%3E%0A%20%20%20%20%20%20%3Cpath%20d%3D%22M835.424%20699.795l.022%204.885-1.817-1.817-2.881%202.881-1.228-1.228%202.881-2.881-1.851-1.851z%22%20fill%3D%22%23{{bg[1:]}}%22%2F%3E%0A%20%20%20%20%3C%2Fg%3E%0A%20%20%3C%2Fg%3E%0A%3C%2Fsvg%3E {%- endmacro -%} {% macro maintainer(style='text') -%} {# return email addr of maintainer could really just return 'ian.castleden@uwa.edu.au' but we don't want bots to snaffle it. #} {% if style == 'inline' -%} {{ include_raw('fragments/email.svg') }} {%- elif style == 'footer' -%} {%- else -%} {{ config.EMAIL }} {% endif %} {%- endmacro %}