aboutsummaryrefslogtreecommitdiff
path: root/www/layouts/partials/preview/article.html
diff options
context:
space:
mode:
authorYuqian Yang <crupest@crupest.life>2025-02-24 02:18:20 +0800
committerYuqian Yang <crupest@crupest.life>2025-02-26 02:21:41 +0800
commit046c71c4c282b7c9dce781c8a1f31c68a1515854 (patch)
tree48e72e89b22c569d716bf66e746ed4a8a0fbfd98 /www/layouts/partials/preview/article.html
parent471cacdd706002df81f5bee03729b8fca6c98f37 (diff)
downloadcrupest-046c71c4c282b7c9dce781c8a1f31c68a1515854.tar.gz
crupest-046c71c4c282b7c9dce781c8a1f31c68a1515854.tar.bz2
crupest-046c71c4c282b7c9dce781c8a1f31c68a1515854.zip
feat(www): YEAH!
Diffstat (limited to 'www/layouts/partials/preview/article.html')
-rw-r--r--www/layouts/partials/preview/article.html10
1 files changed, 10 insertions, 0 deletions
diff --git a/www/layouts/partials/preview/article.html b/www/layouts/partials/preview/article.html
new file mode 100644
index 0000000..6245434
--- /dev/null
+++ b/www/layouts/partials/preview/article.html
@@ -0,0 +1,10 @@
+<section class="article-preview">
+ <span class="date">{{ .date | time.Format ":date_medium" }}</span>
+ {{ (printf `<%[1]s class="title"><a href="%s">%s</a></%[1]s>` .h .link .title) | safeHTML }}
+ <p class="content">
+ {{ range split .content "\n" | first 5 }}
+ {{ . | htmlUnescape }}<br/>
+ {{ end }}
+ </p>
+ <p>... <a class="mono-link" href="{{ .link }}">Read more</a></p>
+</section>