leilukin-tumbleblog/admin/layouts/default.twig

79 lines
2.6 KiB
Twig

<!DOCTYPE html>
<html lang="{{ site.locale | lang_base }}" dir="{{ site.locale | text_direction }}">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="initial-scale = 1.0">
<title>
{%- if pagination is not empty and pagination.page > 1 -%}
{{- "Page %d" | translate | format(pagination.page) -}}
{{- " | " -}}
{%- endif -%}
{%- block title -%}
{{- title | fix -}}
{%- endblock -%}
{{- " | " -}}
{{- site.name | fix -}}
</title>
<link rel="icon" sizes="32x32" type="image/x-icon" href="{{ site.chyrp_url }}/favicon.ico">
<link rel="icon" sizes="any" type="image/svg+xml" href="{{ site.chyrp_url }}/favicon.svg">
<link rel="mask-icon" href="{{ site.chyrp_url }}/favicon.svg" color="#4f4f4f">
<link rel="stylesheet" href="{{ site.chyrp_url }}/admin/stylesheets/all.css" type="text/css" media="all">
{% if site.monospace_font %}
<link rel="stylesheet" href="{{ site.chyrp_url }}/admin/stylesheets/monospace.css" type="text/css" media="all">
{% endif %}
{{ javascripts() }}
{{ trigger.call("admin_head") }}
</head>
<body>
<div id="header" role="banner">
<h1><a href="{{ url('/', 'MainController') }}">{{ site.name }}</a></h1>
<ul id="navigation" role="menubar">
{% block navigation %}
{% for action, attributes in navigation %}
{% if attributes.children is not empty %}
<li role="presentation" class="{{ action }}{{ attributes.selected | selected(true) }}">
<a role="menuitem" href="{{ url(action) }}">{{ attributes.title }}</a>
</li>
{% endif %}
{% endfor %}
{% endblock %}
</ul>
</div>
<ul id="sub_nav" role="menubar" class="{{ route.action }}_nav ">
{% block subnav %}
{% for parent in navigation %}
{% if parent.selected and parent.children is not empty %}
{% for child, attributes in parent.children %}
<li role="presentation" class="{{ child }}{{ attributes.selected | selected(true) }}">
<a role="menuitem" href="{{ url(child) }}">{{ attributes.title }}</a>
</li>
{% endfor %}
{% endif %}
{% endfor %}
{% endblock %}
</ul>
<div id="content" role="main">
{% 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 %}
{% block content %}{% endblock %}
</div>
</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>