From 4165b2c0d86d1e3f47a7caf9a086798e51315f3b Mon Sep 17 00:00:00 2001 From: eatradish Date: Sat, 9 Apr 2022 19:34:05 +0800 Subject: init --- config.toml | 29 ++++++++++++++++ content/_index.md | 5 +++ content/archives/_index.md | 3 ++ content/test.md | 14 ++++++++ content/test1.md | 12 +++++++ 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 +++++++++ themes/Seje2 | 1 + 15 files changed, 340 insertions(+) create mode 100644 config.toml create mode 100644 content/_index.md create mode 100644 content/archives/_index.md create mode 100644 content/test.md create mode 100644 content/test1.md 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 create mode 160000 themes/Seje2 diff --git a/config.toml b/config.toml new file mode 100644 index 0000000..b9c9eb9 --- /dev/null +++ b/config.toml @@ -0,0 +1,29 @@ +# The URL the site will be built for +base_url = "https://blog.utopiospgere.net" +theme = "Seje2" +# Whether to automatically compile all Sass files in the sass directory +compile_sass = true +default_language = "zh-tw" + +# Whether to build a search index to be used later on by a JavaScript library +build_search_index = false + +[markdown] +# Whether to do syntax highlighting +# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola +highlight_code = false + +[extra] +# Put all your custom variables here + +[languages.zh-tw.translations] +title = "寫嘢" +home = "主頁" +archives = "歸檔" +about = "關於" +rss = "訂閱" +more = "查看全文" +olderArticle = "舊文" +newer = "上一篇" +older = "下一篇" +loading = "加載中..." diff --git a/content/_index.md b/content/_index.md new file mode 100644 index 0000000..d542b86 --- /dev/null +++ b/content/_index.md @@ -0,0 +1,5 @@ ++++ +template = "home.html" +sort_by = "date" +paginate_by = 10 ++++ diff --git a/content/archives/_index.md b/content/archives/_index.md new file mode 100644 index 0000000..7677746 --- /dev/null +++ b/content/archives/_index.md @@ -0,0 +1,3 @@ ++++ +template = "archives.html" ++++ diff --git a/content/test.md b/content/test.md new file mode 100644 index 0000000..baeb41d --- /dev/null +++ b/content/test.md @@ -0,0 +1,14 @@ ++++ +title = "夢記・二" +date = 2002-10-02T15:00:00Z ++++ + +又夢見了那位決定離我遠去的人,總是夢見我們重新相逢的日子⋯⋯或者是,分別前的日子。 + +我夢見她跟我說,我也是一步步走著過來的,我發現錢省不了,省下的錢都買零食去了,我喜歡畫畫,我才有今天這個樣子⋯⋯哎呀你不要看不起自己,你現在這樣不代表以後也這樣。 + +我如何回應她的呢?一次所謂的「藝術家協會分享」的事情,她說我做的事情不可理喻,我像她道歉,但是我如何道歉的呢?我把自己行為那自認「理性」告訴了她,她什麼都沒有說,離我而去。 + +之前一時不明這到底為何,後來愈發覺得,當我預設了立場,把我的理性至於高地,從以貶低她人的意志,我不知道,我什麼時候變得如此高高在上之嘴臉了? + +於是,我也想加入到她之中去了,還在原地的人,會覺得我是「犬儒」「優於孤獨」罷了,可是,我想為他人而活,我的正義如是說。「犬儒」?不,我只是厭倦了,甚至是厭惡這些沒有「人」,高高在上姿態的敘事罷了。 diff --git a/content/test1.md b/content/test1.md new file mode 100644 index 0000000..114b70a --- /dev/null +++ b/content/test1.md @@ -0,0 +1,12 @@ ++++ +title = "夢記・一" +date = 2003-10-02T15:00:00Z ++++ + +徹夜趕路,不知已經走了多少路,只是走著,一切都不能停歇,停歇只會讓自己進入無限孤獨中,孤獨,便開始想著找人去擺脫孤獨,但是,我的經歷,還暫時不能分享給任何人。 + +又看見了她,「又見到你了」,我還是休息吧。我以前見過她好幾次了,她飽食卻也總是說「我還是餓」。 + +她開始跟我說她的經歷,「好幾次,我找到路上行走的人,我想,至少能讓我飽食一頓吧,她們卻無情講我踢開,她們難道不孤獨嗎?不想找人傾訴嗎?」 + +我不知道該怎麼回答她,我在自言自語,「你知道嗎?無論我再好,注定你身上的所有你擁有的東西,都是要離開的」無論如何,無論如何全力追隨,都沒有用⋯⋯ \ No newline at end of file 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 @@ +
+ +
diff --git a/themes/Seje2 b/themes/Seje2 new file mode 160000 index 0000000..3cc2d00 --- /dev/null +++ b/themes/Seje2 @@ -0,0 +1 @@ +Subproject commit 3cc2d00771f6d7e5dd090d819bc41329450ce1ec -- cgit v1.2.3