aboutsummaryrefslogtreecommitdiffstats
path: root/templates
diff options
context:
space:
mode:
authorGravatar Gareth Coles <[email protected]>2018-05-17 14:33:56 +0100
committerGravatar Gareth Coles <[email protected]>2018-05-17 14:33:56 +0100
commitb1c1b5b0bec07a15141577b8cc4939b9071b1d28 (patch)
treee0d01a4fc80e5a9dbde0b0032b2d748eef38a26d /templates
parentCommas are hard (diff)
Restructure code jams page layout
Diffstat (limited to 'templates')
-rw-r--r--templates/main/base.html6
-rw-r--r--templates/main/jams/index.html15
-rw-r--r--templates/main/jams/info.html (renamed from templates/main/info/jams.html)0
-rw-r--r--templates/main/jams/signup.html15
-rw-r--r--templates/main/navigation.html40
-rw-r--r--templates/wiki/base.html20
6 files changed, 71 insertions, 25 deletions
diff --git a/templates/main/base.html b/templates/main/base.html
index cfe41099..9b25a724 100644
--- a/templates/main/base.html
+++ b/templates/main/base.html
@@ -28,14 +28,14 @@
{% endblock %}
</head>
- <body class="page-{{ current_page }}">
- {% if current_page == "index" %}
+ <body class="page-{{ current_page.replace(".", "-") }}">
+ {% if current_page == "main.index" %}
<div class="uk-offcanvas-content uk-section-primary">
{% else %}
<div class="uk-offcanvas-content">
{% endif %}
{% include "main/navigation.html" %}
- {% if current_page != "index" %}
+ {% if current_page != "main.index" %}
{% block beta_error %}
<div class="uk-container uk-section" style="padding-top: 10px; padding-bottom: 10px;">
<div class="uk-container uk-container-small">
diff --git a/templates/main/jams/index.html b/templates/main/jams/index.html
new file mode 100644
index 00000000..e1f7e56d
--- /dev/null
+++ b/templates/main/jams/index.html
@@ -0,0 +1,15 @@
+{% extends "main/base.html" %}
+{% block title %}Home{% endblock %}
+{% block og_title %}Home{% endblock %}
+{% block content %}
+<div class="uk-section">
+ <div class="uk-container uk-container-small uk-text-center">
+ <h1 class="uk-header">
+ Jams
+ </h1>
+ <p class="uk-article-meta">
+ # TODO
+ </p>
+ </div>
+</div>
+{% endblock %}
diff --git a/templates/main/info/jams.html b/templates/main/jams/info.html
index 99b325ab..99b325ab 100644
--- a/templates/main/info/jams.html
+++ b/templates/main/jams/info.html
diff --git a/templates/main/jams/signup.html b/templates/main/jams/signup.html
new file mode 100644
index 00000000..d363f3a3
--- /dev/null
+++ b/templates/main/jams/signup.html
@@ -0,0 +1,15 @@
+{% extends "main/base.html" %}
+{% block title %}Home{% endblock %}
+{% block og_title %}Home{% endblock %}
+{% block content %}
+<div class="uk-section">
+ <div class="uk-container uk-container-small uk-text-center">
+ <h1 class="uk-header">
+ Signup
+ </h1>
+ <p class="uk-article-meta">
+ # TODO
+ </p>
+ </div>
+</div>
+{% endblock %}
diff --git a/templates/main/navigation.html b/templates/main/navigation.html
index 8333fd18..d15b46f7 100644
--- a/templates/main/navigation.html
+++ b/templates/main/navigation.html
@@ -13,7 +13,7 @@
<div class="uk-navbar-right">
<ul class="uk-navbar-nav uk-visible@m">
- {% if current_page == "index" %}
+ {% if current_page == "main.index" %}
<li class="uk-active"><a href="{{ url_for('main.index') }}"><i class="uk-icon fas fa-home"></i> &nbsp;Home</a></li>
{% else %}
<li><a href="{{ url_for('main.index') }}"><i class="uk-icon fas fa-home fa-fw"></i> &nbsp;Home</a></li>
@@ -42,51 +42,63 @@
<li class="uk-active"><a style="color: #7289DA !important"><i class="uk-icon fas fa-exclamation-triangle"></i> &nbsp;Debug mode</a></li>
{% endif %}
- {% if current_page.startswith("info") %}
+ {% if current_page.startswith("main.info") %}
<li class="uk-nav-header uk-active"><a href="{{ url_for('main.info.index') }}">Information</a></li>
{% else %}
<li class="uk-nav-header"><a href="{{ url_for('main.info.index') }}">Information</a></li>
{% endif %}
- {% if current_page == "info.jams" %}
- <li class="uk-active"><a href="{{ url_for('main.info.jams') }}">Code Jams</a></li>
- {% else %}
- <li><a href="{{ url_for('main.info.jams') }}">Code Jams</a></li>
- {% endif %}
-
- {% if current_page == "info.help" %}
+ {% if current_page == "main.info.help" %}
<li class="uk-active"><a href="{{ url_for('main.info.help') }}">Getting Help</a></li>
{% else %}
<li><a href="{{ url_for('main.info.help') }}">Getting Help</a></li>
{% endif %}
- {% if current_page == "info.resources" %}
+ {% if current_page == "main.info.resources" %}
<li class="uk-active"><a href="{{ url_for('main.info.resources') }}">Resources</a></li>
{% else %}
<li><a href="{{ url_for('main.info.resources') }}">Resources</a></li>
{% endif %}
- {% if current_page.startswith("about") %}
+ {% if current_page.startswith("main.about") %}
<li class="uk-nav-header uk-active"><a href="{{ url_for('main.about.index') }}">About</a></li>
{% else %}
<li class="uk-nav-header"><a href="{{ url_for('main.about.index') }}">About</a></li>
{% endif %}
- {% if current_page == "about.partners" %}
+ {% if current_page == "main.about.partners" %}
<li class="uk-active"><a href="{{ url_for('main.about.partners') }}">Partners</a></li>
{% else %}
<li><a href="{{ url_for('main.about.partners') }}">Partners</a></li>
{% endif %}
- {% if current_page == "about.rules" %}
+ {% if current_page == "main.about.rules" %}
<li class="uk-active"><a href="{{ url_for('main.about.rules') }}">Server Rules</a></li>
{% else %}
<li><a href="{{ url_for('main.about.rules') }}">Server Rules</a></li>
{% endif %}
+ {% if current_page.startswith("main.jams") %}
+ <li class="uk-nav-header uk-active"><a href="{{ url_for('main.jams.index') }}">Code Jams</a></li>
+ {% else %}
+ <li class="uk-nav-header"><a href="{{ url_for('main.jams.index') }}">Code Jams</a></li>
+ {% endif %}
+
+ {% if current_page == "main.jams.index" %}
+ <li class="uk-active"><a href="{{ url_for('main.jams.index') }}">Info</a></li>
+ {% else %}
+ <li><a href="{{ url_for('main.jams.index') }}">Info</a></li>
+ {% endif %}
+
+ {% if current_page == "main.jams.signup" %}
+ <li class="uk-active"><a href="{{ url_for('main.jams.signup') }}">Sign Up</a></li>
+ {% else %}
+ <li><a href="{{ url_for('main.jams.signup') }}">Sign Up</a></li>
+ {% endif %}
+
<li class="uk-nav-divider"></li>
- {% if current_page.startswith("about.privacy") %}
+ {% if current_page.startswith("main.about.privacy") %}
<li class="uk-active"><a href="{{ url_for('main.about.privacy') }}">Privacy</a></li>
{% else %}
<li><a href="{{ url_for('main.about.privacy') }}">Privacy</a></li>
diff --git a/templates/wiki/base.html b/templates/wiki/base.html
index 9b31d83b..9fa07e9b 100644
--- a/templates/wiki/base.html
+++ b/templates/wiki/base.html
@@ -27,7 +27,7 @@
{% endblock %}
</head>
- <body class="page-{{ current_page }}">
+ <body class="page-{{ current_page.replace(".", "-") }}">
<div class="uk-offcanvas-content uk-flex uk-flex-column">
{% include "main/navigation.html" %}
<div class="uk-flex uk-flex-row uk-flex-1">
@@ -70,13 +70,17 @@
<i class="uk-icon fas fa-fw fa-cube"></i> &nbsp;Minecraft
</a></li>
- {% set ACTIONABLE_PAGES = ["page", "edit", "history.show", "history.compare", "source", "delete"] %}
+ {% set ACTIONABLE_PAGES = [
+ "wiki.page", "wiki.edit", "wiki.history.show",
+ "wiki.history.compare", "wiki.source", "wiki.delete",
+ "wiki.move"
+ ] %}
{% set actionable = current_page in ACTIONABLE_PAGES %}
{% if actionable %}
<li class="uk-nav-divider"></li>
- {% if current_page == "edit" %}
+ {% if current_page == "wiki.edit" %}
<li>
<a href="{{ url_for("wiki.page", page=page) }}">
<i class="uk-icon fas fa-fw fa-arrow-left"></i> &nbsp;Back
@@ -90,7 +94,7 @@
</li>
{% endif %}
- {% if current_page == "delete" %}
+ {% if current_page == "wiki.delete" %}
<li>
<a href="{{ url_for("wiki.page", page=page) }}">
<i class="uk-icon fas fa-fw fa-arrow-left"></i> &nbsp;Back
@@ -104,7 +108,7 @@
</li>
{% endif %}
- {% if current_page == "move" %}
+ {% if current_page == "wiki.move" %}
<li>
<a href="{{ url_for("wiki.page", page=page) }}">
<i class="uk-icon fas fa-fw fa-arrow-left"></i> &nbsp;Back
@@ -118,13 +122,13 @@
</li>
{% endif %}
- {% if current_page == "history.show" %}
+ {% if current_page == "wiki.history.show" %}
<li>
<a href="{{ url_for("wiki.page", page=page) }}">
<i class="uk-icon fas fa-fw fa-arrow-left"></i> &nbsp;Back
</a>
</li>
- {% elif current_page == "history.compare" %}
+ {% elif current_page == "wiki.history.compare" %}
<li>
<a href="{{ url_for("wiki.history.show", page=slug) }}">
<i class="uk-icon fas fa-fw fa-arrow-left"></i> &nbsp;Back
@@ -138,7 +142,7 @@
</li>
{% endif %}
- {% if current_page == "source" %}
+ {% if current_page == "wiki.source" %}
<li>
<a href="{{ url_for("wiki.page", page=page) }}">
<i class="uk-icon fas fa-fw fa-arrow-left"></i> &nbsp;Back