From 23c82833b237b962ddc74d3fc6849d85d89794ee Mon Sep 17 00:00:00 2001 From: iou1name Date: Mon, 18 Jun 2018 22:13:49 -0400 Subject: [PATCH] added base template, added header bar to all pages --- static/anonkun.css | 34 +++++++++++++++++++----- templates/base.html | 14 ++++++++++ templates/create_quest.html | 23 +++++++--------- templates/index.html | 12 +++------ templates/login.html | 13 ++++----- templates/quest.html | 53 +++++++++++++++++-------------------- templates/signup.html | 15 +++++------ 7 files changed, 91 insertions(+), 73 deletions(-) create mode 100644 templates/base.html diff --git a/static/anonkun.css b/static/anonkun.css index 0d7cc28..0e1f217 100644 --- a/static/anonkun.css +++ b/static/anonkun.css @@ -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 { diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..7edbae1 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,14 @@ + + + + {% block title %}{% endblock %} - Anonkun + + {% block head %}{% endblock %} + + + +
{% block content %}{% endblock %}
+ + diff --git a/templates/create_quest.html b/templates/create_quest.html index d29ff66..d5cbda5 100644 --- a/templates/create_quest.html +++ b/templates/create_quest.html @@ -1,13 +1,10 @@ - - - - Make a new quest - - -
-
- - -
- - +{% extends "base.html" %} +{% block title %}Start a new quest{% endblock %} +{% block content %} +

New Quest

+
+
+ + +
+{% endblock %} diff --git a/templates/index.html b/templates/index.html index 7db8827..c5713a9 100644 --- a/templates/index.html +++ b/templates/index.html @@ -1,13 +1,9 @@ - - - - Meet the new anonkun. - - +{% extends "base.html" %} +{% block title %}Index{% endblock %} +{% block content %}

Quests 'n Shiet

Unga Bunga Quest
Create New Quest
Sign up
Login
- - +{% endblock %} diff --git a/templates/login.html b/templates/login.html index 81206c5..8642e9a 100644 --- a/templates/login.html +++ b/templates/login.html @@ -1,13 +1,10 @@ - - - - Login - - +{% extends "base.html" %} +{% block title %}Login{% endblock %} +{% block content %} +

Login



- - +{% endblock %} diff --git a/templates/quest.html b/templates/quest.html index 6571709..a44c2e1 100644 --- a/templates/quest.html +++ b/templates/quest.html @@ -1,8 +1,6 @@ - - - - {{ quest_title }} - +{% extends "base.html" %} +{% block title %}{{ quest_title }}{% endblock %} +{% block head %} - - -
-

{{ quest_title }}

- {% autoescape false %} - {{ quest_body }} - {% endautoescape %} -
-
-

Chat

-
+{% endblock %} +{% block content %} +
+
+

{{ quest_title }}

{% autoescape false %} - {% for message in messages %} -
-
- {{ message[1] }} {{ message[3] | strftime }} -
-
{{ message[4] }}
-
- {% endfor %} + {{ quest_body }} {% endautoescape %}
-
- +
+

Chat

+
+ {% autoescape false %} + {% for message in messages %} +
+
+ {{ message[1] }} {{ message[3] | strftime }} +
+
{{ message[4] }}
+
+ {% endfor %} + {% endautoescape %} +
+
- - +{% endblock %} diff --git a/templates/signup.html b/templates/signup.html index d2a1316..4352339 100644 --- a/templates/signup.html +++ b/templates/signup.html @@ -1,9 +1,7 @@ - - - - Sign up a new account - - +{% extends "base.html" %} +{% block title %}Sign up a new account{% endblock %} +{% block content %} +

Sign up

Username rules:

    @@ -14,12 +12,11 @@
    • Must be between 8 and 1024 characters
    +



- - - +{% endblock %}