Skip to content
Snippets Groups Projects
Commit 8c379e57 authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

rm unused

parent aec4a67d
No related branches found
No related tags found
1 merge request!819Cleanup hugo shortcodes (#244)
{{ $original := .Page.Resources.GetMatch (printf "%s*" (.Get 0)) }}
{{ $options := .Get 1 }}
{{ with ($original.Resize $options) }}
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}">
{{ end }}
{{ $imagename := .Get "src" }}
{{ $command := .Get "command" }}
{{ $options := .Get "options" }}
{{ $caption := .Get "caption" }}
{{ $original := .Page.Resources.GetMatch (printf "%s*" $imagename) }}
{{ if eq $command "Fit"}}
{{ .Scratch.Set "image" ($original.Fit $options) }}
{{ else if eq $command "Resize"}}
{{ .Scratch.Set "image" ($original.Resize $options) }}
{{ else if eq $command "Fill"}}
{{ .Scratch.Set "image" ($original.Fill $options) }}
{{ else }}
{{ errorf "Invalid image processing command: Must be one of Fit, Fill or Resize."}}
{{ end }}
{{ $image := .Scratch.Get "image" }}
<div class="col-sm-12 col-md-6">
<figure>
<a class="lightbox" href="{{ $original.RelPermalink }}" data-caption="{{ $caption}}" >
<img class="img-fluid" src="{{ $image.RelPermalink }}" width="{{ $image.Width }}" height="{{ $image.Height }}" alt="{{$caption}}">
</a>
<figcaption>
<p> {{- $caption -}} </p>
</figcaption>
</figure>
</div>
\ No newline at end of file
<a class="linktofile" href="{{ .Site.BaseURL }}/{{ .Get 0 }}"/>
{{ .Inner }}
</a>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment