mirror of
https://github.com/maikka39/Personal-Website.git
synced 2026-10-02 14:46:25 +00:00
Improve looks of figcaptions
This commit is contained in:
@@ -186,8 +186,12 @@ figure {
|
|||||||
font-size: 1.125rem;
|
font-size: 1.125rem;
|
||||||
line-height: 1.3;
|
line-height: 1.3;
|
||||||
margin-top: 0.4em;
|
margin-top: 0.4em;
|
||||||
font-weight: bold;
|
|
||||||
opacity: 0.8;
|
opacity: 0.8;
|
||||||
|
vertical-align: middle;
|
||||||
|
|
||||||
|
span {
|
||||||
|
vertical-align: middle;
|
||||||
|
}
|
||||||
|
|
||||||
&.left {
|
&.left {
|
||||||
text-align: left;
|
text-align: left;
|
||||||
@@ -200,6 +204,20 @@ figure {
|
|||||||
&.right {
|
&.right {
|
||||||
text-align: right;
|
text-align: right;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.figcaption {
|
||||||
|
&__title {
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
&__attr {
|
||||||
|
font-size: 0.7em;
|
||||||
|
|
||||||
|
svg {
|
||||||
|
margin-right: 0.3em;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
&.small {
|
&.small {
|
||||||
|
|||||||
@@ -14,22 +14,32 @@
|
|||||||
{{- if .Get "link" }}</a>{{ end -}}
|
{{- if .Get "link" }}</a>{{ end -}}
|
||||||
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
{{- if or (or (.Get "title") (.Get "caption")) (.Get "attr") -}}
|
||||||
<figcaption>
|
<figcaption>
|
||||||
{{- if or (.Get "caption") (.Get "attr") -}}
|
{{- with .Get "title" -}}
|
||||||
{{- with (.Get "title") -}}
|
<span class="figcaption__title">{{ . }}</span>
|
||||||
<h4>{{ . }}</h4>
|
{{- end }}
|
||||||
|
{{- if and (.Get "title") (.Get "caption") }}
|
||||||
|
<span>{{" - "}}</span>
|
||||||
|
{{- end }}
|
||||||
|
{{- with .Get "caption" }}
|
||||||
|
<span class="figcaption__caption">
|
||||||
|
{{- . | markdownify -}}
|
||||||
|
</span>
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
<p>
|
{{- if .Get "attr" }}
|
||||||
{{- .Get "caption" | markdownify -}}
|
{{- if or (.Get "title") (.Get "caption") }}
|
||||||
|
<span>{{" - "}}</span>
|
||||||
|
{{- end }}
|
||||||
|
<span class="figcaption__attr">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-user">
|
||||||
|
<path d="M20 21v-2a4 4 0 0 0-4-4H8a4 4 0 0 0-4 4v2"></path>
|
||||||
|
<circle cx="12" cy="7" r="4"></circle>
|
||||||
|
</svg>
|
||||||
{{- with .Get "attrlink" }}
|
{{- with .Get "attrlink" }}
|
||||||
<a href="{{ . }}">
|
<a href="{{ . }}">
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- .Get "attr" | markdownify -}}
|
{{- .Get "attr" | markdownify -}}
|
||||||
{{- if .Get "attrlink" }}</a>{{ end }}
|
{{- if .Get "attrlink" }}</a>{{ end }}
|
||||||
</p>
|
</span>
|
||||||
{{- else -}}
|
|
||||||
{{- with (.Get "title") -}}
|
|
||||||
{{ . }}
|
|
||||||
{{- end -}}
|
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
</figcaption>
|
</figcaption>
|
||||||
{{- end }}
|
{{- end }}
|
||||||
|
|||||||
Reference in New Issue
Block a user