69 lines
2.0 KiB
Django/Jinja
69 lines
2.0 KiB
Django/Jinja
<!DOCTYPE html>
|
|
<html lang="en" dir="ltr">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<link rel="stylesheet" href="{{ site.base_url }}/css/pygments/{{ pygments_theme }}.css">
|
|
<link rel="stylesheet" href="{{ site.base_url }}/css/style.css">
|
|
<title>{{ page.title }} | {{ site.title }}</title>
|
|
</head>
|
|
<body>
|
|
|
|
<div class="flex">
|
|
<div class="col-md-2 sidebar">
|
|
<p>
|
|
{% for link in site.links %}
|
|
<strong><a href="{{ link.url }}" style="text-decoration: none">
|
|
{{ link.title }} </a></strong>
|
|
{% endfor %}
|
|
</p>
|
|
<strong>Contents</strong>
|
|
<ul id="contents">
|
|
{% for item in site.sidebar %}
|
|
<li>
|
|
<a href="{{ item.url }}">{{ item.title }}</a>
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<article>
|
|
{{ html | safe }}
|
|
</article>
|
|
|
|
<div class="pagination" style="margin: 2rem 0;">
|
|
{% for item in site.sidebar %}
|
|
{% if item.title == page.title %}
|
|
{% set current = site.sidebar.index(item) %}
|
|
{% set last = site.sidebar.index(site.sidebar[-1]) %}
|
|
{% if current == 0 %}
|
|
<div class="flex" style="justify-content: space-between">
|
|
<div></div>
|
|
<div><a href="{{ site.sidebar[current+1].url }}">
|
|
{{ site.sidebar[current+1].title }} --></a></div>
|
|
</div>
|
|
{% elif current == last %}
|
|
<div class="flex" style="justify-content: space-between">
|
|
<div><a href="{{ site.sidebar[current-1].url }}">
|
|
<-- {{ site.sidebar[current-1].title }}</a></div>
|
|
<div></div>
|
|
</div>
|
|
{% else %}
|
|
<div class="flex" style="justify-content: space-between">
|
|
<div><a href="{{ site.sidebar[current-1].url }}">
|
|
<-- {{ site.sidebar[current-1].title }}</a></div>
|
|
<div><a href="{{ site.sidebar[current+1].url }}">
|
|
{{ site.sidebar[current+1].title }} --></a></div>
|
|
</div>
|
|
{% endif %}
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</body>
|
|
</html>
|