{{/* Portfolio Widget */}} {{/* Initialise */}} {{ $ := .root }} {{ $st := .page }} {{ $items_type := $st.Params.content.page_type | default "project" }} {{ $columns := $st.Params.design.columns | default "2" }} {{ if ne $columns "1" }} {{/* Standard dual-column layout. */}}
{{ . | markdownify | emojify }}
{{ end }}{{ . | markdownify | emojify }}
{{ end }}{{ . }}
{{ end }} {{ if $st.Params.content.filter_button }} {{ $filter_default := default (int $st.Params.content.filter_default) 0 }} {{/* Parse default filter tag from front matter in the form of either tag name or CSS class name. */}} {{ $default_filter_tag_raw := (index $st.Params.content.filter_button ($filter_default)).tag }} {{ $default_filter_tag := printf ".js-id-%s" (replace $default_filter_tag_raw " " "-") }} {{ if or (eq (substr $default_filter_tag_raw 0 1) "*") (eq (substr $default_filter_tag_raw 0 1) ".") }} {{ $default_filter_tag = $default_filter_tag_raw }} {{ end }} {{ $default_filter_tag }} {{/* Only show filter buttons if there are multiple filters. */}} {{ if gt (len $st.Params.content.filter_button) 1 }} {{ end }} {{ end }}