Fix pagine e link

This commit is contained in:
2024-12-18 00:41:21 +01:00
parent 0cd1818488
commit 994ead84fd
2 changed files with 14 additions and 13 deletions

View File

@@ -1,7 +1 @@
<a href="{{ .Destination | safeURL }}"
{{ with .Title}} title="{{ . }}"{{ end }}
{{ if strings.HasPrefix .Destination "http" }}
target="_blank" rel="noopener noreferrer"
{{ end }}>
{{ .Text | safeHTML }}
</a>
<a href="{{ .Destination | safeURL }}"{{ with .Title}} title="{{ . }}"{{ end }} {{ if strings.HasPrefix .Destination "http" }} target="_blank" rel="noopener noreferrer" {{ end }}>{{ .Text | safeHTML }}</a>

View File

@@ -36,13 +36,20 @@
<div>
{{ with .Resources.GetMatch (index (.Params.images) 0) }}
{{ $image := . }}
{{ $image := $image.Crop "1280x250" }}
<img src="{{ $image.RelPermalink }}">
{{ end }}
{{ $image := . }}
{{ $image_cropped := .Crop "1280x250" }}
{{ .TableOfContents }}
{{ .Content | safeHTML }}
{{ if $.Page.Params.fullcover }}
<img src="{{ $image.RelPermalink }}">
{{ else }}
<img src="{{ $image_cropped.RelPermalink }}">
{{ end }}
{{ end }}
{{ if not .Params.IgnoreTableOfContents }}
{{ .TableOfContents }}
{{ end }}
{{ .Content | safeHTML }}
</div>
{{ partial "socialshare.html" . }}