diff options
author | somrat <monnaf37@gmail.com> | 2020-04-20 09:46:08 +0300 |
---|---|---|
committer | somrat <monnaf37@gmail.com> | 2020-04-20 09:46:08 +0300 |
commit | 28347f00df499865c679fc0844ba51cbc517f288 (patch) | |
tree | 1e0470df2b3988193b1ba52a78ef610ab3b4c9e0 /layouts | |
parent | 14dec3e16903c119cef899a1e8f78790b23c312d (diff) |
modified portfolio
Diffstat (limited to 'layouts')
-rw-r--r-- | layouts/portfolio/list.html | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/layouts/portfolio/list.html b/layouts/portfolio/list.html index 2f5cfa3..e08d4e0 100644 --- a/layouts/portfolio/list.html +++ b/layouts/portfolio/list.html @@ -11,11 +11,13 @@ <label class="btn btn-sm btn-primary active"> <input type="radio" name="shuffle-filter" value="all" checked="checked" />All </label> - {{ $categories := slice }} - {{ range .Site.Data.portfolio.item }} - {{ $categories = $categories | append .category }} - {{ end }} - {{ range ( $categories | uniq ) }} + {{ $categories := slice }} + {{ range .Site.Data.portfolio.item }} + {{ range .categories }} + {{ $categories = $categories | append . }} + {{ end }} + {{ end }} + {{ range ( $categories | uniq ) }} <label class="btn btn-sm btn-primary"> <input type="radio" name="shuffle-filter" value="{{ . | urlize }}" />{{ . | humanize }} </label> @@ -25,7 +27,7 @@ </div> <div class="row shuffle-wrapper"> {{ range .Site.Data.portfolio.item }} - <div class="col-lg-4 col-6 mb-4 shuffle-item" data-groups="["{{.category | urlize}}"]"> + <div class="col-lg-4 col-6 mb-4 shuffle-item" data-groups="[{{range $index, $element:= .categories }}{{if ne $index 0}},{{end}}"{{. | urlize}}"{{ end }}]"> <div class="position-relative rounded hover-wrapper"> <img src="{{.image | absURL }}" alt="portfolio-image" class="img-fluid rounded w-100 d-block"> {{ if and ( ne .project_url "" ) ( ne .project_url "#" ) }} |