clone of github.com/decent-newsroom/newsroom
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.
 
 
 
 
 
 

57 lines
2.7 KiB

{% extends 'layout.html.twig' %}
{% block body %}
<section class="d-flex gap-3 center ln-section--newsstand">
<div class="container mt-5 mb-1">
<h1>Your NZines</h1>
<p class="eyebrow">manage your digital magazines</p>
</div>
<div class="cta-row mb-5">
<a class="btn btn-primary" href="{{ path('nzine_index') }}">Create new</a>
</div>
</section>
<div class="w-container mb-5 mt-5">
{% if nzines is defined and nzines|length %}
<ul class="list-unstyled d-grid gap-2 mb-4">
{% for nzine in nzines %}
<li class="card p-3">
<div class="d-flex justify-content-between align-items-start gap-3">
<div class="flex-fill">
<h3 class="h5 m-0">{{ nzine.title }}</h3>
{% if nzine.summary %}<p class="small mt-1 mb-0">{{ nzine.summary }}</p>{% endif %}
<small class="text-muted">
categories: {{ nzine.categoryCount }}
{% if nzine.slug %} • slug: {{ nzine.slug }}{% endif %}
• state: <span class="badge bg-{{ nzine.state == 'published' ? 'success' : 'secondary' }}">{{ nzine.state }}</span>
{% if nzine.feedUrl %} • <span title="{{ nzine.feedUrl }}">RSS feed configured</span>{% endif %}
</small>
</div>
<div class="d-flex flex-row gap-2">
<a class="btn btn-sm btn-primary" href="{{ path('nzine_edit', { npub: nzine.npub }) }}">Edit</a>
{% if nzine.hasMainIndex %}
<a class="btn btn-sm btn-outline-primary" href="{{ path('nzine_view', { pubkey: nzine.npub }) }}">View</a>
{% else %}
<span class="btn btn-sm btn-outline-secondary disabled" title="Publish the NZine first">View</span>
{% endif %}
{% if nzine.npub %}
<span data-controller="utility--copy-to-clipboard">
<span class="hidden" data-utility--copy-to-clipboard-target="textToCopy">{{ nzine.npub }}</span>
<button class="btn btn-sm btn-secondary"
data-utility--copy-to-clipboard-target="copyButton"
data-action="click->utility--copy-to-clipboard#copyToClipboard"
title="Copy npub">Copy npub</button>
</span>
{% endif %}
</div>
</div>
</li>
{% endfor %}
</ul>
{% else %}
<p><small>No NZines found. Create your first digital magazine!</small></p>
{% endif %}
</div>
{% endblock %}