{{ define "main" }} {{ $.Scratch.Set "counter" 0 }} {{ with .Params.project.title }}

{{ . }}

{{ end }}
{{ .Content }}
{{ with .Params.project }} {{ with .title }}

Project: {{ . }}

{{ end }} {{ with .description }}

{{ . }}

{{ end }}

Taken

{{ with .tasks }} {{ range . }} {{ $.Scratch.Set "counter" (add ($.Scratch.Get "counter") 1) }} {{ with .name }}

{{$.Scratch.Get "counter"}}. {{ . }}

{{ end }}
{{ with .description }}
{{ . }}
{{ end }} {{ with .goal }}

Doel: {{ . }}

{{ end }} {{ with .comment }}

{{ . }}

{{ end }} {{ if .finished }}

✔️ Afgerond{{ with .link }}, zie {{ .name }}{{ end }}

{{ else }}

🛠️ Nog af te ronden

{{ end }} {{ $.Scratch.Set "counter2" 0 }} {{ with .subtasks }} {{ range . }} {{ $.Scratch.Set "counter2" (add ($.Scratch.Get "counter2") 1) }}

{{ $.Scratch.Get "counter" }}.{{ $.Scratch.Get "counter2" }}. {{ .name }}

{{ with .description }}
{{ . }}
{{ end }} {{ with .comment }}

{{ . }}

{{ end }} {{ if .finished }}

✔️ Subtaak afgerond{{ with .link }}, zie {{ .name }}{{ end }}

{{ else }}

🛠️ Subtaak wordt nog aan gewerkt

{{ end }} {{ end }} {{ end }}
{{ end }} {{ end }} {{ else }}

Waarschuwing: dit project is niet goed geconfigureerd in de front matter.

{{ end }} {{ end }}