Moved menu and added almost-working source file on every page

master
southerntofu 2020-03-29 19:16:45 +02:00
parent 3ddddee217
commit e383aed2c2
2 changed files with 17 additions and 8 deletions

View File

@ -5,6 +5,10 @@
--- ---
[Blog](DUMMIE)
---
[Source](https://github.com/kaneroot/dnsmanager) [Source](https://github.com/kaneroot/dnsmanager)
--- ---

View File

@ -1,25 +1,22 @@
{% import "widgets.html" as widgets %} {% import "widgets.html" as widgets %}
{% if section %}{% set lang = section.lang %}{% elif page %}{% set lang = page.lang %}{% else %}{% set lang = false %}{% endif %} {% if section %}{% set lang = section.lang %}{% elif page %}{% set lang = page.lang %}{% else %}{% set lang = false %}{% endif %}
<!DOCTYPE html> <!DOCTYPE html>
<html class="no-js"> <html class="no-js" lang="{{ lang | default(value="en")}}">
<head> <head>
<meta charset="utf8"> <meta charset="utf8">
<title>{{ config.extra.title }}</title> <title>{{ config.extra.title }}</title>
<link rel="alternate" type="application/rss+xml" href="{{ get_url(path="rss.xml") }}"> <link rel="alternate" type="application/rss+xml" href="{{ get_url(path="rss.xml") }}">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="{{ get_url(path="style.css") }}" type="text/css"> <link rel="stylesheet" href="{{ get_url(path="style.css") }}" type="text/css">
<link rel="stylesheet" href="{{ get_url(path="github-markdown.css") }}" type="text/css"> <link rel="stylesheet" href="{{ get_url(path="water.css") }}" type="text/css">
</head> </head>
<body> <body>
<header> <header>
{{ widgets::menu(content="_common/menus/main.md") }}
<aside style="display: none">
<h1>{{ config.extra.title }}</h1>
</aside>
{% set header = get_page(path="_common/header.md") %} {% set header = get_page(path="_common/header.md") %}
{{ header.content | markdown | safe }} {{ header.content | markdown | safe }}
{{ widgets::menu(content="_common/menu.md") }}
</header> </header>
<main class="markdown-body"> <main>
{% block main %} {% block main %}
{#{% set home = get_section(path="_index.md").content %}#} {#{% set home = get_section(path="_index.md").content %}#}
{% set home = load_data(url="https://raw.githubusercontent.com/KaneRoot/dnsmanager/master/readme.markdown") %} {% set home = load_data(url="https://raw.githubusercontent.com/KaneRoot/dnsmanager/master/readme.markdown") %}
@ -27,7 +24,15 @@
{% endblock %} {% endblock %}
</main> </main>
<footer> <footer>
{% if config.extra.forge %}
<aside class="source">
{% if section %}
<a href="{{ config.extra.forge.browse }}content/{{ section.path }}_index.md">Source</a>
{% else %}
<a href="{{ config.extra.forge.browse }}content/{{ page.path }}index.md">Source</a>
{% endif %}
</aside>
{% endif %}
</footer> </footer>
</body> </body>
</html> </html>