octomode/templates/base.html

45 lines
1.1 KiB
HTML
Raw Normal View History

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