FEATURE: picure caption test
This commit is contained in:
parent
b7f992bebb
commit
6cc5bb33a1
2 changed files with 10 additions and 2 deletions
layouts/partials
|
@ -1,17 +1,20 @@
|
|||
<!-- START -->
|
||||
{{ $caption := .other }}
|
||||
|
||||
{{ $num_per_row := 3}}
|
||||
{{ $max_width := 80}}
|
||||
{{ if or (eq (len .pic_set) 2) (eq (len .pic_set) 4)}}
|
||||
{{ $num_per_row = 2}}
|
||||
{{ $max_width = 53}}
|
||||
{{ end }}
|
||||
|
||||
<div class="pic-grid" style="width: {{ $max_width }}%">
|
||||
<div class="pure-g">
|
||||
{{ range $num, $a := .pic_set }}
|
||||
<div class="pure-u-1-{{ $num_per_row }}">
|
||||
<div class="add-padding">
|
||||
<div class="img-container">
|
||||
<a data-src="{{ $a }}" data-fancybox="gallery">
|
||||
<a data-src="{{ $a }}" data-fancybox="gallery" data-caption="{{ $caption }}">
|
||||
<img src="{{ $a }}" alt="pictures"/>
|
||||
</a>
|
||||
</div>
|
||||
|
|
|
@ -93,8 +93,13 @@
|
|||
{{ end }}
|
||||
{{ end }}
|
||||
|
||||
{{ $test := "test" }}
|
||||
{{ if (gt (len $pictures_set) 1)}}
|
||||
{{ partial "pic_set.html" (dict "pic_set" $pictures_set) }}
|
||||
{{/* partial "pic_set.html" (dict "pic_set" $pictures_set "other" $.Site.BaseURL) */}}
|
||||
{{ partial "pic_set.html" (dict "pic_set" $pictures_set "other" $.Site.BaseURL) }}
|
||||
{{ $test }}
|
||||
{{ partial "pic_set.html" (dict "pic_set" $pictures_set "other" $.Site.BaseURL) }}
|
||||
{{/* partial "pic_set.html" $pictures_set "other" */}}
|
||||
{{ end }}
|
||||
|
||||
<!-- add-on info 2: link -->
|
||||
|
|
Loading…
Add table
Reference in a new issue