Amélioration de l'affichage
This commit is contained in:
@@ -44,6 +44,7 @@ article.article-body {
|
|||||||
margin: auto;
|
margin: auto;
|
||||||
line-height: 150%;
|
line-height: 150%;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
|
hyphens: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
>details {
|
>details {
|
||||||
@@ -129,6 +130,7 @@ article.article-body {
|
|||||||
color: var(--color-text-light);
|
color: var(--color-text-light);
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
text-align: justify;
|
text-align: justify;
|
||||||
|
hyphens: auto;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
|
|
||||||
cite {
|
cite {
|
||||||
@@ -196,4 +198,4 @@ article.article-body {
|
|||||||
sub {
|
sub {
|
||||||
bottom: -0.2em;
|
bottom: -0.2em;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -37,6 +37,10 @@ figure {
|
|||||||
text-wrap: balance;
|
text-wrap: balance;
|
||||||
margin: auto;
|
margin: auto;
|
||||||
line-height: 150%;
|
line-height: 150%;
|
||||||
|
|
||||||
|
summary {
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
audio {
|
audio {
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
a {
|
a {
|
||||||
color: var(--color-link);
|
color: var(--color-link);
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
display: inline-block;
|
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
word-break: break-word;
|
word-break: break-word;
|
||||||
@@ -11,4 +10,4 @@ a {
|
|||||||
&:focus {
|
&:focus {
|
||||||
color: var(--color-link-hover);
|
color: var(--color-link-hover);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
{{- partial "render/link.html" . -}}
|
{{- partial "render/link.html" . -}}
|
||||||
@@ -26,7 +26,7 @@
|
|||||||
{{- if $data.prompt }}
|
{{- if $data.prompt }}
|
||||||
<details>
|
<details>
|
||||||
<summary>
|
<summary>
|
||||||
<strong>Attribution : {{- with $data.attribution }}<em>{{ . | markdownify }}</em>{{- end }}</strong>
|
<strong>Attribution : {{- with $data.attribution }} <em>{{ . | markdownify }}</em>{{- end }}</strong>
|
||||||
</summary>
|
</summary>
|
||||||
<p><strong>Prompt :</strong> <em>{{ $data.prompt }}</em></p>
|
<p><strong>Prompt :</strong> <em>{{ $data.prompt }}</em></p>
|
||||||
</details>
|
</details>
|
||||||
|
|||||||
@@ -14,72 +14,68 @@
|
|||||||
{{- $deadInfo := dict -}}
|
{{- $deadInfo := dict -}}
|
||||||
{{- $isDeadLink := false -}}
|
{{- $isDeadLink := false -}}
|
||||||
{{- with (first 1 (where $deadList "url" .Destination)) -}}
|
{{- with (first 1 (where $deadList "url" .Destination)) -}}
|
||||||
{{- $deadInfo = index . 0 -}}
|
{{- $deadInfo = index . 0 -}}
|
||||||
{{- $isDeadLink = true -}}
|
{{- $isDeadLink = true -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $newURL := .Destination -}}
|
{{- $newURL := .Destination -}}
|
||||||
{{- if and $isExternal $aff -}}
|
{{- if and $isExternal $aff -}}
|
||||||
{{- $param := $aff.param -}}
|
{{- $param := $aff.param -}}
|
||||||
{{- $value := $aff.value -}}
|
{{- $value := $aff.value -}}
|
||||||
{{- $isAffiliated = true -}}
|
{{- $isAffiliated = true -}}
|
||||||
{{- if $query -}}
|
{{- if $query -}}
|
||||||
{{- $newURL = printf "%s://%s%s?%s&%s=%s" $parsed.Scheme $host $path $query $param $value -}}
|
{{- $newURL = printf "%s://%s%s?%s&%s=%s" $parsed.Scheme $host $path $query $param $value -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $newURL = printf "%s://%s%s?%s=%s" $parsed.Scheme $host $path $param $value -}}
|
{{- $newURL = printf "%s://%s%s?%s=%s" $parsed.Scheme $host $path $param $value -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $titlePrefix := cond $isAffiliated "Lien affilié" (cond $isExternal "Lien externe" "") -}}
|
{{- $titlePrefix := cond $isAffiliated "Lien affilié" (cond $isExternal "Lien externe" "") -}}
|
||||||
{{- $classes := slice -}}
|
{{- $classes := slice -}}
|
||||||
{{- if $isExternal -}}
|
{{- if $isExternal -}}
|
||||||
{{- $classes = $classes | append "external" -}}
|
{{- $classes = $classes | append "external" -}}
|
||||||
{{- if $isAffiliated -}}
|
{{- if $isAffiliated -}}
|
||||||
{{- $classes = $classes | append "affiliated" -}}
|
{{- $classes = $classes | append "affiliated" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $isDeadLink -}}
|
{{- if $isDeadLink -}}
|
||||||
{{- $statusRaw := index $deadInfo "status" -}}
|
{{- $statusRaw := index $deadInfo "status" -}}
|
||||||
{{- $statusCode := "" -}}
|
{{- $statusCode := "" -}}
|
||||||
{{- with $statusRaw -}}
|
{{- with $statusRaw -}}
|
||||||
{{- $statusCode = printf "%v" . -}}
|
{{- $statusCode = printf "%v" . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if eq $statusCode "404" -}}
|
{{- if eq $statusCode "404" -}}
|
||||||
{{- $classes = $classes | append "dead" -}}
|
{{- $classes = $classes | append "dead" -}}
|
||||||
{{- else if gt (len $statusCode) 0 -}}
|
{{- else if gt (len $statusCode) 0 -}}
|
||||||
{{- $classes = $classes | append "problematic" -}}
|
{{- $classes = $classes | append "problematic" -}}
|
||||||
{{- else -}}
|
{{- else -}}
|
||||||
{{- $classes = $classes | append "dead" -}}
|
{{- $classes = $classes | append "dead" -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $titleParts := slice -}}
|
{{- $titleParts := slice -}}
|
||||||
{{- with $titlePrefix -}}
|
{{- with $titlePrefix -}}
|
||||||
{{- $titleParts = $titleParts | append . -}}
|
{{- $titleParts = $titleParts | append . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with .Title -}}
|
{{- with .Title -}}
|
||||||
{{- $titleParts = $titleParts | append . -}}
|
{{- $titleParts = $titleParts | append . -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- if $isDeadLink -}}
|
{{- if $isDeadLink -}}
|
||||||
{{- $deadDetails := slice -}}
|
{{- $deadDetails := slice -}}
|
||||||
{{- with (index $cacheEntry "checkedAt") -}}
|
{{- with (index $cacheEntry "checkedAt") -}}
|
||||||
{{- $deadDetails = $deadDetails | append (printf "inaccessible depuis le %s" (time.Format "02/01/2006" (time .))) -}}
|
{{- $deadDetails = $deadDetails | append (printf "inaccessible depuis le %s" (time.Format "02/01/2006" (time .))) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with (index $cacheEntry "errorType") -}}
|
{{- with (index $cacheEntry "errorType") -}}
|
||||||
{{- $deadDetails = $deadDetails | append (printf "raison %s" .) -}}
|
{{- $deadDetails = $deadDetails | append (printf "raison %s" .) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with (index $deadInfo "status") -}}
|
{{- with (index $deadInfo "status") -}}
|
||||||
{{- $deadDetails = $deadDetails | append (printf "statut %v" .) -}}
|
{{- $deadDetails = $deadDetails | append (printf "statut %v" .) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- with $deadDetails -}}
|
{{- with $deadDetails -}}
|
||||||
{{- $titleParts = $titleParts | append (printf "(%s)" (delimit . " ; ")) -}}
|
{{- $titleParts = $titleParts | append (printf "(%s)" (delimit . " ; ")) -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- end -}}
|
{{- end -}}
|
||||||
{{- $titleValue := delimit $titleParts " - " -}}
|
{{- $titleValue := delimit $titleParts " - " -}}
|
||||||
{{- $relAttr := "" -}}
|
{{- $relAttr := "" -}}
|
||||||
{{- if $isExternal -}}
|
{{- if $isExternal -}}
|
||||||
{{- $relAttr = "noreferrer noopener" -}}
|
{{- $relAttr = "noreferrer noopener" -}}
|
||||||
{{- end -}}
|
{{- end -}}<a href="{{ $newURL }}" title="{{ $titleValue }}" {{- if gt (len $relAttr) 0 -}} rel="{{ $relAttr }}" {{- end
|
||||||
<a href="{{ $newURL }}" title="{{ $titleValue }}"
|
-}} {{- if gt (len $classes) 0 -}} class="{{ delimit $classes ` ` }}" {{- end -}}>{{- .Text | safeHTML -}}</a>{{- /*
|
||||||
{{- if gt (len $relAttr) 0 -}} rel="{{ $relAttr }}"{{- end -}}
|
*/ -}}
|
||||||
{{- if gt (len $classes) 0 -}} class="{{ delimit $classes ` ` }}"{{- end -}}>
|
|
||||||
{{- .Text | safeHTML -}}
|
|
||||||
</a>
|
|
||||||
{{- /* */ -}}
|
|
||||||
Reference in New Issue
Block a user