You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

61 lines
2.9 KiB

{% extends 'base.html.twig' %}
{% block body %}
<div class="featured-authors">
<header class="featured-authors__intro">
<h1>Featured authors</h1>
<p class="text-subtle">
Authors are derived from pubkeys referenced by category index <code>a</code> tags and receive a
<abbr title="NIP-05">NIP-05</abbr> identifier
{% if nip05_domain|default('')|trim != '' %}
under <strong>{{ nip05_domain|e }}</strong>
{% endif %}
for easier discovery. Verification uses <code>/.well-known/nostr.json</code>.
</p>
</header>
{% if authors is not empty %}
<div class="featured-authors-grid" role="list">
{% for row in authors %}
{% set _name = row.display_name|default('')|trim %}
{% set _label = _name != '' ? _name : (row.npub|shortenNpub) %}
<a
class="featured-authors-grid__card"
href="{{ path('author-profile', { npub: row.npub }) }}"
aria-label="Open profile for {{ _label|e('html_attr') }}"
role="listitem"
>
<div class="featured-authors-grid__avatar">
{% if row.picture|default('')|trim != '' %}
<img src="{{ row.picture|e('html_attr') }}" alt="{{ _label|e('html_attr') }}">
{% else %}
<span class="featured-authors-grid__avatar-fallback">{{ _label|slice(0, 1)|upper }}</span>
{% endif %}
</div>
<div class="featured-authors-grid__name">{{ _label }}</div>
<div class="featured-authors-grid__handle text-subtle">@{{ row.local_part|e }}</div>
</a>
{% endfor %}
</div>
{% else %}
<p class="text-subtle">No featured authors are listed yet. They appear when authors are added to magazine category indices and synced.</p>
{% endif %}
{% if pagination is defined and pagination.last_page > 1 %}
{% set _page = pagination.page|default(1) %}
{% set _last = pagination.last_page|default(1) %}
{% set _prev_url = _page > 1 ? path('featured_authors', _page > 2 ? { page: _page - 1 } : {}) : null %}
{% set _next_url = _page < _last ? path('featured_authors', { page: _page + 1 }) : null %}
{% include 'components/Molecules/Pagination.html.twig' with {
page: _page,
last_page: _last,
prev_url: _prev_url,
next_url: _next_url,
aria_label: 'Featured authors pagination',
} only %}
{% endif %}
</div>
{% endblock %}
{% block aside %}
{% endblock %}