20 lines
962 B
HTML
20 lines
962 B
HTML
{{/* 内容分割线。样式在 hugo.toml 的 [params.divider] 里切换:
|
|||
|
|
|
||
|
|
[params.divider]
|
||
|
|
style = "icon" # icon = 主题原生 uk-divider-icon(圆圈 + 两侧细线)
|
||
|
|
# image = 使用本地图片
|
||
|
|
image = "/image/footer-animal.webp" # image 样式生效;图片放 static/ 下
|
||
|
|
height = "110px" # image 样式生效;图片最大高度
|
||
|
|
|
||
|
|
图片必须本地化(放 static/),不要直接引外链。 */}}
|
||
|
|
{{- $d := site.Params.divider | default dict -}}
|
||
|
|
{{- $style := $d.style | default "icon" -}}
|
||
|
|
{{- if eq $style "image" -}}
|
||
|
|
{{- $src := $d.image | default "/image/footer-animal.webp" -}}
|
||
|
|
{{- $h := $d.height | default "110px" -}}
|
||
|
|
<div class="post-divider post-divider-image" aria-hidden="true">
|
||
|
|
<img src="{{ $src }}" alt="" loading="lazy" decoding="async" style="--divider-max-h:{{ $h }}">
|
||
|
|
</div>
|
||
|
|
{{- else -}}
|
||
|
|
<hr class="uk-divider-icon">
|
||
|
|
{{- end -}}
|