Add post: 暗黑能天使
This commit is contained in:
9
layouts/partials/utils/get-featured.html
Normal file
9
layouts/partials/utils/get-featured.html
Normal file
@@ -0,0 +1,9 @@
|
||||
{{ $video := partial "utils/get-video" (dict "context" . "url" .Params.featuredVideo "keyword" "*featured*") }}
|
||||
{{ $image := partial "utils/get-image" (dict "context" . "url" .Params.featuredImage "keyword" "*featured*") }}
|
||||
{{ $featured := ""}}
|
||||
{{ if $video }}
|
||||
{{ $featured = $video }}
|
||||
{{ else if $image }}
|
||||
{{ $featured = print "<img src=\"" $image "\" class=\"w-full\" alt=\"Featured Image\">" | safeHTML }}
|
||||
{{ end }}
|
||||
{{ return $featured }}
|
||||
Reference in New Issue
Block a user