From 4165b2c0d86d1e3f47a7caf9a086798e51315f3b Mon Sep 17 00:00:00 2001 From: eatradish Date: Sat, 9 Apr 2022 19:34:05 +0800 Subject: init --- templates/404.html | 0 templates/archives.html | 28 ++++++++++++++++ templates/base.html | 68 ++++++++++++++++++++++++++++++++++++++ templates/home.html | 29 ++++++++++++++++ templates/macros.html | 16 +++++++++ templates/navbar.html | 16 +++++++++ templates/page.html | 61 ++++++++++++++++++++++++++++++++++ templates/section.html | 42 +++++++++++++++++++++++ templates/shortcodes/shikwasa.html | 16 +++++++++ 9 files changed, 276 insertions(+) create mode 100644 templates/404.html create mode 100644 templates/archives.html create mode 100644 templates/base.html create mode 100644 templates/home.html create mode 100644 templates/macros.html create mode 100644 templates/navbar.html create mode 100644 templates/page.html create mode 100644 templates/section.html create mode 100644 templates/shortcodes/shikwasa.html (limited to 'templates') diff --git a/templates/404.html b/templates/404.html new file mode 100644 index 0000000..e69de29 diff --git a/templates/archives.html b/templates/archives.html new file mode 100644 index 0000000..e691c86 --- /dev/null +++ b/templates/archives.html @@ -0,0 +1,28 @@ +{% extends "base.html" %} + +{% block content %} +
+ +
+{% endblock %} diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..eef6a39 --- /dev/null +++ b/templates/base.html @@ -0,0 +1,68 @@ + + + + {% set sub_title = section.title | default(value=page.title | default(value='')) %} + {% if sub_title %} + {% set title = sub_title ~ ' - ' ~ trans(key="title") %} + {% else %} + {% set title = trans(key="title") %} + {% endif %} + {% set cn_font_family = "'Source Serif Pro', 'Source Han Serif SC', 'Noto Serif CJK SC', 'Noto Serif SC', serif" %} + {% set fallback_font_family = "'Source Serif Pro', 'Source Han Serif TC', 'Noto Serif CJK TC', 'Noto Serif TC', 'Noto Serif KR', 'Noto Serif SC', serif" %} + {% set fonts_url = "Noto+Serif+SC:wght@400;700" %} + {% set font_base_url = config.extra.seje_font_mirror | default(value="fonts.googleapis.com") %} + {% if lang == 'zh-cn' and not config.extra.seje_vertical_layout %} + {% set font_family = cn_font_family %} + {% else %} + {% set font_family = fallback_font_family %} + {% set fonts_url = "Noto+Serif+TC:wght@400;700&family=Noto+Serif+KR:wght@400;700&" ~ fonts_url %} + {% endif %} + {% if config.extra.seje_custom_fonts %} + {% set font_family = config.extra.seje_custom_fonts ~ ',' ~ font_family %} + {% endif %} + + + {{ title }} + + + + + + + {% if config.extra.seje_darkmode == "auto" %} + + {% elif config.extra.seje_darkmode == "always" %} + + {% endif %} + {% if config.extra.seje_vertical_layout %} + + {% else %} + + {% endif %} + + + + {% block metadata %}{# #}{% endblock %} + + + {% block header %} +
+ + {% include "navbar.html" %} +
+ {% endblock %} +
+ {% block content %} + {% endblock %} +
+ {% block footer %} +

{{ config.license | default(value='') }}

+ {% endblock %} + + diff --git a/templates/home.html b/templates/home.html new file mode 100644 index 0000000..25c3032 --- /dev/null +++ b/templates/home.html @@ -0,0 +1,29 @@ +{% extends "base.html" %} + +{% import "macros.html" as macros %} + +{% block content %} +
+ {% for post in paginator.pages %} +
+
{{ post.title }}
+
+ {% if config.extra.seje_show_summary_only %} + {{ post.summary }} + More + {% else %} + {{ post.content | safe }} + {% endif %} +
+ +
+ {% endfor %} +{{ paginator.next }} +
+{% endblock %} diff --git a/templates/macros.html b/templates/macros.html new file mode 100644 index 0000000..7379b1b --- /dev/null +++ b/templates/macros.html @@ -0,0 +1,16 @@ +{% macro format_chinese_date(year, month, day) %} +{% set lut1 = ["〇", "一", "二", "三", "四", "五", "六", "七", "八", "九"] %} +{% set lut2 = [ + '一', '二', '三', '四', + '五', '六', '七', '八', + '九', '十', '十一', '十二', + '十三', '十四', '十五', '十六', + '十七', '十八', '十九', '二十', + '廿一', '廿二', '廿三', '廿四', + '廿五', '廿六', '廿七', '廿八', + '廿九', '三十', '三十一'] %} +{% for c in year | as_str %} + {{ lut1 | nth(n=c | int) }} +{% endfor %} +年{{ lut2 | nth(n=month-1)}}月{{ lut2 | nth(n=day-1) }}日 +{% endmacro %} diff --git a/templates/navbar.html b/templates/navbar.html new file mode 100644 index 0000000..e50799d --- /dev/null +++ b/templates/navbar.html @@ -0,0 +1,16 @@ + diff --git a/templates/page.html b/templates/page.html new file mode 100644 index 0000000..48a1c74 --- /dev/null +++ b/templates/page.html @@ -0,0 +1,61 @@ +{% extends "base.html" %} + +{% import "macros.html" as macros %} + +{% block content %} +
+
+

{{ page.title }}

+
+
+ {{ page.content | safe }} +
+ +
+ +
+ +
+ +
+{# Discussion #} +{% block comment %} +{% if config.seje_disqus_shortname %} +
+
+ + +
+{% endif %} +{% endblock %} +
+{% endblock %} diff --git a/templates/section.html b/templates/section.html new file mode 100644 index 0000000..bca7f6b --- /dev/null +++ b/templates/section.html @@ -0,0 +1,42 @@ +{% extends "base.html" %} + +{% import "macros.html" as macros %} + +{% block content %} +
+
+

{{ section.title }}

+
+
+ {{ section.content | safe }} +
+ +
+ +
+ +
+ +
+{# Discussion #} +
+{% endblock %} diff --git a/templates/shortcodes/shikwasa.html b/templates/shortcodes/shikwasa.html new file mode 100644 index 0000000..d29238d --- /dev/null +++ b/templates/shortcodes/shikwasa.html @@ -0,0 +1,16 @@ +
+ +
-- cgit v1.2.3