grav/themes/quark-open-publishing/templates/item.html.twig

56 lines
2.8 KiB
Twig

{% extends 'partials/base.html.twig' %}
{% set blog = page.find(theme_var('blog-page')|default('/blog')) %}
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog]) %}
{% set show_sidebar = header_var('show_sidebar', [page, blog]) %}
{% set show_pagination = header_var('show_pagination', [page, blog]) %}
{% set hero_image_name = page.header.hero_image %}
{% block hero %}
{% if hero_image_name %}
{% set hero_image = page.media[hero_image_name] %}
{% set content %}
<h1>{{ page.title }}</h1>
<h2>{{ page.header.subtitle }}</h2>
<p>
{% include 'partials/blog/date.html.twig' %}
{% if config.plugins.readingtime.enabled %}
<span class="blogitem__readingtime">{% include 'partials/blog/readingtime.html.twig' %}</span>
{% endif %}
</p>
{% include 'partials/blog/taxonomy.html.twig' %}
{% endset %}
{% include 'partials/hero.html.twig' with {id: 'blog-hero'} %}
{% endif %}
{% endblock %}
{% block body %}
<section id="body-wrapper" class="section blog-listing">
<section class="container {{ grid_size }}">
{% if show_breadcrumbs and config.plugins.breadcrumbs.enabled %}
{% include 'partials/breadcrumbs.html.twig' %}
{% endif %}
{% embed 'partials/layout.html.twig' %}
{% block item %}
{% include 'partials/blog-item.html.twig' %}
{# check to display CC License - hibbittsdesign.org #} {# check to display git sync link in page - hibbittsdesign.org #}
{% if theme_var('display_of_git_sync_repo_link') == 'page' and not (grav.uri.param('summaryonly') or grav.uri.param('onlysummary')) %}
<p>{% include 'partials/git_sync_repo_link_note.html.twig' %}</p>
{% endif %}
{% if not (grav.uri.param('chromeless') or grav.uri.param('embedded') or grav.uri.param('standalone')) and not(theme_var('chromeless.enabled')) and (theme_var('cc_license.enabled') and not(page.header.hide_cc_license) and not (grav.uri.param('onlysummary'))) %}
<p>{% include 'partials/creative_commons_license.html.twig' %}</p>
{% endif %}
{% endblock %}
{# check content display flag - hibbittsdesign.org #}
{% if not (grav.uri.param('chromeless') or grav.uri.param('embedded') or grav.uri.param('standalone')) and not(theme_var('chromeless.enabled')) %}
{% block sidebar %}
{% include 'partials/sidebar.html.twig' %}
{% endblock %}
{% endif %}
{% endembed %}
</section>
</section>
{% endblock %}