Documentation/content/_includes/default_layout.njk
2020-08-31 16:29:53 +02:00

94 lines
4.6 KiB
Text

<!DOCTYPE html>
<html lang="en">
<head>
<title>{% if eleventyNavigation.title %}{{ eleventyNavigation.title }} | {% endif %}Codeberg Documentation Prototype</title>
<meta charset="UTF-8">
{% if description %}<meta name="description" content="{{ description }}">{% endif %}
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" type="image/svg+xml" href="/assets/images/logo/codeberg-favicon.svg" sizes="250x250">
<link rel="stylesheet" type="text/css" href="/assets/css/codeberg-docs.css">
<link rel="stylesheet" type="text/css" href="/assets/css/prism-nord.css">
<!-- Details and License: https://fonts.codeberg.org/fonts/inter -->
<link rel="stylesheet" type="text/css" href="https://fonts.codeberg.org/dist/inter/Inter Web/inter.css">
<!-- Details and License: https://fonts.codeberg.org/fonts/fontawesome5 -->
<link rel="stylesheet" type="text/css" href="https://fonts.codeberg.org/dist/fontawesome5/css/solid.min.css">
<link rel="stylesheet" type="text/css" href="https://fonts.codeberg.org/dist/fontawesome5/css/fontawesome.min.css">
<script type="text/javascript" src="/assets/js/sidebar.js"></script>
</head>
<body>
<header>
<div class="container">
<div id="header-logo">
<a href="/"><img src="/assets/images/logo/codeberg-docs.svg" alt="Codeberg Documentation"></a>
</div>
<div id="header-buttons">
<!--<a href="#">{% fas_icon "globe-europe" %} English</a>-->
<a href="{{ urls.commitHistoryMaster }}/{{ page.inputPath }}" target="_blank">{% fas_icon "history" %} View History</a>
<a href="{{ urls.docsSourcesMaster }}/{{ page.inputPath }}" target="_blank">{% fas_icon "code" %} View Source</a>
<a href="#" id="contents-button" onclick="toggleSidebar()">{% fas_icon "bars" %}</a>
</div>
</div>
</header>
<main>
<div class="container">
<div id="sidebar">
<nav>
<div class="sidebar-close-button"><a href="#" onclick="hideSidebar()">{% fas_icon "times-circle" %}</a></div>
<ul>
{% for entry in collections.all | eleventyNavigation %}
{% set active = entry.url == page.url or entry.key == eleventyNavigation.parent %}
{% if (not entry.draft) or active %}
<li class="nav-section{% if active %} active{% endif %}">
<a href="{{ entry.url }}">{% fas_icon entry.icon | default("caret-right") %} {{ entry.title }}</a>
</li>
{% if active and entry.children.length > 0 %}
<li class="nav-second-level">
<ul>
{% for child in entry.children %}
{% set child_active = child.url == page.url %}
{% if child_active or not child.draft %}
<li><a href="{{ child.url }}"{% if child_active %} class="active"{% endif %}>{{ child.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endif %}
{% endif %}
{%- endfor %}
</ul>
</nav>
</div>
<div class="flex-spacer"></div>
<article>
{% if eleventyNavigation.title %}<h1>{{ eleventyNavigation.title }}</h1>{% endif %}
{% if eleventyNavigation.draft %}<strong>Please note that this article is still a draft and might not have any contents yet.</strong>{% endif %}
{{ content | safe }}
{% if page.url != '/' %}{% include 'contribution_invitation.njk' %}{% endif %}
</article>
</div>
</main>
<footer>
This Website by <a href="{{ urls.docsSourcesMaster }}/CONTRIBUTORS.md">The Codeberg Documentation Contributors</a> is licensed under <a href="https://creativecommons.org/licenses/by-sa/4.0/deed.en">CC-BY-SA 4.0</a>.
It bundles third-party font software licensed under a different license.
Please look at <a href="{{ urls.docsSourcesMaster }}/LICENSE.md">the LICENSE file</a> for details.<br>
Changes to the original versions of the article as well as its individual authors can be looked up in <a href="{{ urls.commitHistoryMaster }}/{{ page.inputPath }}" target="_blank">this article's commit history</a><br>
Codeberg and the Codeberg Logo are trademarks of Codeberg e.V.<br>
For Imprint, Privacy Policy and other legal notices, please refer to <a href="https://codeberg.org">https://codeberg.org</a>.
</footer>
</body>
</html>