aboutsummaryrefslogtreecommitdiffstats
path: root/layouts/partials/post_meta.html
diff options
context:
space:
mode:
authoryingyu5658 <i@yingyu5658.me>2026-01-24 21:35:35 +0800
committeryingyu5658 <i@yingyu5658.me>2026-01-24 21:35:35 +0800
commit84b96be8a7e11f9ecf7058ecaaad9680ffc34cd8 (patch)
tree71ca8e63bfcfb2e23a43a5dcc4716d2fb62dd5b7 /layouts/partials/post_meta.html
parentc8d455cc3d4336702b4b9854ba686b584bf3f770 (diff)
downloadblog-84b96be8a7e11f9ecf7058ecaaad9680ffc34cd8.tar.gz
blog-84b96be8a7e11f9ecf7058ecaaad9680ffc34cd8.zip
chore: add partials "post_meta"
Diffstat (limited to 'layouts/partials/post_meta.html')
-rw-r--r--layouts/partials/post_meta.html39
1 files changed, 39 insertions, 0 deletions
diff --git a/layouts/partials/post_meta.html b/layouts/partials/post_meta.html
new file mode 100644
index 0000000..741efd2
--- /dev/null
+++ b/layouts/partials/post_meta.html
@@ -0,0 +1,39 @@
+{{ if ne (.Params.showMeta | default true) false }}
+<div class="post-meta">
+
+ <div class="post-meta-item post-author">
+ {{ with .Params.author | default "Verdant" }}
+ <p>
+ <svg t="1768726817979" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4715" width="200" height="200"><path d="M858.5 763.6c-18.9-44.8-46.1-85-80.6-119.5-34.5-34.5-74.7-61.6-119.5-80.6-0.4-0.2-0.8-0.3-1.2-0.5C719.5 518 760 444.7 760 362c0-137-111-248-248-248S264 225 264 362c0 82.7 40.5 156 102.8 201.1-0.4 0.2-0.8 0.3-1.2 0.5-44.8 18.9-85 46-119.5 80.6-34.5 34.5-61.6 74.7-80.6 119.5C146.9 807.5 137 854 136 901.8c-0.1 4.5 3.5 8.2 8 8.2h60c4.4 0 7.9-3.5 8-7.8 2-77.2 33-149.5 87.8-204.3 56.7-56.7 132-87.9 212.2-87.9s155.5 31.2 212.2 87.9C779 752.7 810 825 812 902.2c0.1 4.4 3.6 7.8 8 7.8h60c4.5 0 8.1-3.7 8-8.2-1-47.8-10.9-94.3-29.5-138.2zM512 534c-45.9 0-89.1-17.9-121.6-50.4S340 407.9 340 362c0-45.9 17.9-89.1 50.4-121.6S466.1 190 512 190s89.1 17.9 121.6 50.4S684 316.1 684 362c0 45.9-17.9 89.1-50.4 121.6S557.9 534 512 534z" p-id="4716"></path></svg>
+ {{ . }}
+ </p>
+ {{ end }}
+ </div>
+
+ <div class="post-meta-item post-date">
+ <svg t="1768727464189" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5925" width="200" height="200"><path d="M341.333333 170.666667h341.333334V85.333333h85.333333v85.333334h42.666667a85.333333 85.333333 0 0 1 85.333333 85.333333v597.333333a85.333333 85.333333 0 0 1-85.333333 85.333334H213.333333a85.333333 85.333333 0 0 1-85.333333-85.333334V256a85.333333 85.333333 0 0 1 85.333333-85.333333h42.666667V85.333333h85.333333v85.333334zM213.333333 341.333333v512h597.333334V341.333333H213.333333z m85.333334 128h85.333333v85.333334H298.666667v-85.333334z m170.666666 0h85.333334v85.333334h-85.333334v-85.333334z m170.666667 0h85.333333v85.333334h-85.333333v-85.333334z m0 170.666667h85.333333v85.333333h-85.333333v-85.333333z m-170.666667 0h85.333334v85.333333h-85.333334v-85.333333z m-170.666666 0h85.333333v85.333333H298.666667v-85.333333z" fill="#000000" p-id="5926"></path></svg>
+ <time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
+
+ {{ .Date.Format "January 02, 2006" }}
+ </time>
+ </div>
+
+ <div class="post-meta-item post-category">
+ <svg t="1768727819011" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="7095" width="200" height="200"><path d="M85.312 153.6v716.8h853.376V288H471.36L364.416 153.6h-279.04zM0 64h404.288L511.36 198.4H1024V960H0V64z" fill="#262626" p-id="7096"></path></svg>
+ {{ range .Params.categories }}
+ {{ $url := printf "/categories/%s/" (. | urlize) }}
+ <a href="{{ $url }}" class="category-link">{{ . }}</a>
+ {{ end }}
+ </div>
+
+ <div class="post-meta-item post-tag">
+ <svg t="1768727897449" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="8070" width="200" height="200"><path d="M512 910.208L910.208 512 480.832 82.624l-378.816 24.448-19.776 373.376L512 910.208zM0 512L25.472 31.36 512 0l512 512-512 512-512-512z m293.376-128.96a85.952 85.952 0 1 0 0-171.904 85.952 85.952 0 0 0 0 171.904z" fill="#262626" p-id="8071"></path></svg>
+ {{ $tags := .GetTerms "tags" }}
+ {{ $len := len $tags }}
+ {{ range $index, $tag := $tags }}
+ <a href="{{ .Permalink }}">{{ $tag.LinkTitle }}</a>
+ {{ if lt (add $index 1) $len }}, {{ end }}
+ {{ end }}
+ </div>
+</div>
+{{ end }}