10 changed files with 241 additions and 238 deletions
@ -0,0 +1,90 @@
@@ -0,0 +1,90 @@
|
||||
<aside class="editor-articlelist-sidebar" data-controller="editor--articlelist-panels"> |
||||
<div class="editor-sidebar-tabs"> |
||||
<button |
||||
type="button" |
||||
class="editor-sidebar-tab is-active" |
||||
data-editor--articlelist-panels-target="tab" |
||||
data-panel="articles" |
||||
data-action="editor--articlelist-panels#switch" |
||||
> |
||||
Articles |
||||
</button> |
||||
</div> |
||||
<section class="editor-sidebar-panels"> |
||||
<div |
||||
class="editor-panel" |
||||
data-editor--articlelist-panels-target="panel" |
||||
data-panel="articles" |
||||
> |
||||
<div class="articlelist-content" data-articlelist-target="list"> |
||||
{% if is_granted('ROLE_USER') %} |
||||
{% if readingLists is defined and readingLists|length > 0 %} |
||||
{% for list in readingLists %} |
||||
<details class="mb-2"> |
||||
<summary> |
||||
{{ list.title|default('Untitled List') }} |
||||
{% if list.summary is defined and list.summary %} |
||||
<span class="readinglist-summary">— {{ list.summary }}</span> |
||||
{% endif %} |
||||
</summary> |
||||
<ul class="list-unstyled"> |
||||
{% if list.articles|length > 0 %} |
||||
{% for articleObj in list.articles %} |
||||
{% set article = articleObj.article %} |
||||
<li class="readinglist-article"> |
||||
<span class="article-icon" title="{{ article.kind == 30024 ? 'Draft' : 'Published' }}"> |
||||
{% if article.kind == 30024 %} |
||||
<span style="color: orange; font-weight: bold;"></span><span class="article-kind">D</span> |
||||
{% else %} |
||||
<span style="color: #22c55e; font-weight: bold;"></span><span class="article-kind">A</span> |
||||
{% endif %} |
||||
</span> |
||||
<a href="{{ path('editor-preview-npub-slug', {npub: article.pubkey|toNpub , slug: article.slug}) }}"> |
||||
{{ article.title|default(article.slug) }} |
||||
</a> |
||||
<span>by {{ articleObj.author.name }}</span> |
||||
</li> |
||||
{% endfor %} |
||||
{% else %} |
||||
<li class="readinglist-empty">No articles in this list.</li> |
||||
{% endif %} |
||||
</ul> |
||||
</details> |
||||
{% endfor %} |
||||
{% endif %} |
||||
<ul class="list-unstyled"> |
||||
{% for recent in recentArticles %} |
||||
<li class="mb-2"> |
||||
<span class="article-icon" title="Published"> |
||||
<span style="color: #22c55e; font-weight: bold;"></span><span class="article-kind">A</span> |
||||
</span> |
||||
<a href="{{ path('editor-edit-slug', {slug: recent.slug}) }}"> |
||||
{{ recent.title }} ({{ recent.publishedAt|date('Y-m-d') }}) |
||||
</a> |
||||
</li> |
||||
{% else %} |
||||
<li>No recent articles found.</li> |
||||
{% endfor %} |
||||
</ul> |
||||
<ul class="list-unstyled"> |
||||
{% for draft in drafts %} |
||||
<li> |
||||
<span class="article-icon" title="Draft"> |
||||
<span style="color: orange; font-weight: bold;"></span><span class="article-kind">D</span> |
||||
</span> |
||||
<a href="{{ path('editor-edit-slug', {slug: draft.slug}) }}"> |
||||
{{ draft.title }} ({{ draft.updatedAt|date('Y-m-d') }}) |
||||
</a> |
||||
</li> |
||||
{% else %} |
||||
<li>No drafts found.</li> |
||||
{% endfor %} |
||||
</ul> |
||||
{% else %} |
||||
<div class="articlelist-placeholder">Sign in to see your articles.</div> |
||||
{% endif %} |
||||
</div> |
||||
</div> |
||||
</section> |
||||
</aside> |
||||
|
||||
Loading…
Reference in new issue