Merge pull request #1 from mfaani/imageCaption
added style for figcaption
This commit is contained in:
commit
fb1eb62d3a
@ -231,11 +231,18 @@
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
.post-content img {
|
||||
.post-content {
|
||||
border-radius: 4px;
|
||||
margin: 1rem 0;
|
||||
}
|
||||
|
||||
/* Had to make this change so the images have a smaller bottom margin.
|
||||
This would allow me to position the caption closer to the image*/
|
||||
img {
|
||||
border-radius: 4px;
|
||||
margin: 1rem 0 0.1rem 0;
|
||||
}
|
||||
|
||||
.post-content img[src*="#center"] {
|
||||
margin: 1rem auto;
|
||||
}
|
||||
|
@ -1 +1,8 @@
|
||||
<img loading="lazy" src="{{ .Destination | safeURL }}" alt="{{ .Text }}" {{ with .Title}} title="{{ . }}" {{ end }} />
|
||||
{{ if .Title }}
|
||||
<figure>
|
||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}">
|
||||
<figcaption style ="margin: auto; font-style: italic; font-size: x-small; color: rgb(168, 151, 151); text-align: center; width: 80%; padding: 10px;">{{ .Title }}</figcaption>
|
||||
</figure>
|
||||
{{ else }}
|
||||
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}">
|
||||
{{ end }}
|
Loading…
x
Reference in New Issue
Block a user