mirror of
https://github.com/Wonderfall/hugo-WonderMod.git
synced 2024-10-01 01:06:14 -04:00
Remove target="_blank" from links
This commit is contained in:
parent
ddaf94cd3d
commit
8c40461fc6
@ -6,7 +6,7 @@
|
||||
{{- $addLink := (and site.Params.cover.linkFullImages (not $.IsHome)) }}
|
||||
{{- $cover := (.Resources.ByType "image").GetMatch (printf "*%s*" (.Params.cover.image)) }}
|
||||
{{- if $cover -}}{{/* i.e it is present in page bundle */}}
|
||||
{{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" target="_blank"
|
||||
{{- if $addLink }}<a href="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}"
|
||||
rel="noopener noreferrer">{{ end -}}
|
||||
{{- $sizes := (slice "360" "480" "720" "1080" "1500") }}
|
||||
{{- $processableFormats := (slice "jpg" "jpeg" "png" "tif" "bmp" "gif") -}}
|
||||
@ -26,7 +26,7 @@
|
||||
<img loading="lazy" src="{{ (path.Join .RelPermalink .Params.cover.image) | absURL }}" alt="{{ $alt }}">
|
||||
{{- end }}
|
||||
{{- else }}{{/* For absolute urls and external links, no img processing here */}}
|
||||
{{- if $addLink }}<a href="{{ (.Params.cover.image) | absURL }}" target="_blank"
|
||||
{{- if $addLink }}<a href="{{ (.Params.cover.image) | absURL }}"
|
||||
rel="noopener noreferrer">{{ end -}}
|
||||
<img loading="lazy" src="{{ (.Params.cover.image) | absURL }}" alt="{{ $alt }}">
|
||||
{{- end }}
|
||||
|
@ -2,7 +2,7 @@
|
||||
{{- $fileUrlPath := path.Join .File.Path }}
|
||||
|
||||
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated }} | {{- end -}}
|
||||
<a href="{{ .Params.editPost.URL | default site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer" target="_blank">
|
||||
<a href="{{ .Params.editPost.URL | default site.Params.editPost.URL }}{{ if .Params.editPost.appendFilePath | default ( site.Params.editPost.appendFilePath | default false ) }}/{{ $fileUrlPath }}{{ end }}" rel="noopener noreferrer">
|
||||
{{- .Params.editPost.Text | default (site.Params.editPost.Text | default (i18n "edit_post" | default "Edit")) -}}
|
||||
</a>
|
||||
{{- end }}
|
||||
|
@ -7,8 +7,8 @@
|
||||
{{- end }}
|
||||
<span>
|
||||
- Powered by
|
||||
<a href="https://gohugo.io/" rel="noopener noreferrer" target="_blank">Hugo</a> &
|
||||
<a href="https://github.com/Wonderfall/hugo-WonderMod/" rel="noopener" target="_blank">WonderMod</a>
|
||||
<a href="https://gohugo.io/" rel="noopener noreferrer">Hugo</a> &
|
||||
<a href="https://github.com/Wonderfall/hugo-WonderMod/" rel="noopener">WonderMod</a>
|
||||
</span>
|
||||
</footer>
|
||||
{{- end }}
|
||||
@ -23,4 +23,4 @@
|
||||
|
||||
{{- partial "extend_footer.html" . }}
|
||||
|
||||
{{- partial "script.html" . }}
|
||||
{{- partial "script.html" . }}
|
||||
|
@ -4,6 +4,6 @@
|
||||
{{- if or .Params.author site.Params.author (.Param "ShowReadingTime") (not .Date.IsZero) .IsTranslated (or .Params.editPost.URL site.Params.editPost.URL) }} | {{- end -}}
|
||||
<span>
|
||||
{{- (site.Params.CanonicalLinkText | default .Params.CanonicalLinkText) | default "Originally published at" -}}
|
||||
<a href="{{ trim .Params.canonicalURL " " }}" title="{{ trim .Params.canonicalURL " " }}" target="_blank" rel="noopener noreferrer">{{ $url.Host }}</a>
|
||||
<a href="{{ trim .Params.canonicalURL " " }}" title="{{ trim .Params.canonicalURL " " }}" rel="noopener noreferrer">{{ $url.Host }}</a>
|
||||
</span>
|
||||
{{- end }}
|
||||
|
@ -15,7 +15,7 @@
|
||||
|
||||
<div class="share-buttons">
|
||||
{{- if (cond ($custom) (in $ShareButtons "twitter") (true)) }}
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on twitter"
|
||||
<a rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on twitter"
|
||||
href="https://twitter.com/intent/tweet/?text={{ $title }}&url={{ $pageurl }}&hashtags={{- $.Scratch.Get "tags" -}}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve" height="30px" width="30px" fill="currentColor">
|
||||
<path
|
||||
@ -24,7 +24,7 @@
|
||||
</a>
|
||||
{{- end }}
|
||||
{{- if (cond ($custom) (in $ShareButtons "linkedin") (true)) }}
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on linkedin"
|
||||
<a rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on linkedin"
|
||||
href="https://www.linkedin.com/shareArticle?mini=true&url={{ $pageurl }}&title={{ $title }}&summary={{ $title }}&source={{ $pageurl }}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve" height="30px" width="30px" fill="currentColor">
|
||||
<path
|
||||
@ -33,7 +33,7 @@
|
||||
</a>
|
||||
{{- end }}
|
||||
{{- if (cond ($custom) (in $ShareButtons "reddit") (true)) }}
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on reddit"
|
||||
<a rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on reddit"
|
||||
href="https://reddit.com/submit?url={{ $pageurl }}&title={{ $title }}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve" height="30px" width="30px" fill="currentColor">
|
||||
<path
|
||||
@ -42,7 +42,7 @@
|
||||
</a>
|
||||
{{- end }}
|
||||
{{- if (cond ($custom) (in $ShareButtons "facebook") (true)) }}
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on facebook"
|
||||
<a rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on facebook"
|
||||
href="https://facebook.com/sharer/sharer.php?u={{ $pageurl }}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve" height="30px" width="30px" fill="currentColor">
|
||||
<path
|
||||
@ -51,7 +51,7 @@
|
||||
</a>
|
||||
{{- end }}
|
||||
{{- if (cond ($custom) (in $ShareButtons "whatsapp") (true)) }}
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on whatsapp"
|
||||
<a rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on whatsapp"
|
||||
href="https://api.whatsapp.com/send?text={{ $title }}%20-%20{{ $pageurl }}">
|
||||
<svg version="1.1" viewBox="0 0 512 512" xml:space="preserve" height="30px" width="30px" fill="currentColor">
|
||||
<path
|
||||
@ -60,7 +60,7 @@
|
||||
</a>
|
||||
{{- end }}
|
||||
{{- if (cond ($custom) (in $ShareButtons "telegram") (true)) }}
|
||||
<a target="_blank" rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on telegram"
|
||||
<a rel="noopener noreferrer" aria-label="share {{ $title | plainify }} on telegram"
|
||||
href="https://telegram.me/share/url?text={{ $title }}&url={{ $pageurl }}">
|
||||
<svg version="1.1" xml:space="preserve" viewBox="2 2 28 28" height="30px" width="30px" fill="currentColor">
|
||||
<path
|
||||
@ -68,4 +68,4 @@
|
||||
</svg>
|
||||
</a>
|
||||
{{- end }}
|
||||
</div>
|
||||
</div>
|
||||
|
@ -1,6 +1,6 @@
|
||||
<div class="social-icons">
|
||||
{{- range . }}
|
||||
<a href="{{ trim .url " " }}" target="_blank" rel="noopener noreferrer me" title="{{ (.title | default .name) | title }}">
|
||||
<a href="{{ trim .url " " }}" rel="noopener noreferrer me" title="{{ (.title | default .name) | title }}">
|
||||
{{ partial "svg.html" . }}
|
||||
</a>
|
||||
{{- end }}
|
||||
|
Loading…
Reference in New Issue
Block a user