diff options
| author | Eltrac <hi@guhub.cn> | 2025-07-14 19:05:44 +0800 |
|---|---|---|
| committer | Eltrac <hi@guhub.cn> | 2025-07-14 19:05:44 +0800 |
| commit | 3cb68b6d5231ac9932b521dee767aae19ae1ca60 (patch) | |
| tree | d19a8819ab59b68498c049b270582c5a30371e9d /layouts/_shortcodes/link.html | |
| parent | 54b306460dd67be4c0f41dee3d8ec5d6014178a7 (diff) | |
refactor: keep layouts folder structure up to standards
Former-commit-id: 44c7def3f6958550ccf965971f1819c1d6c514f1
Diffstat (limited to 'layouts/_shortcodes/link.html')
| -rw-r--r-- | layouts/_shortcodes/link.html | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/layouts/_shortcodes/link.html b/layouts/_shortcodes/link.html new file mode 100644 index 00000000..1b9c4f79 --- /dev/null +++ b/layouts/_shortcodes/link.html @@ -0,0 +1,14 @@ +<a href="{{.Get "link" }}" target="_blank" + class="{{ if (.Get "type") }}{{ .Get "type" }}-link{{ else }}blog-link{{ end }}"> + {{ if and (isset .Params "image") .Params.image }} + <div class="link-image"> + <img src="{{ .Params.image }}" class="no-fancybox" alt="{{ .Params.title }}" /> + </div> + {{ end }} + {{ if ne (.Get "type") "podcast" }} + <div class="link-content"> + <h4>{{.Get "title" }}</h4> + <p>{{.Get "description" }}</p> + </div> + {{ end }} +</a> |
