{{ $project := .project }} {{ $heading := .heading | default "h2" }} {{- $direction := "" -}} {{ $index := .index}} {{ $heading_tag := (dict "open" ((printf "<%s class='project-title' itemprop='name'>" $heading) | safeHTML) "close" ((printf "" $heading) | safeHTML) ) }} {{ $alternate := .alternate | default false }} {{ $options := .options | default site.Params.projects.index.options }} {{ with $project }} {{ if .Params.image }} {{- $direction = partial "GetImageDirection" .Params.image -}} {{ end }}
{{- $title := partial "PrepareHTML" .Title -}} {{ $heading_tag.open }} {{ $heading_tag.close }} {{ if and $options.summary (partial "GetTextFromHTML" .Params.summary) }}

{{ partial "GetTruncateContent" ( dict "text" .Params.summary "length" site.Params.projects.index.truncate_description ) }}

{{ end }} {{ if $options.categories }} {{ partial "commons/categories" ( dict "context" . "kind" "project" )}} {{ end }}
{{ if and $options.year .Params.year }}
{{ end }}
{{- if .Params.image -}} {{- partial "commons/image.html" (dict "image" .Params.image "sizes" site.Params.image_sizes.sections.projects.item ) -}} {{- else -}} {{- partial "commons/image-default.html" "projects" -}} {{- end -}}
{{ end }}