Blog, first try
This commit is contained in:
parent
7242abe39d
commit
2d0d6a492b
|
@ -0,0 +1,27 @@
|
|||
|
||||
{% extends 'partials/base.html.twig' %}
|
||||
{% set collection = page.collection() %}
|
||||
{% set blog = page.find(header_var('blog_url')|defined(theme_var('blog-page'))) %}
|
||||
{% set show_breadcrumbs = header_var('show_breadcrumbs', [page, blog])|defined(true) %}
|
||||
{% set show_sidebar = header_var('show_sidebar', [page, blog])|defined(true) %}
|
||||
{% set show_pagination = header_var('show_pagination', [page, blog])|defined(true) %}
|
||||
|
||||
{% 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 %}
|
||||
<div>
|
||||
{% for child in collection %}
|
||||
{% include 'partials/blog-list-item.html.twig' with {blog: page, page : child %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
</section>
|
||||
</section>
|
||||
{% endblock %}
|
||||
|
||||
|
||||
|
|
@ -0,0 +1,24 @@
|
|||
<div class="card">
|
||||
{% set image = page.media.images|first %}
|
||||
{% if image %}
|
||||
<div class="card-image">
|
||||
<a href="{{ page.url }}">{{ image.cropZoom(800,400).html }}</a>
|
||||
</div>
|
||||
{% endif %}
|
||||
<div class="card-header">
|
||||
<div class="card-subtitle text-gray">
|
||||
{% include 'partials/blog/date.html.twig' %}
|
||||
</div>
|
||||
<div class="card-title">
|
||||
{% include 'partials/blog/title.html.twig' with {title_level: 'h5'} %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
{% if page.summary != page.content %}
|
||||
{{ page.summary|raw }}
|
||||
{% else %}
|
||||
{{ page.content|raw }}
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
|
Loading…
Reference in New Issue