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/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 ++++ 8 files changed, 251 insertions(+) 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 (limited to 'themes/theme/layout/partials') 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 -- cgit v1.2.3