You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
62 lines
1.9 KiB
HTML
62 lines
1.9 KiB
HTML
{% extends "base.html" %}
|
|
|
|
{% block main_content %}
|
|
|
|
{# We'll only pin posts in the root section. #}
|
|
{# Right now both the main page and blog/ use the same `section.html` template. #}
|
|
{# To avoid using different templates, we do this. #}
|
|
{%- if lang == config.default_language -%}
|
|
{%- set expected_root = "/" -%}
|
|
{%- else -%}
|
|
{%- set expected_root = "/" ~ lang ~ "/" -%}
|
|
{%- endif -%}
|
|
{%- set is_root_section = current_path == expected_root -%}
|
|
|
|
{%- set show_projects_first = section.extra.show_projects_first | default(value=false) -%}
|
|
{%- if show_projects_first -%}
|
|
{%- set first_section = "projects" -%}
|
|
{%- else -%}
|
|
{%- set first_section = "posts" -%}
|
|
{%- endif -%}
|
|
|
|
{%- 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 %}
|
|
{%- include "partials/home_banner.html" -%}
|
|
{% endif -%}
|
|
|
|
{% if section.extra.section_path -%}
|
|
{% set extra_section = get_section(path=section.extra.section_path) %}
|
|
{% endif -%}
|
|
|
|
{% if section.extra.section_path -%}
|
|
{% set path = section.extra.section_path | replace(from="/_index.md", to = "") %}
|
|
{% else -%}
|
|
{% set path = section.path %}
|
|
{% endif -%}
|
|
|
|
<ul class="language-switcher">
|
|
{% for trans in section.translations %}
|
|
<ol>
|
|
<a href="{{ trans.permalink }}" lang="{{ trans.lang }}">
|
|
{{ config.extra.languages[trans.lang] | default(value=trans.lang) }}
|
|
</a>
|
|
</ol>
|
|
{% endfor %}
|
|
</ul>
|
|
|
|
|
|
{%- if show_projects_first -%}
|
|
{%- include "partials/main_page_projects_list.html" -%}
|
|
{%- include "partials/main_page_posts_list.html" -%}
|
|
{%- else -%}
|
|
{%- include "partials/main_page_posts_list.html" -%}
|
|
{%- include "partials/main_page_projects_list.html" -%}
|
|
{%- endif -%}
|
|
</main>
|
|
|
|
{% endblock main_content %}
|