ily.li/views/layouts/base.njk

51 lines
1.8 KiB
Plaintext
Raw Normal View History

2020-04-23 18:07:49 +02:00
{% extends './barebone.njk' %}
{% import 'macros.njk' as macros %}
{% block _stylesheets %}
{{ super() }}
<link rel="stylesheet" href="/css/app.css">
{% block stylesheets %}{% endblock %}
{% endblock %}
{% block _scripts %}
{{ super() }}
{% block scripts %}{% endblock %}
{% endblock %}
{% block header %}
2020-06-27 17:20:06 +02:00
<a href="/" class="logo"><img src="/img/logo.svg" alt="Logo"> {{ app.name }}</a>
2020-04-23 18:07:49 +02:00
<nav>
<ul>
2020-06-14 15:05:04 +02:00
{% if user %}
2020-06-27 16:31:36 +02:00
<li><a href="{{ route('file-upload') }}"><i data-feather="upload"></i> File uploader</a></li>
<li><a href="{{ route('file-manager') }}"><i data-feather="folder"></i> File manager</a></li>
2020-07-06 10:49:18 +02:00
<li><a href="{{ route('url-shortener') }}"><i data-feather="crosshair"></i> URL shortener</a></li>
<li><a href="{{ route('url-manager') }}"><i data-feather="link"></i> URL manager</a></li>
2020-06-27 16:31:36 +02:00
{% if user.is_admin %}
<li><a href="{{ route('backend') }}"><i data-feather="settings"></i> Backend</a></li>
{% endif %}
2020-06-14 17:37:47 +02:00
<li><a href="{{ route('logout') }}"><i data-feather="log-out"></i> Logout</a></li>
2020-06-14 15:15:15 +02:00
{% else %}
<li><a href="{{ route('auth') }}"><i data-feather="user"></i> Login / Register</a></li>
2020-06-14 15:05:04 +02:00
{% endif %}
2020-04-23 18:07:49 +02:00
</ul>
</nav>
{% endblock %}
{% block _body %}
<div class="container">
{{ macros.messages(flash) }}
</div>
<main>
{% if h1 %}
<h1>{{ h1 }}</h1>
{% endif %}
{% if subtitle %}
<p>{{ subtitle }}</p>
{% endif %}
{% block body %}{% endblock %}
</main>
{% endblock %}
2020-07-06 10:49:18 +02:00
{% block footer %}{{ app.name }} v{{ app_version }} - all rights reserved. | <a href="{{ route('about') }}">About</a>{% endblock %}