From be92775fceb3765c8c0d12442ba07dd642cba4d2 Mon Sep 17 00:00:00 2001 From: HeilAsuka Date: Fri, 29 Sep 2023 11:22:02 +0800 Subject: [PATCH] Add author to blog-page Add default_mode to choose light mode or dark mode --- templates/blog-page.html | 33 ++++++++++++++++---------------- templates/header.html | 41 +++++++++++++++++++++++++++++++++------- 2 files changed, 51 insertions(+), 23 deletions(-) diff --git a/templates/blog-page.html b/templates/blog-page.html index 4ab5611..e888520 100644 --- a/templates/blog-page.html +++ b/templates/blog-page.html @@ -3,42 +3,43 @@ {% block content %}
../
+

{{ page.title }}

{% if page.toc and page.extra.toc %}

Table of contents

{% endif %} {{ page.content | safe }}

-{% if page.taxonomies.tags %} -{% for tag in page.taxonomies.tags %} -/{{ tag }}/ -{% endfor %} -{% endif %} + {% if page.taxonomies.tags %} + {% for tag in page.taxonomies.tags %} + /{{ tag }}/ + {% endfor %} + {% endif %}

{% endblock content %} \ No newline at end of file diff --git a/templates/header.html b/templates/header.html index a92f728..0b8f97e 100644 --- a/templates/header.html +++ b/templates/header.html @@ -3,23 +3,50 @@ {% for nav_item in config.extra.header_nav %} {% set current_nav_item = nav_item[lang] %} {% if current_nav_item and current_nav_item.name %} - {{ current_nav_item.name }} + {{ current_nav_item.name }} {% endif %} {% endfor %}
- - + {% if not config.extra.default_mode %} + + + {% elif config.extra.default_mode and config.extra.default_mode == "light" %} + + + {% elif config.extra.default_mode and config.extra.default_mode == "dark" %} + + + {% endif %}
{% endif %} \ No newline at end of file