mirror of
https://github.com/matrix-org/matrix.org.git
synced 2026-01-16 23:13:50 +00:00
* Lightweight archive page Lightweight alternative to #2636 to let people Ctrl-F through the post titles Signed-off-by: Thib <thib@ergaster.org> * Move blog archive page to /blog/archive The archive page is a "virtual" blog post dated to 1970, so that it is sorted at the end of any list. Inside the lists the page is ignord. Signed-off-by: weeman <weeman@frankfurt.ccc.de> * Add /blog/archive to the main navigation. Signed-off-by: weeman <weeman@frankfurt.ccc.de> --------- Signed-off-by: Thib <thib@ergaster.org> Signed-off-by: weeman <weeman@frankfurt.ccc.de> Co-authored-by: Thib <thib@ergaster.org>
72 lines
3.5 KiB
HTML
72 lines
3.5 KiB
HTML
<header class="site-header">
|
|
<a href="/" class="brand">
|
|
<img src="/images/matrix-logo-white.svg" alt="Matrix logo">
|
|
</a>
|
|
<input id="site-header-dropdown-checkbox" type="checkbox" class="dropdown-checkbox" aria-hidden="true">
|
|
<label for="site-header-dropdown-checkbox" class="dropdown-button"></label>
|
|
<label for="site-header-dropdown-checkbox" class="page-overlay"></label>
|
|
<nav>
|
|
{% for link in navigation.header %}
|
|
{% if link.section %}
|
|
{% set href = "/" ~ link.section ~ "/" %}
|
|
{% set section = get_section(path=link.section ~ "/_index.md") %}
|
|
<div class="section-wrap">
|
|
<input id="{{ link.section }}-submenu-checkbox" type="checkbox" class="submenu-checkbox" aria-hidden="true"
|
|
{{ util::current_checked(if_path_starts_with="/" ~ link.section) }}>
|
|
<label for="{{ link.section }}-submenu-checkbox" class="submenu-title">
|
|
<a href="/{{ link.section }}">
|
|
{{ link.title }}</a> <div class="arrow">
|
|
</div></label>
|
|
|
|
<div class="section-submenu-wrap">
|
|
<div class="section-submenu">
|
|
{% for subsection_path in section.subsections %}
|
|
{% set subsection = get_section(path=subsection_path) %}
|
|
{# We ignore subsections with "navigation" key being false in the metadata. Note this variable may be unset #}
|
|
{% if subsection.extra.navigation is not defined or subsection.extra.navigation %}
|
|
<a href="{{ subsection.path }}">{{ subsection.title }}</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
{% for mypage in section.pages %}
|
|
{# We ignore subsections with "navigation" key being false in the metadata. Note this variable may be unset #}
|
|
{% if mypage.extra.navigation is undefined or mypage.extra.navigation %}
|
|
<a href="{{ mypage.path }}">{{ mypage.title }}</a>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
{% if link.children %}
|
|
<div class="section-wrap">
|
|
<input
|
|
id="{{ link.id }}-submenu-checkbox"
|
|
type="checkbox"
|
|
class="submenu-checkbox"
|
|
aria-hidden="true"
|
|
{{ util::current_checked(if_path_starts_with=link.href) }}
|
|
>
|
|
<label for="{{ link.id }}-submenu-checkbox" class="submenu-title">
|
|
<a href="{{ link.href }}">
|
|
{{ link.title }}
|
|
</a>
|
|
<div class="arrow"></div>
|
|
</label>
|
|
<div class="section-submenu-wrap">
|
|
<div class="section-submenu">
|
|
{% for child in link.children %}
|
|
<a href="{{ child.href }}">{{ child.title }}</a>
|
|
{% endfor %}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% else %}
|
|
<a href="{{ link.href }}" class="{% if link.primary %}primary{% endif %}
|
|
{{ util::current_class(if_path_starts_with=link.href) }}">
|
|
{{ link.title }}
|
|
</a>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</nav>
|
|
</header>
|