Added support for lightbox
This commit is contained in:
parent
0288cb23cf
commit
b0bd121fff
2 changed files with 24 additions and 0 deletions
23
themes/lean/layouts/shortcodes/lightbox.html
Normal file
23
themes/lean/layouts/shortcodes/lightbox.html
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
<!-- lighbox -->
|
||||
{{ $group := .Get "group" }}
|
||||
{{ $images := .Get "images" }}
|
||||
{{ $width := .Get "width" }}
|
||||
|
||||
{{ with index .screenshots}}
|
||||
{{ range sort . "title" }}
|
||||
{{ if (fileExists (printf "assets/%s" .image)) -}}
|
||||
<div class="responsive">
|
||||
<div class="gallery">
|
||||
{{ $mainimage := resources.Get .image }}
|
||||
<a data-fslightbox="{{ $group }}" href="{{ $mainimage.RelPermalink }}">
|
||||
{{ $mainimage := $mainimage.Resize $width }}
|
||||
<img class="{{ $group }}" src="{{ $mainimage.RelPermalink }}"
|
||||
width="{{ $mainimage.Width }}" height="{{ $mainimage.Height }}">
|
||||
<div class="desc">{{ .title }}</div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
{{ end }}
|
||||
<div class="clearfix" style="margin-bottom: 20px;"></div>
|
||||
1
themes/lean/static/js/fslightbox.js
Normal file
1
themes/lean/static/js/fslightbox.js
Normal file
File diff suppressed because one or more lines are too long
Loading…
Add table
Reference in a new issue