Merge pull request #4 from DKFN/master

Add a section.html template
This commit is contained in:
Worble 2019-10-07 13:23:20 +01:00 committed by GitHub
commit 9b49483b85
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 47 additions and 0 deletions

View file

@ -0,0 +1,5 @@
+++
title = "Test section"
description = "Test"
+++

View file

@ -0,0 +1,6 @@
+++
title = "Sub Section"
[extra]
zulma_title = "Hero title"
+++

36
templates/section.html Normal file
View file

@ -0,0 +1,36 @@
{% extends "index.html" %}
{% import "post_macros.html" as post_macros %}
{% import "index_macros.html" as index_macros %}
{% block content %}
<!-- START NAV -->
{% block header %}
{{ super() }}
{% endblock header %}
<!-- END NAV -->
<main>
<!-- START HERO TITLE -->
{% if section.extra.zulma_title %}
{{ index_macros::hero(title=section.extra.zulma_title, primary=true) }}
{% endif %}
<!-- END HERO TITLE !-->
<section class="container">
<div class="columns is-desktop">
<div class="column is-10-desktop is-offset-1-desktop">
<!-- START ARTICLE FEED !-->
{% if paginator %}
{{ index_macros::list_articles(pages=paginator.pages) }}
{% else %}
{{ index_macros::list_articles(pages=section.pages) }}
{% endif %}
<!-- END ARTICLE FEED -->
<!-- START PAGINATION -->
{% if paginator %}
{{ index_macros::paginate(paginator=paginator) }}
{% endif %}
<!-- END PAGINATION -->
</div>
</div>
</section>
</main>
{% endblock content %}