Stylize images with borders and captions

Taken from https://css-tricks.com/give-your-images-space-and-captions-for-better-layout/ and adapted to be a Hugo render hook.

Signed-off-by: Harsh Shandilya <msfjarvis@gmail.com>
This commit is contained in:
Harsh Shandilya 2020-02-03 11:00:55 +05:30
parent e9335a187a
commit 155aecc274
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,4 @@
<div class="image_caption">
<img src="{{ .Destination | safeURL }}" alt="{{ .Text }}" />
<p>{{ .Text }}</p>
</div>

View File

@ -82,6 +82,16 @@ a:focus {
text-decoration: underline;
}
div.image_caption {
display: inline-block;
padding: 10px;
margin: 10px;
border: 2px solid #cccccc;
text-align: center;
font-size: 0.8em;
font-style: italic;
}
.tag {
color: #757575;
}