mirror of
https://github.com/pawroman/zola-theme-terminimal.git
synced 2025-01-08 19:51:06 +01:00
Added the option to only show the description
Co-authored-by: Antonios Barotsis <a.barotsis@student.tudelft.nl> Co-authored-by: Bkeinn <60117033+Bkeinn@users.noreply.github.com>
This commit is contained in:
parent
910e50b824
commit
4ce06e1894
|
@ -71,7 +71,8 @@
|
|||
{%- for page in show_pages %}
|
||||
<div class="post on-list">
|
||||
{{ post_macros::header(page=page) }}
|
||||
{{ post_macros::content(page=page, summary=true) }}
|
||||
|
||||
{{ post_macros::content(page=page, summary=true, show_only_description=page.extra.show_only_description | default(value=false)) }}
|
||||
</div>
|
||||
{% endfor -%}
|
||||
<div class="pagination">
|
||||
|
|
|
@ -1,5 +1,9 @@
|
|||
{% macro content(page, summary) %}
|
||||
{%- if summary and page.summary %}
|
||||
{% macro content(page, summary, show_only_description) %}
|
||||
{%- if show_only_description %}
|
||||
<div class="post-content">
|
||||
{{ page.description | safe }}
|
||||
</div>
|
||||
{% elif summary and page.summary %}
|
||||
<div class="post-content">
|
||||
{{ page.summary | safe }}
|
||||
</div>
|
||||
|
|
|
@ -7,7 +7,7 @@
|
|||
{% block content %}
|
||||
<div class="post">
|
||||
{{ post_macros::header(page=page) }}
|
||||
{{ post_macros::content(page=page, summary=false) }}
|
||||
{{ post_macros::content(page=page, summary=true, show_only_description=false) }}
|
||||
{{ post_macros::earlier_later(page=page) }}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
|
Loading…
Reference in a new issue