{{ define "main" }}

{{ .Title }}

{{ .Description }}

{{ if .Site.Params.show_post_dates | default true }} {{- with .Date }}{{ end }} {{ end }} {{ partial "tags.html" . }}
{{- if or .Params.image .Params.featured }} {{- $maxHeight := 600 -}} {{- $ratio := 2.33 -}} {{ $rasters := slice "jpeg" "png" }} {{- $img := "#" -}} {{- if .Params.image -}} {{/* se è stata definita un'immagine featured */}} {{- $img = .Page.Resources.GetMatch .Params.image -}} {{- end -}} {{- if .Params.featured -}} {{/* se è stata definita un'immagine featured */}} {{- $img = .Page.Resources.GetMatch .Params.featured -}} {{- end -}}
{{- if in $rasters $img.MediaType.SubType -}} {{- if gt $img.Height $maxHeight -}} {{- $img = $img.Resize (printf "x%d webp q50" $maxHeight) -}} {{- end -}} {{ .Params.image_alt }} {{ else }} {{ .Params.image_alt }} {{- end -}} {{- with .Params.image_caption -}}
{{- . | markdownify -}}
{{- end -}}
{{ end }} {{- .Content }} {{ if (findRE " function addCopyButtons(clipboard) { document.querySelectorAll('pre > code').forEach(function (codeBlock) { var button = document.createElement('button'); button.className = 'copy-code-button'; button.type = 'button'; button.innerText = 'Copy'; button.addEventListener('click', function () { clipboard.writeText(codeBlock.innerText).then(function () { /* Chrome doesn't seem to blur automatically, leaving the button in a focused state. */ button.blur(); button.innerText = 'Copied!'; setTimeout(function () { button.innerText = 'Copy'; }, 2000); }, function (error) { button.innerText = 'Error'; }); }); var pre = codeBlock.parentNode; if (pre.parentNode.classList.contains('highlight')) { var highlight = pre.parentNode; highlight.parentNode.insertBefore(button, highlight); } else { pre.parentNode.insertBefore(button, pre); } }); } if (navigator && navigator.clipboard) { addCopyButtons(navigator.clipboard); } {{ end }} {{ end }}