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