126 lines
3.9 KiB
Twig
126 lines
3.9 KiB
Twig
|
<!DOCTYPE html>
|
||
|
<html lang="{{ site.locale | lang_base }}" dir="{{ site.locale | text_direction }}">
|
||
|
<head>
|
||
|
<meta charset="UTF-8">
|
||
|
<title>
|
||
|
{%- block title -%}
|
||
|
{%- if pagination is not empty and pagination.page > 1 -%}
|
||
|
{{- "Page %d" | translate | format(pagination.page) -}}
|
||
|
{{- " | " -}}
|
||
|
{%- endif -%}
|
||
|
{%- if title is not empty -%}
|
||
|
{{- title | fix -}}
|
||
|
{{- " | " -}}
|
||
|
{%- endif -%}
|
||
|
{{- site.name | fix -}}
|
||
|
{%- endblock -%}
|
||
|
</title>
|
||
|
<meta name="description" content="{{ site.description }}">
|
||
|
<meta name="generator" content="Chyrp Lite">
|
||
|
<meta name="viewport" content="initial-scale=1.0">
|
||
|
<link rel="apple-touch-icon" sizes="180x180" href="{{ site.chyrp_url }}/favicon/apple-touch-icon.png">
|
||
|
<link rel="icon" type="image/png" sizes="32x32" href="{{ site.chyrp_url }}/favicon/favicon-32x32.png">
|
||
|
<link rel="icon" type="image/png" sizes="16x16" href="{{ site.chyrp_url }}/favicon/favicon-16x16.png">
|
||
|
<link rel="manifest" href="{{ site.chyrp_url }}/favicon/site.webmanifest">
|
||
|
{{ theme.feeds() }}
|
||
|
{{ theme.stylesheets() }}
|
||
|
{{ theme.javascripts() }}
|
||
|
{{ trigger.call("end_head") }}
|
||
|
</head>
|
||
|
<body class="route_{{ route.action }}">
|
||
|
<!-- Mast -->
|
||
|
{% for notice in flash.notices %}
|
||
|
<div role="alert" class="flash notice">
|
||
|
{{ notice }}
|
||
|
</div>
|
||
|
{% endfor %}
|
||
|
{% for warning in flash.warnings %}
|
||
|
<div role="alert" class="flash warning">
|
||
|
{{ warning }}
|
||
|
</div>
|
||
|
{% endfor %}
|
||
|
{% for message in flash.messages %}
|
||
|
<div role="alert" class="flash message">
|
||
|
{{ message }}
|
||
|
</div>
|
||
|
{% endfor %}
|
||
|
<div id="mast" role="banner">
|
||
|
<h1 class="banner"><a href="{{ url('/') }}">{{ site.name }}</a></h1>
|
||
|
<ul class="navigation" aria-label="{{ 'Links' | translate }}">
|
||
|
{% if theme.pages_list() is not empty %}
|
||
|
{% for item in theme.pages_list() %}
|
||
|
<li>
|
||
|
{{ " " | repeat((item.depth - 1) * 4) }}<a href="{{ item.url() }}">{{ item.title }}</a>
|
||
|
</li>
|
||
|
{% endfor %}
|
||
|
{% endif %}
|
||
|
<li>
|
||
|
<a href="{{ mailto(site.email) }}">{{ "Email" | translate }}</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="{{ url('feed') }}">{{ "Feed" | translate }}</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="{{ url('archive') }}" rel="archives">{{ "Archive" | translate }}</a>
|
||
|
</li>
|
||
|
{% if visitor.group.can("change_settings", "toggle_extensions") %}
|
||
|
<li>
|
||
|
<a href="{{ url('/', 'AdminController') }}">{{ "Admin" | translate }}</a>
|
||
|
</li>
|
||
|
{% elseif visitor.group.can("add_post") %}
|
||
|
<li>
|
||
|
<a href="{{ url('/', 'AdminController') }}">{{ "Write" | translate }}</a>
|
||
|
</li>
|
||
|
{% elseif visitor.group.can("add_draft") %}
|
||
|
<li>
|
||
|
<a href="{{ url('/', 'AdminController') }}">{{ "Draft" | translate }}</a>
|
||
|
</li>
|
||
|
{% endif %}
|
||
|
{% if visitor.logged_in %}
|
||
|
<li>
|
||
|
<a href="{{ url('controls') }}">{{ "Controls" | translate }}</a>
|
||
|
</li>
|
||
|
<li>
|
||
|
<a href="{{ url('logout') }}">{{ "Log out" | translate }}</a>
|
||
|
</li>
|
||
|
{% else %}
|
||
|
{% if site.can_register %}
|
||
|
<li>
|
||
|
<a href="{{ url('register') }}">{{ "Register" | translate }}</a>
|
||
|
</li>
|
||
|
{% endif %}
|
||
|
<li>
|
||
|
<a href="{{ url('login') }}">{{ "Log in" | translate }}</a>
|
||
|
</li>
|
||
|
{% endif %}
|
||
|
</ul>
|
||
|
<form class="search_box" action="{{ url('search') }}" method="post" accept-charset="UTF-8" role="search">
|
||
|
<input type="text" id="search_field" name="query" value="{{ search is defined ? search | fix(true, true) : '' }}" placeholder="{{ 'Search…' | translate }}" aria-label="{{ 'Search this blog' | translate }}">
|
||
|
<button type="submit" id="search_submit">{{ "Search" | translate }}</button>
|
||
|
</form>
|
||
|
</div>
|
||
|
<!-- Content -->
|
||
|
<div id="main" role="main">
|
||
|
{% block content %}{% endblock %}
|
||
|
</div>
|
||
|
{% if posts.paginated is defined and posts.next_page() %}
|
||
|
<!-- Navigation -->
|
||
|
<div role="navigation" class="next traversal">
|
||
|
{{ posts.next_link("Page %d" | translate | format(posts.page + 1)) }}
|
||
|
</div>
|
||
|
{% endif %}
|
||
|
<!-- Footer -->
|
||
|
{{ trigger.call("end_content") }}
|
||
|
</body>
|
||
|
<!-- Queries: {{ sql_queries }} | Load Time: {{ theme.load_time() }} -->
|
||
|
{% if debug %}
|
||
|
<!--
|
||
|
{% for caller in sql_debug %}
|
||
|
{{ caller.query | replace({"\t": " "}) | fix }}
|
||
|
{{ "Called from %s on line %d at %s seconds." | translate | format(caller.file, caller.line, caller.time) }}
|
||
|
|
||
|
{% endfor %}
|
||
|
-->
|
||
|
{% endif %}
|
||
|
</html>
|