mirror of
https://github.com/gcushen/hugo-academic.git
synced 2025-07-26 19:15:16 +02:00
feat(widget): allow to constrain Portfolio by set of tags
This commit is contained in:
parent
9872428a3f
commit
b0ffb4ddc7
1 changed files with 9 additions and 1 deletions
|
@ -47,7 +47,15 @@
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
|
||||||
<div class="{{ if or $st.Params.content.filter_button (eq $st.Params.design.view 3) }}isotope projects-container{{end}} {{if eq $st.Params.design.view 3}}js-layout-masonry{{else}}row js-layout-row{{end}} {{ if eq $st.Params.design.view 5 }}project-showcase mt-5{{end}}">
|
<div class="{{ if or $st.Params.content.filter_button (eq $st.Params.design.view 3) }}isotope projects-container{{end}} {{if eq $st.Params.design.view 3}}js-layout-masonry{{else}}row js-layout-row{{end}} {{ if eq $st.Params.design.view 5 }}project-showcase mt-5{{end}}">
|
||||||
{{ range $idx, $item := where site.RegularPages "Type" $items_type }}
|
|
||||||
|
{{ $query := "" }}
|
||||||
|
{{ if $st.Params.content.filters.tags }}
|
||||||
|
{{ $query = where site.Pages "Params.tags" "intersect" $st.Params.content.filters.tags }}
|
||||||
|
{{ else }}
|
||||||
|
{{ $query = where site.RegularPages "Type" $items_type }}
|
||||||
|
{{ end }}
|
||||||
|
|
||||||
|
{{ range $idx, $item := $query }}
|
||||||
|
|
||||||
{{ $link := $item.RelPermalink }}
|
{{ $link := $item.RelPermalink }}
|
||||||
{{ $target := "" }}
|
{{ $target := "" }}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue