rms-support-letter.github.io/_includes/signatures.html

31 lines
1.2 KiB
HTML
Raw Normal View History

2021-03-27 10:24:26 +01:00
<p><b>Signed by {{ site.data.signed.size }} individuals:</b></p>
2021-03-26 18:43:51 +01:00
<ol>
<!--<li><a href="https://github.com/[1-999][1-999][1-999][1-999]">Spider Trap</a></li>-->
{%- capture signs -%}
{%- for sign_hash in site.data.signed -%}
{%- assign signature = sign_hash[1] -%}
{%- assign name = signature.name | strip -%}
{%- assign name_order = name | downcase -%}
{%- assign first_char = name_order | slice: 0 -%}
{%- assign first_number = first_char | plus: 0 | append: '' -%}
{%- if first_char == first_number -%}
{%- assign name_order = name_order | prepend: '~' -%}
{%- endif -%}
<array>{{ name_order | escape }}<field>
<field>{{ name | escape }}<field>
<field>{{ signature.link | strip | escape }}<field>
{%- endfor -%}
{%- endcapture -%}
2021-03-27 13:13:08 +01:00
{%- assign sorted_signs = signs | split: '<array>' | sort_natural -%}
{%- for signature in sorted_signs -%}
{%- assign sign_items = signature | split: '<field>' -%}
{%- if sign_items[2] and sign_items[4] -%}
{%- assign name = sign_items[2] -%}
{%- assign link = sign_items[4] -%}
{% comment %}Add whitespace{% endcomment %}
<li><a href="{{ link }}">{{ name }}</a></li>
{%- endif -%}
{%- endfor -%}
{% comment %}Add whitespace{% endcomment %}
</ol>