diff options
| author | Eltrac <hi@guhub.cn> | 2024-12-19 14:41:26 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2024-12-19 14:41:26 +0800 |
| commit | 103be55e7daec04b8da85ee175a9ec2317a167b0 (patch) | |
| tree | 99af7983332c60d0f276416a34d936a5581fede8 /layouts/shortcodes | |
| parent | c695b9511ba695bc57144b8c3f72e08625cce29a (diff) | |
refactor: disable theme and move layout files to root
Diffstat (limited to 'layouts/shortcodes')
| -rw-r--r-- | layouts/shortcodes/bloglink.html | 11 | ||||
| -rw-r--r-- | layouts/shortcodes/book.html | 17 | ||||
| -rw-r--r-- | layouts/shortcodes/callout.html | 6 | ||||
| -rw-r--r-- | layouts/shortcodes/gallery.html | 3 | ||||
| -rw-r--r-- | layouts/shortcodes/img.html | 20 | ||||
| -rw-r--r-- | layouts/shortcodes/quotecard.html | 3 |
6 files changed, 60 insertions, 0 deletions
diff --git a/layouts/shortcodes/bloglink.html b/layouts/shortcodes/bloglink.html new file mode 100644 index 00000000..4cdec219 --- /dev/null +++ b/layouts/shortcodes/bloglink.html @@ -0,0 +1,11 @@ +<a href="{{.Get "link" }}" class="blog-link" target="_blank"> + {{ if and (isset .Params "image") .Params.image }} + <div class="blog-link-image"> + <img src="{{ .Params.image }}" alt="{{ .Params.title }}" /> + </div> + {{ end }} + <div class="blog-link-content"> + <h4>{{.Get "title" }}</h4> + <p>{{.Get "description" }}</p> + </div> +</a>
\ No newline at end of file diff --git a/layouts/shortcodes/book.html b/layouts/shortcodes/book.html new file mode 100644 index 00000000..17747acc --- /dev/null +++ b/layouts/shortcodes/book.html @@ -0,0 +1,17 @@ +<div class="book-showcase"> + <div class="book-cover"> + <a href="{{ .Get "cover" }}" data-fancybox> + <img src="{{ .Get "cover" }}" /> + </a> + </div> + <div class="book-description"> + <div class="book-description-header"> + <h3 class="book-title">{{ .Get "title" }}</h3> + <p>分数:{{ .Get "rating" }}</p> + </div> + <div> + + {{ .Inner | markdownify }} + </div> + </div> +</div> diff --git a/layouts/shortcodes/callout.html b/layouts/shortcodes/callout.html new file mode 100644 index 00000000..62112390 --- /dev/null +++ b/layouts/shortcodes/callout.html @@ -0,0 +1,6 @@ +<div class="callout"> + <div class="callout-icon">{{ index .Params 1 }}</div> + <div class="callout-text"> + {{ index .Params 0 | markdownify }} + </div> +</div>
\ No newline at end of file diff --git a/layouts/shortcodes/gallery.html b/layouts/shortcodes/gallery.html new file mode 100644 index 00000000..a6e4d1b5 --- /dev/null +++ b/layouts/shortcodes/gallery.html @@ -0,0 +1,3 @@ +<div class="inline-image"> + {{ .Inner | safeHTML }} +</div> diff --git a/layouts/shortcodes/img.html b/layouts/shortcodes/img.html new file mode 100644 index 00000000..4fd1f739 --- /dev/null +++ b/layouts/shortcodes/img.html @@ -0,0 +1,20 @@ +<!-- image --> +<figure {{ with .Get "class" }}class="{{ . }}"{{ end }}> +{{ with .Get "link" }}<a href="{{ . }}">{{ end }} + <a href="{{ .Get "src" }}" data-fancybox {{ if isset .Params "title" }} data-caption="{{.Get "title" }}" {{ end }}> + <img src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt" }}{{ . }}{{ else }}{{ .Get "caption" }}{{ end }}"{{ end }} /> + </a> + {{ if .Get "link" }}</a>{{ end }} + {{ if or (or (.Get "title") (.Get "caption")) (.Get "attr") }} + <figcaption>{{ if isset .Params "title" }} + <h4>{{ .Get "title" }}</h4>{{ end }} + {{ if or (.Get "caption") (.Get "attr") }}<p> + {{ .Get "caption" }} + {{ with .Get "attrlink" }}<a href="{{ . }}"> {{ end }} + {{ .Get "attr" }} + {{ if .Get "attrlink" }}</a> {{ end }} + </p> {{ end }} + </figcaption> +{{ end }} +</figure> +<!-- image -->
\ No newline at end of file diff --git a/layouts/shortcodes/quotecard.html b/layouts/shortcodes/quotecard.html new file mode 100644 index 00000000..dfaf04e2 --- /dev/null +++ b/layouts/shortcodes/quotecard.html @@ -0,0 +1,3 @@ +<div class="quote-card" {{ with .Get "rotate" }}style="transform: rotate({{. }}deg)"{{ end }}> + {{ .Inner | markdownify }} +</div>
\ No newline at end of file |
