89 lines
3.1 KiB
Twig
89 lines
3.1 KiB
Twig
<!doctype html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
{% include '_layout/meta.twig' %}
|
|
<link href="{{ '/css/mio.css'|asset_url }}" rel="stylesheet">
|
|
<link href="{{ '/css/libraries.css'|asset_url }}" rel="stylesheet">
|
|
</head>
|
|
<body class="main">
|
|
{% include '_layout/header.twig' %}
|
|
|
|
<div class="main__wrapper">
|
|
{% block content %}
|
|
<div class="container">
|
|
<div class="container__title">Hello!</div>
|
|
<div class="container__content">
|
|
This page has no content!
|
|
</div>
|
|
</div>
|
|
{% endblock %}
|
|
</div>
|
|
|
|
<footer class="footer">
|
|
{% autoescape false %}
|
|
<div class="footer__copyright">
|
|
{{ 'https://flash.moe'|html_link('Flashwave', 'footer__link') }} 2013-{{
|
|
''|date('Y') }} /
|
|
{{ ('https://github.com/flashwave/misuzu/tree/' ~ git_branch())|html_link(git_branch(), 'footer__link') }}
|
|
# {{ ('https://github.com/flashwave/misuzu/commit/' ~ git_commit_hash(true))|html_link(git_commit_hash(), 'footer__link') }}
|
|
{% if query_count is defined %}
|
|
/ SQL Queries: {{ query_count|number_format }}
|
|
/ Took: {{ app.timeSinceStart|number_format(5) }} seconds
|
|
{% endif %}
|
|
</div>
|
|
{% endautoescape %}
|
|
</footer>
|
|
|
|
<script src="{{ '/js/libraries.js'|asset_url }}" charset="utf-8"></script>
|
|
<script>
|
|
window.addEventListener('load', () => {
|
|
timeago().render(document.querySelectorAll('time'));
|
|
hljs.initHighlighting();
|
|
});
|
|
|
|
// move this to an external JS/TS file eventually.
|
|
const containerClass = 'container',
|
|
containerHiddenClass = 'container--hidden';
|
|
|
|
function validateContainer(elem) {
|
|
return elem.classList.contains(containerClass);
|
|
}
|
|
|
|
function containerIsClosed(elem) {
|
|
return elem.classList.contains(containerHiddenClass);
|
|
}
|
|
|
|
function toggleContainer(id) {
|
|
const elem = document.getElementById(id);
|
|
|
|
if (!validateContainer(elem))
|
|
return;
|
|
|
|
if (containerIsClosed(elem))
|
|
openContainer(id);
|
|
else
|
|
closeContainer(id);
|
|
}
|
|
|
|
function openContainer(id) {
|
|
const elem = document.getElementById(id);
|
|
|
|
if (!validateContainer(elem) || !containerIsClosed(elem))
|
|
return;
|
|
|
|
elem.classList.remove(containerHiddenClass);
|
|
}
|
|
|
|
function closeContainer(id) {
|
|
const elem = document.getElementById(id);
|
|
|
|
if (!validateContainer(elem) || containerIsClosed(elem))
|
|
return;
|
|
|
|
elem.classList.add(containerHiddenClass);
|
|
}
|
|
</script>
|
|
</body>
|
|
</html>
|