update
This commit is contained in:
@@ -8,7 +8,7 @@ and a side nav for category and featured post navigation
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main class="pt-12">
|
||||
<main>
|
||||
|
||||
<!--sets global featured variable as the most recent post with the isFeatured tag-->
|
||||
{%- set section = get_section(path="blog/_index.md") %}
|
||||
|
33
templates/layouts/newsroom.html
Normal file
33
templates/layouts/newsroom.html
Normal file
@@ -0,0 +1,33 @@
|
||||
{% extends "_default/base.html" %}
|
||||
<!-- News template
|
||||
the template for displaying the news page.
|
||||
consists of a featured news row,
|
||||
a paginated list of posts (sorted by date),
|
||||
and a side nav for category and featured post navigation
|
||||
-->
|
||||
|
||||
{% block content %}
|
||||
|
||||
<main>
|
||||
|
||||
<!--sets global featured variable as the most recent post with the isFeatured tag-->
|
||||
{%- set section = get_section(path="newsroom/_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/featuredNews.html" %}
|
||||
|
||||
<div class="flex flex-col md:flex-row container mx-auto">
|
||||
{% include "partials/newsPosts.html" %}
|
||||
{% include "partials/newsSidebar.html" %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{% endblock content %}
|
30
templates/layouts/products.html
Normal file
30
templates/layouts/products.html
Normal file
@@ -0,0 +1,30 @@
|
||||
{% 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>
|
||||
|
||||
<!--sets global featured variable as the most recent post with the isFeatured tag-->
|
||||
{%- set section = get_section(path="products/_index.md") %}
|
||||
{% for page in section.pages %}
|
||||
{% if page.extra.isFeatured %}
|
||||
{%- set_global featured = page %}
|
||||
{% break %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% include "partials/featuredProduct.html" %}
|
||||
|
||||
<div class="flex flex-col md:flex-row container mx-auto">
|
||||
{% include "partials/productPosts.html" %}
|
||||
{% include "partials/productSidebar.html" %}
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{% endblock content %}
|
Reference in New Issue
Block a user