54 lines
1.8 KiB
Twig
54 lines
1.8 KiB
Twig
{% extends "layouts" ~ DIR ~ "default.twig" %}
|
|
|
|
{% block content %}
|
|
{% if posts.paginated is not empty or pages is not empty %}
|
|
<div class="filter">{{ "Search results for “%s”" | translate | format(search | fix) }}</div>
|
|
{% else %}
|
|
<div role="status">{{ "Your search did not return any results." | translate }}</div>
|
|
{% endif %}
|
|
{% if pages is not empty %}
|
|
<details{% if posts.paginated is empty %} open{% endif %}>
|
|
<summary>{{ "Pages containing the search term" | translate }}</summary>
|
|
{% for page in pages %}
|
|
<article class="fragment">
|
|
<header>
|
|
<span class="permalink">
|
|
<a href="{{ page.url() }}" rel="bookmark" title="{{ 'Permanent link to “%s”' | translate | format(page.title | striptags | normalize | fix(true)) }}">†</a>
|
|
</span>
|
|
<span class="time">
|
|
{% if page.updated %}
|
|
{{ "Updated on %s." | translate | format(page.updated_at | time) }}
|
|
{% else %}
|
|
{{ "Created on %s." | translate | format(page.created_at | time) }}
|
|
{% endif %}
|
|
</span>
|
|
</header>
|
|
<h2 class="page_title">
|
|
<a href="{{ page.url() }}" rel="bookmark" title="{{ 'Permanent link to “%s”' | translate | format(page.title | striptags | normalize | fix(true)) }}">{{ page.title }}</a>
|
|
</h2>
|
|
<section>
|
|
{{ page.body | striptags | truncate(200) }}
|
|
</section>
|
|
<footer>
|
|
{% if page.editable() or page.deletable() %}
|
|
<div class="doaction admin">
|
|
{{ page.edit_link() }} {{ page.delete_link() }}
|
|
</div>
|
|
{% endif %}
|
|
</footer>
|
|
</article>
|
|
{% endfor %}
|
|
</details>
|
|
{% endif %}
|
|
{% for post in posts.paginated %}
|
|
{% include(["feathers" ~ DIR ~ post.feather ~ ".twig", "feathers" ~ DIR ~ "missing.twig"]) %}
|
|
{% endfor %}
|
|
{% if posts.prev_page() or posts.next_page() %}
|
|
<!-- Navigation -->
|
|
<nav class="traversal">
|
|
{{- posts.prev_link("Newer posts" | translate) -}}
|
|
{{- posts.next_link("Older posts" | translate) -}}
|
|
</nav>
|
|
{% endif %}
|
|
{% endblock %}
|