anonkun/templates/base.html

36 lines
1.4 KiB
HTML
Raw Normal View History

<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %} - Anonkun</title>
<link rel="stylesheet" type="text/css" href="/static/anonkun.css">
2018-06-19 11:54:51 -04:00
<script>
function toggleHeader() {
2018-06-20 22:21:22 -04:00
var xhr = new XMLHttpRequest();
2018-06-19 11:54:51 -04:00
if (document.getElementById('header').style.display == 'initial') {
document.getElementById('header').style.display = 'none';
document.getElementById('headerHidden').style.display = 'initial';
2018-06-20 22:21:22 -04:00
xhr.open('GET', '{{ url_for("views.set_session", hide_header="on") }}', true);
2018-06-19 11:54:51 -04:00
}
else {
document.getElementById('header').style.display = 'initial';
document.getElementById('headerHidden').style.display = 'none';
2018-06-20 22:21:22 -04:00
xhr.open('GET', '{{ url_for("views.set_session", hide_header="off") }}', true);
2018-06-19 11:54:51 -04:00
}
2018-06-20 22:21:22 -04:00
xhr.send();
2018-06-19 11:54:51 -04:00
}
</script>
{% block head %}{% endblock %}
</head>
<body>
2018-06-20 22:21:22 -04:00
<ul id="header" class="header" style="{% if session.get("hide_header") == True %}display:none;{% else %}display:initial;{% endif %}">
2018-06-19 11:54:51 -04:00
<li><a onclick="toggleHeader();" href="javascript:void(0);">^</a></li>
<li><a href="{{ url_for('views.index') }}">Home</a></li>
{% block header %}{% endblock %}
</ul>
2018-06-20 22:21:22 -04:00
<ul id="headerHidden" class="header" style="{% if session.get("hide_header") == True %}display:initial;{% else %}display:none;{% endif %}">
2018-06-19 11:54:51 -04:00
<li><a onclick="toggleHeader();" href="javascript:void(0);">^</a></li>
</ul>
<div id="content">{% block content %}{% endblock %} </div>
</body>
</html>