made header bar hideable

This commit is contained in:
iou1name 2018-06-19 11:54:51 -04:00
parent faf4b995b2
commit fb2770dc2c
3 changed files with 20 additions and 3 deletions

View File

@ -3,12 +3,28 @@
<head>
<title>{% block title %}{% endblock %} - Anonkun</title>
<link rel="stylesheet" type="text/css" href="/static/anonkun.css">
<script>
function toggleHeader() {
if (document.getElementById('header').style.display == 'initial') {
document.getElementById('header').style.display = 'none';
document.getElementById('headerHidden').style.display = 'initial';
}
else {
document.getElementById('header').style.display = 'initial';
document.getElementById('headerHidden').style.display = 'none';
}
}
</script>
{% block head %}{% endblock %}
</head>
<body>
<ul id="header">
<ul id="header" class="header" style="display:initial;">
<li><a onclick="toggleHeader();" href="javascript:void(0);">^</a></li>
<li><a href="{{ url_for('views.index') }}">Home</a></li>
</ul>
<ul id="headerHidden" class="header" style="display:none;">
<li><a onclick="toggleHeader();" href="javascript:void(0);">^</a></li>
</ul>
<div id="content">{% block content %}{% endblock %} </div>
</body>
</html>

View File

@ -35,7 +35,8 @@
}
});
}, 100 );
</script>
<script>
function padToTwo(number) {
if (number<=99) { number = ("0"+number).slice(-2); }
return number;

View File

@ -72,7 +72,7 @@ def quest(quest_title):
@views.route("/create_quest", methods=["GET", "POST"])
@login_required("login")
@login_required("views.login")
def create_quest():
"""
Starts a new quest.