mirror of
https://github.com/hugo-fixit/FixIt.git
synced 2026-08-24 15:28:57 +00:00
feat(link): add external link guard feature support (#729)
* feat(external-link-guard): add native redirect mode and improve external-link guard UX * fix(external-link-guard): remove redirect_url and clarify scope/new_tab_policy docs * i18n(external-link-guard): localize guard texts across non-English locales * feat(config)!: migrate `site.Params.externalIcon` to `site.Params.link.external_icon` * refactor: implement regular and card link rendering * feat(link-guard): implement link redirection page with copy and confirm functionality * revert * feat: implement link guard dialog for external links --------- Co-authored-by: Cell <1024@lruihao.cn>
This commit is contained in:
@@ -33,7 +33,7 @@
|
||||
{{- $icon := dict "Class" "fa-solid fa-share" -}}
|
||||
{{- $iconTitle := cond (hasPrefix .Url "http") (printf "%v -> %v" (T "single.repost") .Url ) (T "single.repost") -}}
|
||||
{{- if hasPrefix .Url "http" -}}
|
||||
{{ dict "Destination" .Url "Icon" $icon "Class" "icon-repost" "Title" $iconTitle | partial "plugin/link.html" -}}
|
||||
{{ dict "Destination" .Url "Icon" $icon "Class" "icon-repost" "Title" $iconTitle "ExternalIcon" false | partial "plugin/link.html" -}}
|
||||
{{- else -}}
|
||||
<span title="{{ $iconTitle }}" class="icon-repost">{{- $icon | partial "plugin/icon.html" -}}</span>
|
||||
{{- end -}}
|
||||
@@ -238,6 +238,7 @@
|
||||
</aside>
|
||||
|
||||
{{- /* TOC Dialog */ -}}
|
||||
{{- /* [todo] move to widgets.html */ -}}
|
||||
{{- if $showToc -}}
|
||||
<dialog id="toc-dialog" aria-labelledby="toc-dialog-title" role="dialog">
|
||||
<div class="toc">
|
||||
|
||||
Reference in New Issue
Block a user