feat(homepage): allow hiding posts listing (#317)

main
Óscar 9 months ago committed by GitHub
parent 349663f28f
commit c54251ca7a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -1,18 +1,20 @@
<div id="posts-list"> {%- if paginator or extra_section -%}
<div> <div id="posts-list">
{{ macros_page_header::page_header(title=section.title) }} <div>
</div> {{ macros_page_header::page_header(title=section.title) }}
</div>
{%- if paginator %} {%- if paginator %}
{%- set pages = paginator.pages -%} {%- set pages = paginator.pages -%}
{% else %} {% else %}
{%- set pages = extra_section.pages -%} {%- set pages = extra_section.pages -%}
{% endif -%} {% endif -%}
{% set max_posts = section.extra.max_posts | default(value=999999) %} {% set max_posts = section.extra.max_posts | default(value=999999) %}
{{ macros_list_posts::list_posts(posts=pages, max=max_posts, language_strings=language_strings, section_path=path) }} {{ macros_list_posts::list_posts(posts=pages, max=max_posts, language_strings=language_strings, section_path=path) }}
</div> </div>
{% if paginator %} {% if paginator %}
{%- include "partials/paginate.html" -%} {%- include "partials/paginate.html" -%}
{% endif %} {% endif %}
{%- endif -%}

@ -9,7 +9,11 @@
{%- set first_section = "posts" -%} {%- set first_section = "posts" -%}
{%- endif -%} {%- endif -%}
<main class={{ first_section }}-first> {%- if section.extra.section_path or paginator and projects_path -%}
{%- set more_than_one_section_shown = true -%}
{%- endif -%}
<main {% if more_than_one_section_shown %}class="{{ first_section }}-first"{% endif %}>
{%- if section.extra.header %} {%- if section.extra.header %}
{%- include "partials/home_banner.html" -%} {%- include "partials/home_banner.html" -%}
{% endif -%} {% endif -%}

Loading…
Cancel
Save