mirror of
https://github.com/CaiJimmy/hugo-theme-stack.git
synced 2025-04-28 19:43:31 +08:00
Merge 557aae8163
into 9e6b7b22a9
This commit is contained in:
commit
065e1ffc4b
@ -40,6 +40,17 @@
|
|||||||
img {
|
img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
height: auto;
|
height: auto;
|
||||||
|
display: block;
|
||||||
|
margin: 0 auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
figcaption {
|
||||||
|
margin-top: 0.5em;
|
||||||
|
font-size: 0.9em;
|
||||||
|
color: var(--card-text-color-secondary);
|
||||||
|
font-style: italic;
|
||||||
|
font-weight: bold;
|
||||||
|
text-align: center;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
|
{{- $image := .Page.Resources.GetMatch (printf "%s" (.Destination | safeURL)) -}}
|
||||||
{{- $Permalink := .Destination | relURL | safeURL -}}
|
{{- $Permalink := .Destination | relURL | safeURL -}}
|
||||||
{{- $alt := .PlainText | safeHTML -}}
|
{{- $alt := .PlainText | safeHTML -}}
|
||||||
|
{{- $title := .Title | markdownify | safeHTML -}}
|
||||||
{{- $Width := 0 -}}
|
{{- $Width := 0 -}}
|
||||||
{{- $Height := 0 -}}
|
{{- $Height := 0 -}}
|
||||||
{{- $Srcset := "" -}}
|
{{- $Srcset := "" -}}
|
||||||
@ -39,3 +40,6 @@
|
|||||||
data-flex-basis="{{ div (mul $image.Width 240) $image.Height }}px"
|
data-flex-basis="{{ div (mul $image.Width 240) $image.Height }}px"
|
||||||
{{ end }}
|
{{ end }}
|
||||||
>
|
>
|
||||||
|
{{- if $title }}
|
||||||
|
<figcaption>{{ .Title }}</figcaption>
|
||||||
|
{{- end }}
|
||||||
|
Loading…
Reference in New Issue
Block a user