Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Collapse equally named categories in work
  • Loading branch information
maitesin committed Oct 29, 2018
1 parent 1468ebe commit e84668e
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions layouts/partials/work.html
Expand Up @@ -8,9 +8,13 @@
<div class="block">
<div class="portfolio-menu">
<ul>
<li class="filter" data-filter="all">Everything</li>
{{ $categories := slice }}
{{ range .Site.Data.work.portfolio }}
<li class="filter" data-filter=".{{ .category }}">{{ .category }}</li>
{{ $categories = $categories | append .category }}
{{ end }}
<li class="filter" data-filter="all">Everything</li>
{{ range ( $categories | uniq ) }}
<li class="filter" data-filter=".{{ . }}">{{ . }}</li>
{{ end }}
</ul>
</div>
Expand Down Expand Up @@ -60,4 +64,4 @@ <h2>{{ .name }}</h2>

{{ if isset .Site.Data.work "call" }}
{{ partial "call-to-action.html" .Site.Data.work.call }}
{{ end}}
{{ end}}

0 comments on commit e84668e

Please sign in to comment.