From dbd3aaf6113d4dc5097a2699a25b587b79184974 Mon Sep 17 00:00:00 2001 From: Ian Andwati Date: Tue, 8 Aug 2023 17:45:26 +0300 Subject: [PATCH] completed all templates --- templates/404.html | 28 ++++++++++++++++++++++++++++ templates/anchor-link.html | 1 + templates/page.html | 30 ++++++++++++++++++++++++++++++ templates/post.html | 32 ++++++++++++++++++++++++++++++++ templates/post_macros.html | 24 ++++++++++++++++++++++++ templates/posts.html | 11 +++++++++++ templates/section.html | 2 +- templates/tags/list.html | 38 ++++++++++++++++++++++++++++++++++++++ templates/tags/single.html | 23 +++++++++++++++++++++++ 9 files changed, 188 insertions(+), 1 deletion(-) create mode 100644 templates/404.html create mode 100644 templates/anchor-link.html create mode 100644 templates/page.html create mode 100644 templates/post.html create mode 100644 templates/post_macros.html create mode 100644 templates/posts.html create mode 100644 templates/tags/list.html create mode 100644 templates/tags/single.html diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..41cb292 --- /dev/null +++ b/templates/404.html @@ -0,0 +1,28 @@ +{% extends "index.html" %} +{% block title %} + 404 Not Found +{% endblock title %} +{% block meta %} + + + + + + + + + + + +{% endblock meta %} +{% block links %} +{% endblock links %} +{% block content %} +
+
+ 404 Not Found +
+

Hmm...could not find that page

+
+ {% include "footer.html" %} +{% endblock content %} diff --git a/templates/anchor-link.html b/templates/anchor-link.html new file mode 100644 index 0000000..b5d7685 --- /dev/null +++ b/templates/anchor-link.html @@ -0,0 +1 @@ + diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..0fdbb91 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,30 @@ +{% extends "index.html" %} +{% block title %} + {{ page.title }} +{% endblock title %} +{% block meta %} + + + + + + + + + + + + +{% endblock meta %} +{% block links %} + +{% endblock links %} +{% block content %} +
+
+

{{ page.title }}

+
+ {{ page.content | safe }} +
+ {% include "footer.html" %} +{% endblock content %} diff --git a/templates/post.html b/templates/post.html new file mode 100644 index 0000000..6108fdb --- /dev/null +++ b/templates/post.html @@ -0,0 +1,32 @@ +{% extends "page.html" %} +{% import "post_macros.html" as post_macros %} +{% block meta %} + + + + + + + + + + + + {% for tag in page.taxonomies.tags %}{% endfor %} + + + + + +{% endblock meta %} +{% block content %} +
+
+
+

{{ page.title }}

+
+ {{ page.content | safe }} +
+
+ {% include "footer.html" %} +{% endblock content %} diff --git a/templates/post_macros.html b/templates/post_macros.html new file mode 100644 index 0000000..8d5482c --- /dev/null +++ b/templates/post_macros.html @@ -0,0 +1,24 @@ +{% macro meta(page) %} +
+ + {% if page.taxonomies.tags %} + ⬡ + {% for tag in page.taxonomies.tags %} + #{{ tag }} + {%- if page.taxonomies.tags | length > 1 and loop.index != page.taxonomies.tags | length -%},{% endif %} + {% endfor %} + {% endif %} +
+{% endmacro meta %} +{% macro snippet(page) %} +
+

+ {{ page.title }} +

+ {{ self::meta(page=page) }} + {% if page.summary %}{{ page.summary | safe }}{% endif %} + +
+{% endmacro snippet %} diff --git a/templates/posts.html b/templates/posts.html new file mode 100644 index 0000000..458e680 --- /dev/null +++ b/templates/posts.html @@ -0,0 +1,11 @@ +{% extends "section.html" %} +{% import "post_macros.html" as post_macros %} +{% block content %} +
+
+

Posts

+
+ {% for page in section.pages %}{{ post_macros::snippet(page=page) }}{% endfor %} +
+ {% include "footer.html" %} +{% endblock content %} diff --git a/templates/section.html b/templates/section.html index 5456206..5c69e09 100644 --- a/templates/section.html +++ b/templates/section.html @@ -24,6 +24,6 @@

{{ section.title }}

- {{ section.content | safe }}} + {{ section.content | safe }} {% endblock content %} diff --git a/templates/tags/list.html b/templates/tags/list.html new file mode 100644 index 0000000..931728b --- /dev/null +++ b/templates/tags/list.html @@ -0,0 +1,38 @@ +{% extends "index.html" %} +{% block title %} + Tags +{% endblock title %} +{% block meta %} + + + + + + + + + + + + +{% endblock meta %} +{% block links %} + +{% endblock links %} +{% block content %} +
+
+

All Tags

+
+ {% if terms %} + + {% endif %} +
+ {% include "footer.html" %} +{% endblock content %} diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..4b8c9b5 --- /dev/null +++ b/templates/tags/single.html @@ -0,0 +1,23 @@ +{% extends "index.html" %} +{% import "post_macros.html" as post_macros %} +{% block title %} + Tag - {{ term.name }} +{% endblock title %} +{% block meta %} + + + + + + + + + + + + +{% endblock meta %} +{% block links %} + +{% endblock links %}