39 lines
1.4 KiB
Twig
39 lines
1.4 KiB
Twig
<article class="post {{ post.feather }}{{ post.pinned ? ' pinned' : '' }}" id="post_{{ post.id }}">
|
|
<header>
|
|
<span class="permalink">
|
|
<a href="{{ post.url() }}" rel="bookmark" title="{{ 'Permanent link to “%s”' | translate | format(post.title | striptags | normalize | fix(true)) }}">†</a>
|
|
</span>
|
|
<span class="time">
|
|
{% if post.status == "draft" %}
|
|
{{ "Drafted on %s." | translate | format(post.created_at | time) }}
|
|
{% elseif post.status == "scheduled" %}
|
|
{{ "Scheduled for %s." | translate | format(post.created_at | time) }}
|
|
{% elseif post.pinned %}
|
|
{{ "Pinned on %s." | translate | format(post.created_at | time) }}
|
|
{% else %}
|
|
{{ "Posted on %s." | translate | format(post.created_at | time) }}
|
|
{% endif %}
|
|
</span>
|
|
{% if module_enabled("categorize") and post.category is defined %}
|
|
<span class="category">
|
|
{% set category_name = post.category.name | oneof("[Untitled]" | translate) %}
|
|
{% set category_link = '<a href="' ~ post.category.url ~ '" rel="tag">' ~ category_name ~ '</a>' %}
|
|
{{ "Filed in %s." | translate | format(category_link) }}
|
|
</span>
|
|
{% endif %}
|
|
{% if (module_enabled("tags") and post.tags_link is not empty) %}
|
|
<span class="tags">
|
|
{{ "Tagged with %s." | translate | format(post.tags_link | join(", ")) }}
|
|
</span>
|
|
{% endif %}
|
|
</header>
|
|
{% block content %}{% endblock %}
|
|
<footer>
|
|
{% if post.editable() or post.deletable() %}
|
|
<div class="doaction admin">
|
|
{{ post.edit_link() }} {{ post.delete_link() }}
|
|
</div>
|
|
{% endif %}
|
|
</footer>
|
|
</article>
|