aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKatharina Fey <kookie@spacekookie.de>2018-01-22 22:33:28 +0100
committerKatharina Fey <kookie@spacekookie.de>2018-01-22 22:33:28 +0100
commitf9a1509375bb1e05365c0a913efd8babab3ef362 (patch)
tree224012b857fcf816a4a731d61eed577f2b443dae
parent7876c2efa6de701d951cfb07ebd70f1248893c0c (diff)
Cleaning up templates SIGNIFICANTLY
-rwxr-xr-xcrumbs/templates/article.html10
-rwxr-xr-xcrumbs/templates/base.html35
-rwxr-xr-xcrumbs/templates/category.html19
-rwxr-xr-xcrumbs/templates/home.html80
-rw-r--r--crumbs/templates/normal.html21
5 files changed, 66 insertions, 99 deletions
diff --git a/crumbs/templates/article.html b/crumbs/templates/article.html
index d313f33..0bc69ae 100755
--- a/crumbs/templates/article.html
+++ b/crumbs/templates/article.html
@@ -1,15 +1,9 @@
-{% extends "base.html" %}
+{% extends "normal.html" %}
-{% block title %}{{ article.title }} - {{ super() }}{% endblock title %}
-{% block description %}{{ article.content|striptags|truncate(200)|escape }}{% endblock description %}
-{% block keywords %}{% for tag in article.tags|sort %}{{ tag }}{% if not loop.last %}, {% endif %}{% endfor %}{% endblock keywords %}
+{% block title %}{{ article.title }} {% endblock title %}
{% block content %}
-
- <h1>{{ article.title }}</h1>
-
{% with type='single' %}
{% include "components/card_content.html" %}
{% endwith %}
-
{% endblock %}
diff --git a/crumbs/templates/base.html b/crumbs/templates/base.html
index dfe7139..e28af28 100755
--- a/crumbs/templates/base.html
+++ b/crumbs/templates/base.html
@@ -1,38 +1,13 @@
<!DOCTYPE html>
<html lang="{{ DEFAULT_LANG }}">
- {% with type='base' %}
- {% include "components/html_head.html" %}
- {% endwith %}
- <body class="not-home">
- <div class="container">
-
- <!-- HEADER FOR EVERY PAGE -->
- <div class="navigation">
-
- {% with title_type='page-title' %}
- {% include "components/title_text.html" %}
- {% endwith %}
-
- <!-- Loop through all pages -->
- {% for title, link in MENUITEMS %}
- <!-- Do magic with http/https -->
- {% if 'http://' in link or 'https://' in link %}
- <a class="nav-item" href="{{ link }}">{{ title }} </a>
- {% else %}
- <a class="nav-item" href="{{ SITEURL }}{{ link }}">{{ title }} </a>
- {% endif %}
- {% endfor %}
- </div>
-
- {% include "components/super_gay.html" %}
+ {% block head %}
+ {% endblock head %}
- <!-- END HEADER FOR EVERY PAGE -->
-
- {% block content %}
+ <body>
+ <div class="container">
+ {% block wrapped %}
{% endblock %}
-
</div>
-
</body>
</html>
diff --git a/crumbs/templates/category.html b/crumbs/templates/category.html
index 92505d2..39ff421 100755
--- a/crumbs/templates/category.html
+++ b/crumbs/templates/category.html
@@ -1,16 +1,11 @@
-{% extends "base.html" %}
+{% extends "normal.html" %}
-{% block title %}{{ NEST_CATEGORY_HEAD_TITLE }} {{ category|capitalize }} - {{ super() }} CATEGORY {% endblock title %}
-{% block description %}{{ NEST_CATEGORY_HEAD_DESCRIPTION }} {{ category|capitalize }}{% endblock description %}
+{% block title %} {{ category }} {% endblock title %}
{% block content %}
-
-<h1>{{ category }}</h1>
-
-{% for article in articles %}
- {% with type='multi' %}
- {% include "components/card_content.html" %}
- {% endwith %}
-{% endfor %}
-
+ {% for article in articles %}
+ {% with type='multi' %}
+ {% include "components/card_content.html" %}
+ {% endwith %}
+ {% endfor %}
{% endblock content %}
diff --git a/crumbs/templates/home.html b/crumbs/templates/home.html
index bb8f24a..70cd2cc 100755
--- a/crumbs/templates/home.html
+++ b/crumbs/templates/home.html
@@ -1,52 +1,34 @@
-<!DOCTYPE html>
-<html lang="{{ DEFAULT_LANG }}">
+{% extends "base.html" %}
+
+{# Define what html head we include #}
+{% block head %}
{% with type='home' %}
{% include "components/html_head.html" %}
{% endwith %}
-
- <body class="home">
-
- <!-- Outer bootstrap container -->
- <div class="container">
-
- <!-- Add dynamic header -->
- <div class="navigation">
-
- <!-- Loop through all pages -->
- {% for title, link in MENUITEMS %}
- <!-- Do magic with http/https -->
- {% if 'http://' in link or 'https://' in link %}
- <a class="nav-item" href="{{ link }}">{{ title }} </a>
- {% else %}
- <a class="nav-item" href="{{ SITEURL }}{{ link }}">{{ title }} </a>
- {% endif %}
- {% endfor %}
- </div>
-
- {% with title_type='title' %}
- {% include "components/title_text.html" %}
- {% endwith %}
-
-
- {% include "components/super_gay.html" %}
-
- <p>
- <b>Hi – </b>Welcome to my dusty internet hangout place.
- </p>
- <p>
- My name is <b>Katharina Fey</b> and I'm a software developer from Berlin.
- I like taking photos, writing stories and starting way too many personal projects.
- </p>
-
- <div class="icons">
- <a href="https://twitter.com/spacekookie"><h1 id="twitter"><i class="fa fa-twitter"></i> Twitter</h1></a>
- <a href="https://github.com/spacekookie"><h1 id="github"><i class="fa fa-github"></i> Github</h1></a>
- <a href="https://spacekookie.de/kookie.txt"><h1 id="keys"><i class="fa fa-key"></i> Keys</h1></a>
- </div>
-
- <p>To get in touch with me, you can also send an e-mail to <a href="mailto:kookie@spacekookie.de" id="email"><b>kookie@spacekookie.de</b></a></p>
- <!-- <p>(My RFC2549 complient Prime MTU is currently out of comission)</p> -->
-
- </div>
- </body>
-</html>
+{% endblock head %}
+
+
+{% block wrapped %}
+ <div class="navigation">
+ {% include "components/link_generator.html" %}
+ </div>
+
+ {% with title_type='title' %} {% include "components/title_text.html" %} {% endwith %}
+ {% include "components/super_gay.html" %}
+
+ <p>
+ <b>Hi – </b>Welcome to my dusty internet hangout place.
+ </p>
+ <p>
+ My name is <b>Katharina Fey</b> and I'm a software developer from Berlin.
+ I like taking photos, writing stories and starting way too many personal projects.
+ </p>
+
+ <div class="icons">
+ <a href="https://twitter.com/spacekookie"><h1 id="twitter"><i class="fa fa-twitter"></i> Twitter</h1></a>
+ <a href="https://github.com/spacekookie"><h1 id="github"><i class="fa fa-github"></i> Github</h1></a>
+ <a href="https://spacekookie.de/kookie.txt"><h1 id="keys"><i class="fa fa-key"></i> Keys</h1></a>
+ </div>
+
+ <p>To get in touch with me, you can also send an e-mail to <a href="mailto:kookie@spacekookie.de" id="email"><b>kookie@spacekookie.de</b></a></p>
+{% endblock %}
diff --git a/crumbs/templates/normal.html b/crumbs/templates/normal.html
index 5cb6467..40a51b4 100644
--- a/crumbs/templates/normal.html
+++ b/crumbs/templates/normal.html
@@ -1,2 +1,23 @@
{% extends "base.html" %}
+{# Define what html head we include #}
+{% block head %}
+ {% with type='base' %}
+ {% include "components/html_head.html" %}
+ {% endwith %}
+{% endblock head %}
+
+{% block wrapped %}
+ <div class="navigation">
+ {% with title_type='page-title' %} {% include "components/title_text.html" %} {% endwith %}
+ {% include "components/link_generator.html" %}
+ </div>
+
+ {# Include the colour bar as a divider #}
+ {% include "components/super_gay.html" %}
+
+ <h1>{% block title %}{% endblock %}</h1>
+
+ {% block content %}
+ {% endblock %}
+{% endblock %} \ No newline at end of file