- Combine app.js and functions.js - Rename functions.js to app.js - Rename variables.js to globals.js - Remove global.js and add setup call to screen template - Use local jquery in old templates
51 lines
No EOL
1.3 KiB
Text
Executable file
51 lines
No EOL
1.3 KiB
Text
Executable file
<!-- app.template -->
|
|
<!DOCTYPE html>
|
|
<html lang="de" class="html_ui" id="{{ pageId }}">
|
|
<head>
|
|
<meta charset="utf-8">
|
|
|
|
{% block head %}
|
|
<title>{{ hippie.titlePrefix }}
|
|
{%- block title %}{% endblock %}{{ hippie.titlePostfix }}</title>
|
|
|
|
{% block meta %}
|
|
{% include "hippie/partials/_head_meta.njk" %}
|
|
<base href="/">
|
|
{% endblock %}
|
|
|
|
{% block links %}{% endblock %}
|
|
|
|
{% endblock %}
|
|
</head>
|
|
|
|
<body class="{{ bodyClass if bodyClass else 'body_frame' }}">
|
|
{% block body %}{% endblock %}
|
|
|
|
{% block script %}
|
|
<script src="/vendor/jquery.min.js"></script>
|
|
<script src="{{ pageBase }}js/globals.js"></script>
|
|
<script src="{{ pageBase }}js/app.js"></script>
|
|
|
|
<script>
|
|
const frameHeader = document.querySelector('body > header.io');
|
|
const closeActionElements = document.querySelectorAll('[data-action=close]');
|
|
|
|
if (frameHeader) {
|
|
console.log('frame header found', frameHeader);
|
|
|
|
frameHeader.addEventListener('click', (e) => {
|
|
if (e.target.dataset.action === 'close') {
|
|
console.debug('close', e.target);
|
|
|
|
history.back();
|
|
|
|
if (closeActionElements.length > 1) {
|
|
console.debug('other frames present', closeActionElements.length);
|
|
}
|
|
}
|
|
});
|
|
}
|
|
</script>
|
|
{% endblock %}
|
|
</body>
|
|
</html> |