added base template, added header bar to all pages
This commit is contained in:
parent
0980554cff
commit
23c82833b2
|
@ -1,14 +1,30 @@
|
|||
#questBody {
|
||||
height: 100%;
|
||||
#header {
|
||||
position: fixed;
|
||||
padding-left: 10px;
|
||||
padding-right: 32%;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
list-style-type: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
background-color: #dddddd;
|
||||
}
|
||||
|
||||
#header li {
|
||||
display: inline;
|
||||
}
|
||||
|
||||
#header a {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
#content {
|
||||
display: flex;
|
||||
overflow: auto;
|
||||
}
|
||||
|
||||
.chat {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
#questBody {
|
||||
padding-left: 10px;
|
||||
padding-right: 32%;
|
||||
}
|
||||
|
||||
#chatPane {
|
||||
|
@ -17,6 +33,8 @@
|
|||
right: 0;
|
||||
position: fixed;
|
||||
padding-right: 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#chatWindow {
|
||||
|
@ -28,6 +46,8 @@
|
|||
#messageBox {
|
||||
padding-bottom: 10px;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
#messageTextarea {
|
||||
|
|
14
templates/base.html
Normal file
14
templates/base.html
Normal file
|
@ -0,0 +1,14 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{% block title %}{% endblock %} - Anonkun</title>
|
||||
<link rel="stylesheet" type="text/css" href="/static/anonkun.css">
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
<ul id="header">
|
||||
<li><a href="{{ url_for('views.index') }}">Home</a></li>
|
||||
</ul>
|
||||
<div id="content">{% block content %}{% endblock %} </div>
|
||||
</body>
|
||||
</html>
|
|
@ -1,13 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Make a new quest</title>
|
||||
</head>
|
||||
<body>
|
||||
<form method="post" action="{{ url_for('views.create_quest') }}">
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Start a new quest{% endblock %}
|
||||
{% block content %}
|
||||
<h1>New Quest</h1>
|
||||
<form method="post" action="{{ url_for('views.create_quest') }}">
|
||||
<input type="text" placeholder="Quest Title" name="quest_title" maxlength="300" required/><br/>
|
||||
<textarea id="create_textarea" name="quest_body"></textarea>
|
||||
<input type="submit" name="submit" value="Submit"/>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,13 +1,9 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Meet the new anonkun.</title>
|
||||
</head>
|
||||
<body>
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Index{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Quests 'n Shiet</h1>
|
||||
<a href="./quest/unga-bunga-quest">Unga Bunga Quest</a><br />
|
||||
<a href="./create_quest">Create New Quest</a><br />
|
||||
<a href="./signup">Sign up</a><br />
|
||||
<a href="./login">Login</a><br />
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,13 +1,10 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Login</title>
|
||||
</head>
|
||||
<body>
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Login{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Login</h1>
|
||||
<form method="post" action="{{ url_for('views.login') }}">
|
||||
<input type="text" placeholder="Username" name="user" maxlength="20" required/><br />
|
||||
<input type="password" placeholder="Password" name="pass" maxlength="1024" required/><br />
|
||||
<input type="submit" value="Log in" name="submit"/>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ quest_title }}</title>
|
||||
<link rel="stylesheet" type="text/css" href="/static/anonkun.css">
|
||||
{% extends "base.html" %}
|
||||
{% block title %}{{ quest_title }}{% endblock %}
|
||||
{% block head %}
|
||||
<script type="text/javascript" src="/static/socket.io.slim.js"></script>
|
||||
<script>
|
||||
var socket;
|
||||
|
@ -43,17 +41,18 @@
|
|||
return number;
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
{% endblock %}
|
||||
{% block content %}
|
||||
<div id="questContainer">
|
||||
<div id="questBody">
|
||||
<h1>{{ quest_title }}</h1>
|
||||
{% autoescape false %}
|
||||
{{ quest_body }}
|
||||
{% endautoescape %}
|
||||
</div>
|
||||
<div id="chatPane" class="chat">
|
||||
<div id="chatPane">
|
||||
<h1>Chat</h1>
|
||||
<div id="chatWindow" class="chat">
|
||||
<div id="chatWindow">
|
||||
{% autoescape false %}
|
||||
{% for message in messages %}
|
||||
<div class="message">
|
||||
|
@ -65,9 +64,7 @@
|
|||
{% endfor %}
|
||||
{% endautoescape %}
|
||||
</div>
|
||||
<div id="messageBox" class="chat">
|
||||
<textarea id="messageTextarea"></textarea>
|
||||
<div id="messageBox"><textarea id="messageTextarea"></textarea></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
{% endblock %}
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>Sign up a new account</title>
|
||||
</head>
|
||||
<body>
|
||||
{% extends "base.html" %}
|
||||
{% block title %}Sign up a new account{% endblock %}
|
||||
{% block content %}
|
||||
<h1>Sign up</h1>
|
||||
<div id="namePassRules">
|
||||
<p>Username rules:
|
||||
<ul>
|
||||
|
@ -14,12 +12,11 @@
|
|||
<ul>
|
||||
<li>Must be between 8 and 1024 characters</li>
|
||||
</ul>
|
||||
</div>
|
||||
<form method="post" action="{{ url_for('views.signup') }}">
|
||||
<input type="text" placeholder="Username" name="user" maxlength="20" required/><br />
|
||||
<input type="password" placeholder="Password" name="pass" maxlength="1024" required/><br />
|
||||
<input type="password" placeholder="Verify password" name="pass_verify" maxlength="1024" required/><br />
|
||||
<input type="submit" value="Sign up" name="submit"/>
|
||||
</form>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
{% endblock %}
|
||||
|
|
Loading…
Reference in New Issue
Block a user