From 8628a4ae2e7c8998c8d2ffe2ecc51f2624aa66b1 Mon Sep 17 00:00:00 2001 From: xAlpharax <42233094+xAlpharax@users.noreply.github.com> Date: Sat, 18 Nov 2023 12:15:16 +0200 Subject: Massive changes - migrating to Hermit with a few tweaks. Changes to be committed: new file: .gitignore modified: .gitmodules modified: config.toml new file: content/about.md deleted: content/blog/_index.md deleted: content/blog/first.md deleted: content/blog/second.md new file: content/posts/_index.md new file: content/posts/code_test.md new file: content/posts/good_first_post.md new file: content/posts/later_posts.md new file: content/posts/typography.md deleted: description deleted: index.html deleted: public/blog/first/index.html deleted: public/blog/index.html deleted: public/blog/second/index.html deleted: public/elasticlunr.min.js deleted: public/search_index.en.js deleted: public/typography.css new file: sass/_animate.scss new file: sass/_icons.scss new file: sass/_normalize.scss new file: sass/_predefined.scss new file: sass/_syntax.scss new file: sass/style.scss new file: static/favicon-32x32.png new file: static/favicon.ico new file: static/js/main.js modified: templates/404.html deleted: templates/base.html deleted: templates/blog-page.html deleted: templates/blog.html new file: templates/index.html new file: templates/macros.html new file: templates/page.html new file: templates/section.html new file: templates/tags/list.html new file: templates/tags/single.html new file: themes/404.html new file: themes/config.toml deleted: themes/hermit_zola --- templates/404.html | 27 ++++++- templates/base.html | 20 ------ templates/blog-page.html | 9 --- templates/blog.html | 13 ---- templates/index.html | 121 +++++++++++++++++++++++++++++++ templates/macros.html | 77 ++++++++++++++++++++ templates/page.html | 176 +++++++++++++++++++++++++++++++++++++++++++++ templates/section.html | 73 +++++++++++++++++++ templates/tags/list.html | 54 ++++++++++++++ templates/tags/single.html | 71 ++++++++++++++++++ 10 files changed, 598 insertions(+), 43 deletions(-) delete mode 100644 templates/base.html delete mode 100644 templates/blog-page.html delete mode 100644 templates/blog.html create mode 100644 templates/index.html create mode 100644 templates/macros.html create mode 100644 templates/page.html create mode 100644 templates/section.html create mode 100644 templates/tags/list.html create mode 100644 templates/tags/single.html (limited to 'templates') diff --git a/templates/404.html b/templates/404.html index 882327e..ee5e10b 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1 +1,26 @@ -404 Police Door not found. +{% extends "index.html" %} + +{% block header %} +{% endblock header %} + +{% block title %} +{% endblock title %} + +{% block main %} +
+

+ 404-lighthouse +

+ +
+{% endblock main %} + +{% block footer %} +{% endblock footer %} diff --git a/templates/base.html b/templates/base.html deleted file mode 100644 index a85bca1..0000000 --- a/templates/base.html +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - MyBlog - {% block rss %} - - {% endblock %} - - - -
-
- {% block content %} {% endblock %} -
-
- - - diff --git a/templates/blog-page.html b/templates/blog-page.html deleted file mode 100644 index f0f638e..0000000 --- a/templates/blog-page.html +++ /dev/null @@ -1,9 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -

- {{ page.title }} -

-

{{ page.date }}

-{{ page.content | safe }} -{% endblock content %} diff --git a/templates/blog.html b/templates/blog.html deleted file mode 100644 index 8e3cc52..0000000 --- a/templates/blog.html +++ /dev/null @@ -1,13 +0,0 @@ -{% extends "base.html" %} - -{% block content %} -

- {{ section.title }} -

- -{% endblock content %} diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..9066226 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,121 @@ +{% import "macros.html" as macros %} + + + + + + + + + + + + + + {% if page.title %} + {{page.title}} + {% else %} + {{config.title}} + {% endif %} + + {% if config.generate_feed %} + + {% endif %} + + + + {% block header %} + {% endblock header %} + + {% block title %} +
+
+

{{config.title}}

+

{{config.extra.home_subtitle}}

+
+ {{macros::render_social_icons()}} +
+ {% endblock title %} + {% block main %} + + {% endblock main %} +
+ + {% block footer %} + + {% endblock footer %} +
+ + + + + + + + + {% if config.extra.highlightjs.enable %} + + + + + + {% if config.extra.highlightjs.clipboard %} + + + {% endif %} + + {% endif %} + + {% if not config.extra.highlightjs.enable %} + + {% endif %} + + + {% block js_footer %} + {% endblock js_footer %} + + {% if config.extra.google_analytics.enable %} + + + + {% endif %} + + diff --git a/templates/macros.html b/templates/macros.html new file mode 100644 index 0000000..ab2f0cc --- /dev/null +++ b/templates/macros.html @@ -0,0 +1,77 @@ +{% macro read_time(words) %} + + {% if words < 530 %} + 1 min read + {% else %} + {{ words / 265 | round }} min read + {% endif %} + +{% endmacro read_time %} + +{% macro footer() %} + + + +{% endmacro footer %} + + + +{% macro render_social_icons() %} +{% for icon in config.extra.hermit_social %} + + {% if icon.name == "codepen" %} + + {% elif icon.name == "facebook" %} + + {% elif icon.name == "github" %} + + {% elif icon.name == "gitlab" %} + + {% elif icon.name == "instagram" %} + + {% elif icon.name == "linkedin" %} + + {% elif icon.name == "slack" %} + + {% elif icon.name == "stackoverflow" %} + + {% elif icon.name == "telegram" %} + + {% elif icon.name == "mastodon" %} + + {% elif icon.name == "twitter" %} + + {% elif icon.name == "youtube" %} + + {% elif icon.name == "email" %} + + {% elif icon.name == "dribbble" %} + + {% elif icon.name == "behance" %} + + {% elif icon.name == "freepik" %} + + {% elif icon.name == "adobestock" %} + + {% elif icon.name == "shutterstock" %} + + {% elif icon.name == "123rf" %} + + {% elif icon.name == "dreamstime" %} + + {% elif icon.name == "paypal" %} + + {% else %} + + {% endif %} + +{% endfor %} +{% endmacro render_social_icons %} diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..bd58389 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,176 @@ +{% extends "index.html" %} + +{% import "macros.html" as macros %} + +{% block header %} + +
+ +
+{% endblock header %} + +{% block title %} +{% endblock title %} + +{% block main %} +
+
+
+ +

{{ page.title }}

+
+ +
+ + {{ page.content | safe }} +
+
+
+ {% if page.taxonomies and page.taxonomies.tags %} +

+ + {% for k, tags in page.taxonomies %} + {% for t in tags %} + {{t}} + {% endfor %} + {% endfor %} +

+ {% endif %} +

{{ page.word_count}} Words

+ {% if page.date %} +

{{ page.date }}

+ {% endif %} +
+
+ {% if page.extra.toc %} + + {% endif %} + +
+ {% if page.later %} + + {% endif %} + {% if page.earlier %} + + {% endif %} +
+ + {% if config.extra.disqus.enable and not page.extra.disable_comments%} +
+ + + {% endif %} +
+{% endblock main %} + +{% block footer %} + +{{ macros::footer() }} + +{% endblock footer %} diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..446c57c --- /dev/null +++ b/templates/section.html @@ -0,0 +1,73 @@ +{% extends "index.html" %} {% import "macros.html" as macros %} {% block header +%} + +
+ +
+{% endblock header %} {% block title %} {% endblock title %} {% block main %} + +
+

{{ section.title }}

+ {% for year, pages in section.pages | group_by(attribute="year") %} +
+
{{ year }}
+ +
+ {% endfor %} +
+ +{% endblock main %} {% block footer %} {{ macros::footer() }} {% endblock footer +%} diff --git a/templates/tags/list.html b/templates/tags/list.html new file mode 100644 index 0000000..8f9a35f --- /dev/null +++ b/templates/tags/list.html @@ -0,0 +1,54 @@ +{% extends "index.html" %} {% import "macros.html" as macros %} {% block header +%} + +
+ +
+{% endblock header %} {% block title %} {% endblock title %} {% block main %} + +
+ {% block content %} + {% for tag in terms %} +
+

{{ tag.name }}

+

+ {{ tag.pages | length }} post{{ tag.pages | length | pluralize }} +

+
+ {% endfor %} + {% endblock content %} +
+ +{% endblock main %} {% block footer %} {{ macros::footer() }} {% endblock footer +%} diff --git a/templates/tags/single.html b/templates/tags/single.html new file mode 100644 index 0000000..e04b872 --- /dev/null +++ b/templates/tags/single.html @@ -0,0 +1,71 @@ +{% extends "index.html" %} {% import "macros.html" as macros %} {% block header +%} + +
+ +
+{% endblock header %} {% block title %} {% endblock title %} {% block main %} + +
+

{{ term.name }}

+ {% for year, pages in term.pages | group_by(attribute="year") %} +
+
{{ year }}
+ +
+ {% endfor %} +
+ +{% endblock main %} {% block footer %} {{ macros::footer() }} {% endblock footer +%} -- cgit v1.2.3