{{- /* {{< pdf "satzung.pdf" "Unsere Satzung" >}} — links a file in static/dokumente/. */ -}}
{{- $file := .Get 0 -}}
{{- $label := or (.Get 1) $file -}}
{{- $path := printf "static/dokumente/%s" $file -}}
{{- $size := "" -}}
{{- with (os.Stat $path) -}}
  {{- $size = printf "%.1f MB" (div (float .Size) 1048576.0) -}}
{{- else -}}
  {{- warnf "pdf shortcode: %s not found" $path -}}
{{- end -}}
<a class="pdf-link" href="{{ printf "/dokumente/%s" $file | relURL }}" download>
  <span class="pdf-icon" aria-hidden="true">PDF</span>
  <span class="pdf-label">{{ $label }}</span>
  {{ with $size }}<span class="pdf-size">{{ . }}</span>{{ end }}
</a>
