octomode/templates/base.html

41 lines
1.3 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html lang='en'>
<head>
<meta charset="utf-8" />
<title>{{ name }} in octomode</title>
2022-03-11 18:33:47 +01:00
<link rel="stylesheet" type="text/css" href="{{ application_root }}static/main.css">
2022-01-12 21:27:06 +01:00
{% block head %}
{% endblock %}
</head>
<body>
<div id="wrapper">
{% block content %}
{% endblock %}
2022-01-12 21:27:06 +01:00
</div>
</body>
2022-01-12 21:27:06 +01:00
<script>
window.addEventListener('load', function () {
// Insert the nav buttons, after the page is loaded
const nav = document.createElement('div');
nav.id = 'nav';
const name = '{{ name }}';
const application_root = '{{ application_root }}';
2022-01-12 21:27:06 +01:00
nav.innerHTML = `
2022-03-11 18:35:03 +01:00
<h1>${ name } <a href="${ application_root }"><em class="octomode">in octomode</em></a></h1>
2022-01-12 21:27:06 +01:00
<div id="buttons">
<a href="${ application_root }${ name }/pad/"><button>pad</button></a>: <input type="text" name="pad" value="https://pad.vvvvvvaria.org/${ name }.md">
<a href="${ application_root }${ name }/stylesheet/"><button>stylesheet</button></a>: <input type="text" name="pad" value="https://pad.vvvvvvaria.org/${ name }.css">
<a href="${ application_root }${ name }/html/"><button>html</button></a>
<a href="${ application_root }${ name }/pdf/"><button>pdf</button></a>
2022-01-12 21:27:06 +01:00
</div>`;
document.body.insertBefore(nav, document.body.firstChild);
})
</script>
{% block footer %}
{% endblock %}
</html>