www_ourworld_tf/templates/layouts/blog.html
2023-02-03 10:14:41 +03:00

34 lines
953 B
HTML

{% extends "_default/base.html" %}
<!-- blog template
the template for displaying the blog page.
consists of a featured blog row,
a paginated list of posts (sorted by date),
and a side nav for category and featured post navigation
-->
{% block content %}
<main class="pt-12">
<!--sets global featured variable as the most recent post with the isFeatured tag-->
{%- set section = get_section(path="blog/_index.md") %}
{% for page in section.pages %}
{% if page.extra.isFeatured %}
{%- set_global featured = page %}
{% break %}
{% endif %}
{% if not featured %}
{%- set_global featured = section.pages[0] %}
{% endif %}
{% endfor %}
{% include "partials/featuredBlog.html" %}
<div class="flex flex-col md:flex-row container mx-auto">
{% include "partials/blogPosts.html" %}
{% include "partials/blogSidebar.html" %}
</div>
</main>
{% endblock content %}