diff options
| author | yingyu5658 <i@yingyu5658.me> | 2026-01-02 11:47:26 +0800 |
|---|---|---|
| committer | yingyu5658 <i@yingyu5658.me> | 2026-01-02 11:47:26 +0800 |
| commit | 9009b6b53321a52e63336ecd43c0ba2dd76af97a (patch) | |
| tree | 6a9ac4c1861fdc1c6f4941465de2b6e86babc2d1 /layouts/shortcodes/book.html | |
| parent | d1a6cf3fb7016586718ad37d6bb5b74335f0818b (diff) | |
| download | blog-9009b6b53321a52e63336ecd43c0ba2dd76af97a.tar.gz blog-9009b6b53321a52e63336ecd43c0ba2dd76af97a.zip | |
feat: add booklist shortcode
Diffstat (limited to 'layouts/shortcodes/book.html')
| -rw-r--r-- | layouts/shortcodes/book.html | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/layouts/shortcodes/book.html b/layouts/shortcodes/book.html new file mode 100644 index 0000000..072669b --- /dev/null +++ b/layouts/shortcodes/book.html @@ -0,0 +1,10 @@ + +<div class="booklist-item"> + {{ if .Get "url" }} + <a href="{{ .Get "url" }}"> + <img class="book-cover" src="{{ .Get "cover" }}" alt="图书封面" /> + </a> + {{ else }} + <img class="book-cover" src="{{ .Get "cover" }}" alt="图书封面" /> + {{ end }} +</div> |
