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.
 
 
 
 
 
 

56 lines
2.7 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 whose long-form has been placed in a magazine category 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>
{% for row in authors %}
{% set _fa_label = row.author.name|default('')|trim != '' ? row.author.name : (row.npub|shortenNpub) %}
<article class="featured-authors__card" aria-label="{{ _fa_label|e('html_attr') }}">
<div class="author-profile author-profile--featured">
{% include 'partial/author_profile_header.html.twig' with {
author: row.author,
npub: row.npub,
header_tag: 'h2',
show_nip05: false,
profile_nip05: [],
profile_websites: row.profile_websites,
profile_payment_links: row.profile_payment_links,
} only %}
</div>
<div class="featured-authors__actions">
<a class="btn btn-secondary" href="{{ path('author-profile', { npub: row.npub }) }}">Full profile</a>
</div>
</article>
{% else %}
<p class="text-subtle">No featured authors are listed yet. They appear when authors are added to magazine category indices and synced.</p>
{% endfor %}
{% if pagination is defined and pagination.last_page > 1 %}
{% set _page = pagination.page|default(1) %}
{% set _last = pagination.last_page|default(1) %}
<nav class="category-pagination mt-3" aria-label="Featured authors pagination">
{% if _page > 1 %}
<a class="btn btn-outline-secondary" href="{{ path('featured_authors', _page > 2 ? { page: _page - 1 } : {}) }}">Newer</a>
{% endif %}
<span class="mx-2 text-subtle">Page {{ _page }} of {{ _last }}</span>
{% if _page < _last %}
<a class="btn btn-outline-secondary" href="{{ path('featured_authors', { page: _page + 1 }) }}">Older</a>
{% endif %}
</nav>
{% endif %}
</div>
{% endblock %}
{% block aside %}
{% endblock %}