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.
83 lines
2.6 KiB
83 lines
2.6 KiB
{% extends 'base.html.twig' %} |
|
|
|
{% block ogtags %} |
|
<meta property="og:title" content="{{ article.title }}"> |
|
<meta property="og:type" content="article"> |
|
<meta property="og:url" content="{{ app.request.uri }}"> |
|
{% if article.image %} |
|
<meta property="og:image" content="{{ article.image }}"> |
|
{% endif %} |
|
<meta property="og:description" content="{{ article.summary|striptags|u.truncate(159,'…')|e }}"> |
|
<meta property="og:site_name" content="Newsroom"> |
|
{% endblock %} |
|
|
|
{% block body %} |
|
|
|
|
|
{% if is_granted('ROLE_ADMIN') %} |
|
<button class="btn btn-primary" onclick="navigator.clipboard.writeText('30023:{{ article.pubkey }}:{{ article.slug }}')"> |
|
Copy coordinates |
|
</button> |
|
{% endif %} |
|
|
|
<div class="card"> |
|
<div class="card-header"> |
|
<h1 class="card-title">{{ article.title }}</h1> |
|
</div> |
|
{% if author %} |
|
<div class="byline"> |
|
<span> |
|
{{ 'text.byline'|trans }} <a href="{{ path('author-redirect', {'pubkey': article.pubkey}) }}"> |
|
<twig:Atoms:NameOrNpub :author="author" :npub="npub" /> |
|
</a> |
|
</span> |
|
<span> |
|
{% if article.publishedAt is not null %} |
|
<small>{{ article.publishedAt|date('F j, Y') }}</small> |
|
{% else %} |
|
<small> |
|
{# <twig:ux:icon name="heroicons:pencil" class="icon" /> #} |
|
{{ article.createdAt|date('F j, Y') }}</small><br> |
|
{% endif %} |
|
</span> |
|
</div> |
|
{% endif %} |
|
</div> |
|
<div class="card-body"> |
|
<div class="lede"> |
|
{{ article.summary }} |
|
</div> |
|
|
|
{% if article.image %} |
|
<div class="article__image"> |
|
<img src="{{ article.image }}" alt="{{ article.title }}"> |
|
</div> |
|
{% endif %} |
|
|
|
<div class="article-main"> |
|
{{ content|raw }} |
|
</div> |
|
|
|
{% if article.topics|length > 0 %} |
|
<hr class="divider" /> |
|
<div class="tags"> |
|
{% for tag in article.topics %} |
|
<span class="tag">{{ tag }}</span> |
|
{% endfor %} |
|
</div> |
|
{% endif %} |
|
|
|
</div> |
|
|
|
<hr class="divider" /> |
|
|
|
{# <pre>#} |
|
{# {{ article.content }}#} |
|
{# </pre>#} |
|
<twig:Organisms:Comments current="30023:{{ article.pubkey }}:{{ article.slug|e }}"></twig:Organisms:Comments> |
|
{% endblock %} |
|
|
|
{% block aside %} |
|
{# <h1>Suggestions</h1>#} |
|
{# <twig:Organisms:CardList :list="suggestions" />#} |
|
{% endblock %}
|
|
|