Affichage des liens morts
This commit is contained in:
@@ -64,7 +64,7 @@ h3 {
|
||||
font-size: clamp(1.05rem, 1.7vw, 1.35rem);
|
||||
}
|
||||
|
||||
main > article :is(strong, b) {
|
||||
main > article > :not(footer.article-footer) :is(strong, b) {
|
||||
font-weight: 800;
|
||||
color: var(--color-heading);
|
||||
text-shadow: none;
|
||||
@@ -130,6 +130,31 @@ a.link-affiliated:is(:hover, :focus-visible) {
|
||||
color: var(--color-link-affiliated-hover);
|
||||
}
|
||||
|
||||
a.link-dead {
|
||||
text-decoration-line: underline;
|
||||
text-decoration-style: wavy;
|
||||
text-decoration-thickness: 1px;
|
||||
text-decoration-color: color-mix(in srgb, currentColor 72%, transparent);
|
||||
text-underline-offset: 0.2em;
|
||||
}
|
||||
|
||||
a.link-dead:is(:hover, :focus-visible) {
|
||||
text-decoration-line: underline;
|
||||
text-decoration-style: wavy;
|
||||
text-decoration-thickness: 2px;
|
||||
text-decoration-color: currentColor;
|
||||
}
|
||||
|
||||
a.link-dead.link-dead-404 {
|
||||
color: var(--color-link-dead-404);
|
||||
text-decoration-color: color-mix(in srgb, var(--color-link-dead-404) 78%, transparent);
|
||||
}
|
||||
|
||||
a.link-dead.link-dead-404:is(:hover, :focus-visible) {
|
||||
color: var(--color-link-dead-404-hover);
|
||||
text-decoration-color: currentColor;
|
||||
}
|
||||
|
||||
img,
|
||||
video,
|
||||
audio,
|
||||
|
||||
@@ -15,6 +15,8 @@
|
||||
--color-link-external-hover: #9ef7d6;
|
||||
--color-link-affiliated: #e792ff;
|
||||
--color-link-affiliated-hover: #f3b8ff;
|
||||
--color-link-dead-404: #ff9fb3;
|
||||
--color-link-dead-404-hover: #ffd4df;
|
||||
--color-accent-1: #76a7d7;
|
||||
--color-accent-2: #5d86ad;
|
||||
--color-accent-3: #c3d0df;
|
||||
|
||||
@@ -62,6 +62,19 @@
|
||||
{{- $deadInfo = index . 0 -}}
|
||||
{{- $isDeadLink = true -}}
|
||||
{{- end -}}
|
||||
{{- $deadStatus := "" -}}
|
||||
{{- with (index $deadInfo "status") -}}
|
||||
{{- $deadStatus = printf "%v" . -}}
|
||||
{{- end -}}
|
||||
{{- if eq $deadStatus "" -}}
|
||||
{{- with (index $cacheEntry "status") -}}
|
||||
{{- $deadStatus = printf "%v" . -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- $isConfirmedDeadLink := false -}}
|
||||
{{- if and $isDeadLink (eq $deadStatus "404") -}}
|
||||
{{- $isConfirmedDeadLink = true -}}
|
||||
{{- end -}}
|
||||
|
||||
{{- $titleParts := slice -}}
|
||||
{{- if $isAffiliated -}}
|
||||
@@ -104,6 +117,12 @@
|
||||
{{- if $isAffiliated -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-affiliated" -}}
|
||||
{{- end -}}
|
||||
{{- if $isDeadLink -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-dead" -}}
|
||||
{{- if $isConfirmedDeadLink -}}
|
||||
{{- $linkClasses = $linkClasses | append "link-dead-404" -}}
|
||||
{{- end -}}
|
||||
{{- end -}}
|
||||
{{- with $customClass -}}
|
||||
{{- range (split . " ") -}}
|
||||
{{- if ne . "" -}}
|
||||
|
||||
Reference in New Issue
Block a user