From ad8f9f55ea79a4d587aecc69698808da82de3d62 Mon Sep 17 00:00:00 2001 From: somhairle Date: Tue, 21 Apr 2026 20:40:27 +0800 Subject: 二〇二六年四月二十一日 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/theme/layout/archive.ejs | 1 + themes/theme/layout/category.ejs | 4 ++ themes/theme/layout/index.ejs | 1 + themes/theme/layout/layout.ejs | 24 +++++++++ themes/theme/layout/pages/page_head.ejs | 14 +++++ themes/theme/layout/pages/profile.ejs | 21 ++++++++ themes/theme/layout/partials/back_to_top.ejs | 24 +++++++++ themes/theme/layout/partials/footer.ejs | 16 ++++++ themes/theme/layout/partials/head.ejs | 73 +++++++++++++++++++++++++++ themes/theme/layout/partials/header.ejs | 42 +++++++++++++++ themes/theme/layout/partials/paginator.ejs | 14 +++++ themes/theme/layout/partials/post_gallery.ejs | 42 +++++++++++++++ themes/theme/layout/partials/post_list.ejs | 29 +++++++++++ themes/theme/layout/partials/tag_cloud.ejs | 11 ++++ themes/theme/layout/post.ejs | 14 +++++ themes/theme/layout/post/post_comment.ejs | 48 ++++++++++++++++++ themes/theme/layout/post/post_content.ejs | 7 +++ themes/theme/layout/post/post_footer.ejs | 21 ++++++++ themes/theme/layout/post/post_head.ejs | 34 +++++++++++++ themes/theme/layout/search.ejs | 21 ++++++++ themes/theme/layout/tag.ejs | 17 +++++++ 21 files changed, 478 insertions(+) create mode 100644 themes/theme/layout/archive.ejs create mode 100644 themes/theme/layout/category.ejs create mode 100644 themes/theme/layout/index.ejs create mode 100644 themes/theme/layout/layout.ejs create mode 100644 themes/theme/layout/pages/page_head.ejs create mode 100644 themes/theme/layout/pages/profile.ejs create mode 100644 themes/theme/layout/partials/back_to_top.ejs create mode 100644 themes/theme/layout/partials/footer.ejs create mode 100644 themes/theme/layout/partials/head.ejs create mode 100644 themes/theme/layout/partials/header.ejs create mode 100644 themes/theme/layout/partials/paginator.ejs create mode 100644 themes/theme/layout/partials/post_gallery.ejs create mode 100644 themes/theme/layout/partials/post_list.ejs create mode 100644 themes/theme/layout/partials/tag_cloud.ejs create mode 100644 themes/theme/layout/post.ejs create mode 100644 themes/theme/layout/post/post_comment.ejs create mode 100644 themes/theme/layout/post/post_content.ejs create mode 100644 themes/theme/layout/post/post_footer.ejs create mode 100644 themes/theme/layout/post/post_head.ejs create mode 100644 themes/theme/layout/search.ejs create mode 100644 themes/theme/layout/tag.ejs (limited to 'themes/theme/layout') diff --git a/themes/theme/layout/archive.ejs b/themes/theme/layout/archive.ejs new file mode 100644 index 00000000..426f6a86 --- /dev/null +++ b/themes/theme/layout/archive.ejs @@ -0,0 +1 @@ +<%- partial('partials/post_list') %> \ No newline at end of file diff --git a/themes/theme/layout/category.ejs b/themes/theme/layout/category.ejs new file mode 100644 index 00000000..aad151ae --- /dev/null +++ b/themes/theme/layout/category.ejs @@ -0,0 +1,4 @@ +
+ <%- partial('partials/post_gallery') %> +
+ diff --git a/themes/theme/layout/index.ejs b/themes/theme/layout/index.ejs new file mode 100644 index 00000000..a8c4c3ed --- /dev/null +++ b/themes/theme/layout/index.ejs @@ -0,0 +1 @@ +<%- partial('pages/profile') %> \ No newline at end of file diff --git a/themes/theme/layout/layout.ejs b/themes/theme/layout/layout.ejs new file mode 100644 index 00000000..4edf6098 --- /dev/null +++ b/themes/theme/layout/layout.ejs @@ -0,0 +1,24 @@ + + + + <%- partial('partials/head') %> + + +
+ + <%- partial('partials/header') %> + +
+
+ <%- body %> +
+
+ + <%- partial('partials/footer') %> + +
+ + + + + diff --git a/themes/theme/layout/pages/page_head.ejs b/themes/theme/layout/pages/page_head.ejs new file mode 100644 index 00000000..709fd55c --- /dev/null +++ b/themes/theme/layout/pages/page_head.ejs @@ -0,0 +1,14 @@ +
+ +
+
\ No newline at end of file diff --git a/themes/theme/layout/pages/profile.ejs b/themes/theme/layout/pages/profile.ejs new file mode 100644 index 00000000..19f38a05 --- /dev/null +++ b/themes/theme/layout/pages/profile.ejs @@ -0,0 +1,21 @@ +
+
+ <% if (theme.profile.image) {%> + featured_image + <% } %> +
+
+
+ <%=theme.profile.title%> +
+
+ <%=theme.profile.body%> +
+ <% Object.keys(theme.profile.links).forEach(key => { %> + + <% }); %> +
+ +
\ No newline at end of file diff --git a/themes/theme/layout/partials/back_to_top.ejs b/themes/theme/layout/partials/back_to_top.ejs new file mode 100644 index 00000000..df413f52 --- /dev/null +++ b/themes/theme/layout/partials/back_to_top.ejs @@ -0,0 +1,24 @@ +
+ +
+ + \ No newline at end of file diff --git a/themes/theme/layout/partials/footer.ejs b/themes/theme/layout/partials/footer.ejs new file mode 100644 index 00000000..6200a376 --- /dev/null +++ b/themes/theme/layout/partials/footer.ejs @@ -0,0 +1,16 @@ + diff --git a/themes/theme/layout/partials/head.ejs b/themes/theme/layout/partials/head.ejs new file mode 100644 index 00000000..23265719 --- /dev/null +++ b/themes/theme/layout/partials/head.ejs @@ -0,0 +1,73 @@ + + + +<% if(config.author){ %> + + <% } %> + <% if(config.subtitle){ %> + + <% } %> + <% if(config.description){ %> + + <% } %> + <% if(config.keywords){ %> + + <% } %> + + <% var title=page.title; if (is_archive()){ title=__('Archive'); if (is_month()){ title + +=': ' + page.year + '/' + page.month; } else if (is_year()){ title +=': ' + + page.year; } } else if (is_category()){ title=__('Category') + ': ' + page.category; + } else if (is_tag()){ title=__('Tag') + ': ' + page.tag; } %> + + + <% if (title){ %> + <%= title %> | <% } %> + <%= config.title %> + + + <%# favicon %> + <% if (theme.favicon){ %> + + <% } %> + + <%# css list %> + <% if (theme.stylesheets !==undefined && theme.stylesheets.length> + 0) { %> + + <% theme.stylesheets.forEach(url=> { %> + + <% }); %> + <% } %> + + <%# font preload - critical slices %> + + + + <%# javascript list %> + <% if (theme.scripts !==undefined && + theme.scripts.length> 0) { %> + + <% theme.scripts.forEach(url=> { %> + + <% }); %> + <% } %> + + <%# mathjax support %> + <% if(theme.mathjax_enable){ + %> + + + <% } %> + + <%# valine comment + support %> + <% if(theme.valine.enable){ + %> + + <% } %> \ No newline at end of file diff --git a/themes/theme/layout/partials/header.ejs b/themes/theme/layout/partials/header.ejs new file mode 100644 index 00000000..97752d9e --- /dev/null +++ b/themes/theme/layout/partials/header.ejs @@ -0,0 +1,42 @@ +
+
+
+ + + +
+
+
diff --git a/themes/theme/layout/partials/paginator.ejs b/themes/theme/layout/partials/paginator.ejs new file mode 100644 index 00000000..41c26391 --- /dev/null +++ b/themes/theme/layout/partials/paginator.ejs @@ -0,0 +1,14 @@ +<% if (page.total > 1){ %> +
+
+ +
+<% } %> \ No newline at end of file diff --git a/themes/theme/layout/partials/post_gallery.ejs b/themes/theme/layout/partials/post_gallery.ejs new file mode 100644 index 00000000..488270d3 --- /dev/null +++ b/themes/theme/layout/partials/post_gallery.ejs @@ -0,0 +1,42 @@ +
+
+ <% page.posts.each(function (post) { %> +
+ +
+ <% if (post.featured_image) {%> + featured_image + <% } %> +
+
+
+ <% }) %> +
+
+ <%- partial('partials/paginator') %> +
+
diff --git a/themes/theme/layout/partials/post_list.ejs b/themes/theme/layout/partials/post_list.ejs new file mode 100644 index 00000000..df3e8f2e --- /dev/null +++ b/themes/theme/layout/partials/post_list.ejs @@ -0,0 +1,29 @@ +
+ <% var last_year = ''; %> + <% page.posts.each(function (post) { %> + + <% var cur_year = post.date.year(); %> + + <% if(last_year !== cur_year){ %> +
<%- cur_year %>
+ <% last_year = cur_year; } %> + +
+
+ + <% if (post.title) {%> + <%= post.title %> + <% } else {%> + *Untitled + <% } %> + +
+ + +
+ + <% }) %> +
+ <%- partial('partials/paginator') %> +
+
diff --git a/themes/theme/layout/partials/tag_cloud.ejs b/themes/theme/layout/partials/tag_cloud.ejs new file mode 100644 index 00000000..75d8eef2 --- /dev/null +++ b/themes/theme/layout/partials/tag_cloud.ejs @@ -0,0 +1,11 @@ +
+
+ <%site.tags.forEach(tag=>{%> + + <%})%> +
+
\ No newline at end of file diff --git a/themes/theme/layout/post.ejs b/themes/theme/layout/post.ejs new file mode 100644 index 00000000..00475498 --- /dev/null +++ b/themes/theme/layout/post.ejs @@ -0,0 +1,14 @@ +
+ + <% if (is_post()) {%> + <%- partial('post/post_head') %> + <%- partial('post/post_content') %> + <%- partial('post/post_footer') %> + <% if (!page.hide_comment) {%> + <%- partial('post/post_comment') %> + <% } %> + <%} else {%> + <%- partial('pages/page_head') %> + <%- partial('post/post_content') %> + <%} %> +
\ No newline at end of file diff --git a/themes/theme/layout/post/post_comment.ejs b/themes/theme/layout/post/post_comment.ejs new file mode 100644 index 00000000..60a76fb4 --- /dev/null +++ b/themes/theme/layout/post/post_comment.ejs @@ -0,0 +1,48 @@ +
+ + <% if (theme.valine.enable) {%> +
+ + <% } %> + + <% if (theme.disqus.enable) {%> +
+ + + <% } %> + + + +
\ No newline at end of file diff --git a/themes/theme/layout/post/post_content.ejs b/themes/theme/layout/post/post_content.ejs new file mode 100644 index 00000000..e51bc059 --- /dev/null +++ b/themes/theme/layout/post/post_content.ejs @@ -0,0 +1,7 @@ +
+ <%-page.content%> +
+ + \ No newline at end of file diff --git a/themes/theme/layout/post/post_footer.ejs b/themes/theme/layout/post/post_footer.ejs new file mode 100644 index 00000000..c4978890 --- /dev/null +++ b/themes/theme/layout/post/post_footer.ejs @@ -0,0 +1,21 @@ +
+
+ +
diff --git a/themes/theme/layout/post/post_head.ejs b/themes/theme/layout/post/post_head.ejs new file mode 100644 index 00000000..ad821406 --- /dev/null +++ b/themes/theme/layout/post/post_head.ejs @@ -0,0 +1,34 @@ +
+ +
+ <% if (page.featured_image) {%> + featured_image + <% } else { %> +
+ <% } %> +
+
\ No newline at end of file diff --git a/themes/theme/layout/search.ejs b/themes/theme/layout/search.ejs new file mode 100644 index 00000000..ed7ba50e --- /dev/null +++ b/themes/theme/layout/search.ejs @@ -0,0 +1,21 @@ + + + + <%- partial('partials/head') %> + + +
+ <%- partial('partials/header') %> + +
+
+ <%- body %> +
+
+ + <%- partial('partials/footer') %> +
+ + + + diff --git a/themes/theme/layout/tag.ejs b/themes/theme/layout/tag.ejs new file mode 100644 index 00000000..045cc160 --- /dev/null +++ b/themes/theme/layout/tag.ejs @@ -0,0 +1,17 @@ +
+ <% if(is_tag()){ %> + +

+ / tags + / <%=page.tag%> / +

+ <%- partial('partials/post_list') %> + + <% }else{ %> + +

/ tags /

+ <%- partial('partials/tag_cloud') %> + + <% } %> + +
\ No newline at end of file -- cgit v1.2.3