mirror of
https://github.com/nikdoof/website-hugo.git
synced 2025-12-14 17:22:17 +00:00
Large storage custom nas (#62)
NAS Storage blog post Added `aimage`, `bimage`, `bgallery` and `fimage` custom shortcodes
This commit is contained in:
14
themes/lhs/layouts/shortcodes/fimage.html
Normal file
14
themes/lhs/layouts/shortcodes/fimage.html
Normal file
@@ -0,0 +1,14 @@
|
||||
{{ $img := .Page.Resources.GetMatch (printf "*%s*" (.Get "src")) }}
|
||||
{{ $width := .Get "width" }}
|
||||
{{ $height := .Get "height" }}
|
||||
{{ $title := .Get "title" }}
|
||||
{{ $float := .Get "float" }}
|
||||
<img src="{{ $img.RelPermalink }}" style="float:{{$float}}; margin-right:10px;" width="{{$width}}px" heigth="{{$height}}px" {{ if $title }}
|
||||
alt="{{ $title }}" {{ end }}>
|
||||
{{ if $title }}
|
||||
<figcaption class="is-size-6">
|
||||
<small>
|
||||
{{ $title }}
|
||||
</small>
|
||||
</figcaption>
|
||||
{{ end }}
|
||||
Reference in New Issue
Block a user