From da4917f8c673a16ba757b3b911cf5ce36895d74e Mon Sep 17 00:00:00 2001 From: Yaroslav Date: Wed, 11 Mar 2020 02:26:54 +0300 Subject: initial commit --- templates/archive.html | 14 ++++++++++++++ templates/base.html | 30 ++++++++++++++++++++++++++++++ templates/index.html | 5 +++++ templates/page.html | 10 ++++++++++ templates/weblog.html | 27 +++++++++++++++++++++++++++ 5 files changed, 86 insertions(+) create mode 100644 templates/archive.html create mode 100644 templates/base.html create mode 100644 templates/index.html create mode 100644 templates/page.html create mode 100644 templates/weblog.html (limited to 'templates') diff --git a/templates/archive.html b/templates/archive.html new file mode 100644 index 0000000..68daf65 --- /dev/null +++ b/templates/archive.html @@ -0,0 +1,14 @@ +{% extends "base.html" %} +{% block content %} +{% set section = get_section(path="weblog/_index.md") %} +
+ {% for year, posts in section.pages | group_by(attribute="year") %} +

{{ year }}

+ + {% endfor %} +
+{% endblock %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..f03965f --- /dev/null +++ b/templates/base.html @@ -0,0 +1,30 @@ + + + + + + {{ config.title }} + + + + {% block extrahead %} + {% endblock %} + + +
+ + {% block page %} +
+ {% block content %} + {% endblock %} +
+ + {% endblock %} +
+ + diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..0d9fb7c --- /dev/null +++ b/templates/index.html @@ -0,0 +1,5 @@ +{% extends "base.html" %} +{% block page %} +

Welcome to my site!

+Go to weblog +{% endblock %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..66faa93 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,10 @@ +{% extends "base.html" %} +{% block content %} +{% set post = page %} +
+

{{ post.title }}

+

{{ post.date }}

+
+ {{ post.content | safe }} +
+{% endblock %} diff --git a/templates/weblog.html b/templates/weblog.html new file mode 100644 index 0000000..11c0d2a --- /dev/null +++ b/templates/weblog.html @@ -0,0 +1,27 @@ +{% extends "base.html" %} +{% block content %} +
+ {% for post in paginator.pages %} +
+

{{ post.title }}

+ {% if post.summary %} + {{ post.summary | safe }} + {% endif %} +
+ {% endfor %} +
+{% if paginator %} +{% if paginator.number_pagers > 1 %} +
+ {% if paginator.previous %} + First + Previous page: {{ paginator.current_index - 1 }} + {% endif %} + {% if paginator.next %} + Next page: {{ paginator.current_index + 1 }} + Last + {% endif %} +
+{% endif %} +{% endif %} +{% endblock %} -- cgit v1.2.3