Add inTextImg shortcode

Allows adding in-line-text images

usage in page.md =>
This image is inlined {{< inTextImg.html url="image.png" >}} here.

optional args:
- height
- alt
This commit is contained in:
Aditya Telange 2022-07-08 20:09:18 +05:30
parent 5032b2c4f1
commit e3c30b4e41
No known key found for this signature in database
GPG Key ID: 82E844EF3DA99E77
2 changed files with 10 additions and 0 deletions

View File

@ -394,3 +394,8 @@ h6:hover .anchor {
h1>a>svg {
display: inline;
}
img.in-text {
display: inline;
margin: auto;
}

View File

@ -0,0 +1,5 @@
{{- $Img := (.Get "url") }}
{{- $height := (.Get "height") }}
{{- $alt := (.Get "alt") }}
<img class="in-text" height="{{ $height | default `15px` }}" src="{{$Img}}" alt="{{$alt}}">