first!
This commit is contained in:
commit
cf7a27bfa1
225 changed files with 3580 additions and 0 deletions
14
layouts/shortcodes/img.html
Normal file
14
layouts/shortcodes/img.html
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
<div class="image-container">
|
||||
{{ $src := .Get "src" }}
|
||||
{{ if hasPrefix $src "/" }}
|
||||
<img src='{{ $src }}' title='{{ .Get "caption" | markdownify }}' />
|
||||
{{ else }}
|
||||
{{ $img := .Page.Resources.GetMatch $src }}
|
||||
{{ if $img }}
|
||||
<img src='{{ $img.RelPermalink }}' title='{{ .Get "caption" | markdownify }}' />
|
||||
{{ else }}
|
||||
<img src='{{ $src }}' title='{{ .Get "caption" | markdownify }}' />
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<p>{{ .Get "caption" | markdownify }}</p>
|
||||
</div>
|
||||
Loading…
Add table
Add a link
Reference in a new issue