{{ define "content" }} {{ $column_count := 2 }} {{ $project_count := len .Params.projects }} {{ $contribution_count := len .Params.contributions }}

Projects


{{ range $i := (seq 0 $column_count $project_count) }}
{{ $projects_in_row := first $column_count (after $i $.Params.projects) }} {{ range $projects_in_row }}
{{ .name }}
{{ with .image }} {{ $type := .type|default "picture" }} {{ if (eq $type "picture") }}
{{ .alt }}
{{ else if (eq $type "picture-padded") }}
{{ .alt }}
{{ end }} {{ end }}
{{ with .icon }}
{{ .alt }}
{{ end }}
{{ range .description }}

{{ .|markdownify}}

{{ end }}
{{ range .tags }}
{{ $color := "" }} {{ if eq .type "language" }} {{ $color = "info" }} {{ else if eq .type "tech" }} {{ $color = "success" }} {{ else }} {{ errorf "Unknown tag type \"%s\"" .type }} {{ end }} {{ .type }} {{ .value|title }}
{{ end }}
{{ end }} {{/* Pad the last row with empty space */}} {{ if (lt (len $projects_in_row) $column_count) }} {{ range (seq 1 (sub $column_count (len $projects_in_row))) }}
{{ end }} {{ end }}
{{ end }}

Contributions


{{ range $i := (seq 0 $column_count $contribution_count) }}
{{ $contributions_in_row := first $column_count (after $i $.Params.contributions) }} {{ range $contributions_in_row }}
{{ .name }}
{{ with .image }} {{ $type := .type|default "picture" }} {{ if (eq $type "picture") }}
{{ .alt }}
{{ end }} {{ end }}
{{ with .icon }}
{{ .alt }}
{{ end }}
{{ if eq (len .changes) 1 }}

{{ markdownify (index .changes 0) }}

{{ else }}
    {{ range .changes }}
  • {{ markdownify . }}
  • {{ end }}
{{ end }}
{{ range .tags }}
{{ $color := "" }} {{ if eq .type "language" }} {{ $color = "info" }} {{ else if eq .type "tech" }} {{ $color = "success" }} {{ else }} {{ errorf "Unknown tag type \"%s\"" .type }} {{ end }} {{ .type }} {{ .value|title }}
{{ end }}
{{ end }} {{/* Pad the last row with empty space */}} {{ if (lt (len $contributions_in_row) $column_count) }} {{ range (seq 1 (sub $column_count (len $contributions_in_row))) }}
{{ end }} {{ end }}
{{ end }}
{{ end }}