peach-workspace/peach-web/templates/scuttlebutt/peers_list.html.tera

31 lines
1.3 KiB
Plaintext

{%- extends "nav" -%}
{%- block card %}
<div class="card center">
{%- if peers %}
<ul class="center list">
{%- for peer in peers %}
{# set a fall-back value for name in case the data is unavailable #}
{%- if not peer['name'] %}
{%- set name = "name unavailable" %}
{%- else %}
{%- set name = peer['name'] %}
{%- endif %}
<li>
<a class="list-item link" href="/scuttlebutt/profile?public_key={{ peer['id'] }}">
{%- if peer['blob_path'] and peer['blob_exists'] == "true" %}
<img id="peerImage" class="icon list-icon" src="/blob/{{ peer['blob_path'] }}" alt="{{ name }}'s profile image">
{%- else %}
<img id="peerImage" class="icon icon-active list-icon" src="/icons/user.svg" alt="Placeholder profile image">
{%- endif %}
<p id="peerName" class="font-normal list-text">{{ name }}</p>
<label class="label-small label-ellipsis list-label font-gray" for="peerName" title="{{ name }}'s Public Key">{{ peer['id'] }}</label>
</a>
</li>
{%- endfor %}
</ul>
{%- else %}
<p>No follows found</p>
{%- endif %}
</div>
{%- endblock card -%}