add and document extra classes and parameters
This commit is contained in:
@@ -40,7 +40,7 @@
|
||||
{{- with .Get "rel" }} rel="{{ . }}"{{ end -}}
|
||||
>
|
||||
{{ else -}}
|
||||
<a href="#{{ $id }}">
|
||||
{{ if not (eq (.Get "lightbox") "none") }}<a href="#{{ $id }}">{{ end }}
|
||||
{{- end -}}
|
||||
<!-- THUMBNAIL -->
|
||||
<img src="{{ $thumb | relURL }}" class="snap-thumb"
|
||||
@@ -57,29 +57,31 @@
|
||||
{{- end }}
|
||||
</a>
|
||||
<!-- FULL IMAGE; HIDDEN -->
|
||||
<div class="snap-lightbox" id="{{ $id }}">
|
||||
<a href="#_" class="snap-lightbox-close"></a>
|
||||
<div class="snap-lightbox-inner">
|
||||
<img src="{{ .Get "src" }}" {{ with .Get "alt" }}alt="{{ . }}"{{ end }} />
|
||||
<p>
|
||||
{{- if or (.Get "caption") (.Get "attr") -}}
|
||||
{{- .Get "caption" | markdownify -}}
|
||||
{{- with .Get "attrlink" }} <a href="{{ . }}">{{- end -}}
|
||||
{{- with .Get "attr" }} {{ . | markdownify}}{{ end -}}
|
||||
{{- with .Get "attrlink" }}</a>{{- end -}}
|
||||
{{- if not (eq (.Get "lightbox") "none") -}}
|
||||
<div class="snap-lightbox" id="{{ $id }}">
|
||||
<a href="#_" class="snap-lightbox-close"></a>
|
||||
<div class="snap-lightbox-inner">
|
||||
<img src="{{ .Get "src" }}" {{ with .Get "alt" }}alt="{{ . }}"{{ end }} />
|
||||
<p>
|
||||
{{- if or (.Get "caption") (.Get "attr") -}}
|
||||
{{- .Get "caption" | markdownify -}}
|
||||
{{- with .Get "attrlink" }} <a href="{{ . }}">{{- end -}}
|
||||
{{- with .Get "attr" }} {{ . | markdownify}}{{ end -}}
|
||||
{{- with .Get "attrlink" }}</a>{{- end -}}
|
||||
{{- end }}
|
||||
</p>
|
||||
</div>
|
||||
<a href="#_" class="snap-lightbox-close-button"><i class="snap-lightbox-x"></i></a>
|
||||
{{- if .Parent -}}
|
||||
{{- if not (eq $figid 1) -}}
|
||||
<a href="#{{ $previd }}" class="snap-lightbox-prev"><i class="snap-lightbox-arrow"></i></a>
|
||||
{{- else -}}
|
||||
<span class="snap-lightbox-prev"><i class="snap-lightbox-arrow"></i></span>
|
||||
{{- end -}}
|
||||
<!-- TODO: Somehow try to identify whether this is the last element in the gallery -->
|
||||
<a href="#{{ $nextid }}" class="snap-lightbox-next"><i class="snap-lightbox-arrow"></i></a>
|
||||
{{- end }}
|
||||
</p>
|
||||
</div>
|
||||
<a href="#_" class="snap-lightbox-close-button"><i class="snap-lightbox-x"></i></a>
|
||||
{{- if .Parent -}}
|
||||
{{- if not (eq $figid 1) -}}
|
||||
<a href="#{{ $previd }}" class="snap-lightbox-prev"><i class="snap-lightbox-arrow"></i></a>
|
||||
{{- else -}}
|
||||
<span class="snap-lightbox-prev"><i class="snap-lightbox-arrow"></i></span>
|
||||
{{- end -}}
|
||||
<!-- TODO: Somehow try to identify whether this is the last element in the gallery -->
|
||||
<a href="#{{ $nextid }}" class="snap-lightbox-next"><i class="snap-lightbox-arrow"></i></a>
|
||||
{{- end }}
|
||||
</div>
|
||||
{{- end -}}
|
||||
</div>
|
||||
</figure>
|
||||
|
||||
Reference in New Issue
Block a user