From 5038f39df9af01987b0d7b40c9fe415b80054467 Mon Sep 17 00:00:00 2001
From: Jieiku
Date: Sun, 12 Jun 2022 15:46:13 -0700
Subject: Config.toml Index Title Size, Improve Macros Organization
---
templates/index.html | 6 +++---
templates/macros/macros.html | 16 ++++++++++++----
templates/page.html | 16 ++++++++++++++--
3 files changed, 29 insertions(+), 9 deletions(-)
(limited to 'templates')
diff --git a/templates/index.html b/templates/index.html
index 6d3bfe0..422ad22 100644
--- a/templates/index.html
+++ b/templates/index.html
@@ -28,10 +28,10 @@
{%- for page in paginator.pages %}
-
+ {{- macros::title_index(page=page) }}
{%- if config.extra.meta_index.position %}
{%- if config.extra.meta_index.position == "top" or config.extra.meta_index.position == "both" %}
- {{- macros::title_index(page=page) }}
+ {{- macros::meta_index(page=page) }}
{%- endif %}{%- endif %}
{%- if page.summary %}
@@ -46,7 +46,7 @@
{%- if config.extra.meta_index.position %}
{%- if config.extra.meta_index.position == "bottom" or config.extra.meta_index.position == "both" %}
- {{- macros::title_index(page=page) }}
+ {{- macros::meta_index(page=page) }}
{%- endif %}
{%- endif %}
diff --git a/templates/macros/macros.html b/templates/macros/macros.html
index c5d7a22..6d86916 100644
--- a/templates/macros/macros.html
+++ b/templates/macros/macros.html
@@ -1,4 +1,8 @@
-{%- macro title(page) %}
+{%- macro title_post(page) %}
+
+{%- endmacro title_post %}
+
+{%- macro meta_post(page) %}
-{%- endmacro title %}
-
+{%- endmacro meta_post %}
{%- macro title_index(page) %}
+
{% if config.extra.title_size_index %}{% endif %}
+{%- endmacro title_index %}
+
+
+{%- macro meta_index(page) %}
-{%- endmacro title %}
+{%- endmacro meta_index %}
diff --git a/templates/page.html b/templates/page.html
index cfea5ea..b0fbf83 100644
--- a/templates/page.html
+++ b/templates/page.html
@@ -32,9 +32,20 @@
{%- block content %}
-
- {{- macros::title(page=page) }}
+ {{- macros::title_post(page=page) }}
+
+ {%- if config.extra.meta_post.position %}
+ {%- if config.extra.meta_post.position == "top" or config.extra.meta_post.position == "both" %}
+ {{- macros::meta_post(page=page) }}
+ {%- endif %}{%- endif %}
+
{{ page.content | safe }}
+
+ {%- if config.extra.meta_post.position %}
+ {%- if config.extra.meta_post.position == "bottom" or config.extra.meta_post.position == "both" %}
+ {{- macros::meta_post(page=page) }}
+ {%- endif %}{%- endif %}
+
{%- block page_footer %}
{{- macros::footer(page=page) }}
{%- endblock page_footer %}
@@ -63,6 +74,7 @@
{%- endif %}
{%- endblock toc %}
+
{%- endblock content %}
{%- block gotop %}
--
cgit v1.3.1