mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2025-10-30 19:35:26 +01:00
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:
@@ -394,3 +394,8 @@ h6:hover .anchor {
|
|||||||
h1>a>svg {
|
h1>a>svg {
|
||||||
display: inline;
|
display: inline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img.in-text {
|
||||||
|
display: inline;
|
||||||
|
margin: auto;
|
||||||
|
}
|
||||||
5
layouts/shortcodes/inTextImg.html
Normal file
5
layouts/shortcodes/inTextImg.html
Normal 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}}">
|
||||||
Reference in New Issue
Block a user