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.
This repo is archived. You can view files and clone it, but cannot push or open issues/pull-requests.

49 lines
1.7 KiB
HTML

<!DOCTYPE HTML>
<html lang="cs">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>{% block title %}{{ config.title | upper }}{% endblock title %}</title>
<link rel="stylesheet" href="/style.css" type="text/css">
<link rel="icon" href="favicon.ico" type="image/x-icon">
</head>
<body>
<div id="header">
<img src="/{{ config.extra.logo }}" alt="Logo">
<div>
<a href="{{ config.base_url }}">{{ config.title }}</a>
<span class="subtitle">{{ config.description }}</span>
</div>
</div>
<div id="menu">
{% block menu %}
{% set global = get_section(path="_index.md") %} {# Always set a global section to `_index.md` #}
{# List all L1 sections #}
{% if global.subsections %}
<ul>
{% for s in global.subsections %}
{% set top = get_section(path=s) %} {# Set the L1 section #}
{% set current = section %} {# Set the section to a varibale, because `section.path` can not be used when nested #}
{% if section.ancestors[1] %} {# Check if ancestor exists (and therefore we are not in L1) #}
{% set current = get_section(path=section.ancestors[1]) %} {# Set the variable to the L1 ancestor #}
{% endif %}
<li{% if top.path == current.path %} class="active"{% endif %}><a href="{{ top.permalink }}">{{ top.title }}</a></li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
</div>
<div id="content">
{% block nav %}
{% endblock %}
<div id="main">
{% block content%}
{{ section.content | safe }}
{% endblock %}
</div>
</div>
</body>
</html>