homepage
This commit is contained in:
parent
d6006a0227
commit
70671e5a43
17 changed files with 519 additions and 14 deletions
45
templates/section.html
Normal file
45
templates/section.html
Normal file
|
@ -0,0 +1,45 @@
|
|||
{% extends "index.html" %}
|
||||
|
||||
{% block extra_head %}
|
||||
<link rel="stylesheet" href="{{ get_url(path="css/custom.css") }}">
|
||||
{% endblock extra_head %}
|
||||
|
||||
{% block content %}
|
||||
<div class="posts">
|
||||
<h1 class="post-title">{{ section.title }}</h1>
|
||||
|
||||
{%- if paginator %}
|
||||
{%- set show_pages = paginator.pages -%}
|
||||
{% else %}
|
||||
{%- set show_pages = section.pages -%}
|
||||
{% endif -%}
|
||||
|
||||
{%- for page in show_pages %}
|
||||
<div class="post on-list">
|
||||
{{ post_macros::header(page=page) }}
|
||||
{{ post_macros::content(page=page, summary=true, show_only_description=page.extra.show_only_description | default(value=false)) }}
|
||||
</div>
|
||||
{% endfor -%}
|
||||
|
||||
<div class="pagination">
|
||||
<div class="pagination__buttons">
|
||||
{%- if paginator.previous %}
|
||||
<span class="button previous">
|
||||
<a href="{{ paginator.previous | safe }}">
|
||||
<span class="button__icon">←</span>
|
||||
<span class="button__text">Newer posts</span>
|
||||
</a>
|
||||
</span>
|
||||
{% endif -%}
|
||||
{%- if paginator.next %}
|
||||
<span class="button next">
|
||||
<a href="{{ paginator.next | safe }}">
|
||||
<span class="button__text">Older posts</span>
|
||||
<span class="button__icon">→</span>
|
||||
</a>
|
||||
</span>
|
||||
{% endif -%}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock content %}
|
Loading…
Add table
Add a link
Reference in a new issue