From 6e0f8c6010c1c41805eac2b2be2a49409d1d84f1 Mon Sep 17 00:00:00 2001 From: Richard Dern Date: Fri, 12 Dec 2025 23:41:20 +0100 Subject: [PATCH] =?UTF-8?q?Am=C3=A9lioration=20de=20l'affichage?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- themes/42/assets/css/article-body.css | 4 +- themes/42/assets/css/figure.css | 4 + themes/42/assets/css/links.css | 3 +- themes/42/layouts/_markup/render-link.html | 2 +- .../layouts/_partials/media/render-image.html | 2 +- themes/42/layouts/_partials/render/link.html | 94 +++++++++---------- 6 files changed, 55 insertions(+), 54 deletions(-) diff --git a/themes/42/assets/css/article-body.css b/themes/42/assets/css/article-body.css index b16b9db7..3f35af46 100644 --- a/themes/42/assets/css/article-body.css +++ b/themes/42/assets/css/article-body.css @@ -44,6 +44,7 @@ article.article-body { margin: auto; line-height: 150%; text-align: justify; + hyphens: auto; } >details { @@ -129,6 +130,7 @@ article.article-body { color: var(--color-text-light); font-style: italic; text-align: justify; + hyphens: auto; margin: auto; cite { @@ -196,4 +198,4 @@ article.article-body { sub { bottom: -0.2em; } -} \ No newline at end of file +} diff --git a/themes/42/assets/css/figure.css b/themes/42/assets/css/figure.css index b6b31103..e46e5929 100644 --- a/themes/42/assets/css/figure.css +++ b/themes/42/assets/css/figure.css @@ -37,6 +37,10 @@ figure { text-wrap: balance; margin: auto; line-height: 150%; + + summary { + cursor: pointer; + } } audio { diff --git a/themes/42/assets/css/links.css b/themes/42/assets/css/links.css index cf66fb35..55ad51e9 100644 --- a/themes/42/assets/css/links.css +++ b/themes/42/assets/css/links.css @@ -1,7 +1,6 @@ a { color: var(--color-link); text-decoration: underline; - display: inline-block; max-width: 100%; overflow-wrap: anywhere; word-break: break-word; @@ -11,4 +10,4 @@ a { &:focus { color: var(--color-link-hover); } -} \ No newline at end of file +} diff --git a/themes/42/layouts/_markup/render-link.html b/themes/42/layouts/_markup/render-link.html index 2d82e86e..fe2b3195 100644 --- a/themes/42/layouts/_markup/render-link.html +++ b/themes/42/layouts/_markup/render-link.html @@ -1 +1 @@ -{{- partial "render/link.html" . -}} +{{- partial "render/link.html" . -}} \ No newline at end of file diff --git a/themes/42/layouts/_partials/media/render-image.html b/themes/42/layouts/_partials/media/render-image.html index 93fae273..9fca0559 100644 --- a/themes/42/layouts/_partials/media/render-image.html +++ b/themes/42/layouts/_partials/media/render-image.html @@ -26,7 +26,7 @@ {{- if $data.prompt }}
- Attribution : {{- with $data.attribution }}{{ . | markdownify }}{{- end }} + Attribution : {{- with $data.attribution }} {{ . | markdownify }}{{- end }}

Prompt : {{ $data.prompt }}

diff --git a/themes/42/layouts/_partials/render/link.html b/themes/42/layouts/_partials/render/link.html index 75a47af8..3997bfec 100644 --- a/themes/42/layouts/_partials/render/link.html +++ b/themes/42/layouts/_partials/render/link.html @@ -14,72 +14,68 @@ {{- $deadInfo := dict -}} {{- $isDeadLink := false -}} {{- with (first 1 (where $deadList "url" .Destination)) -}} - {{- $deadInfo = index . 0 -}} - {{- $isDeadLink = true -}} +{{- $deadInfo = index . 0 -}} +{{- $isDeadLink = true -}} {{- end -}} {{- $newURL := .Destination -}} {{- if and $isExternal $aff -}} - {{- $param := $aff.param -}} - {{- $value := $aff.value -}} - {{- $isAffiliated = true -}} - {{- if $query -}} - {{- $newURL = printf "%s://%s%s?%s&%s=%s" $parsed.Scheme $host $path $query $param $value -}} - {{- else -}} - {{- $newURL = printf "%s://%s%s?%s=%s" $parsed.Scheme $host $path $param $value -}} - {{- end -}} +{{- $param := $aff.param -}} +{{- $value := $aff.value -}} +{{- $isAffiliated = true -}} +{{- if $query -}} +{{- $newURL = printf "%s://%s%s?%s&%s=%s" $parsed.Scheme $host $path $query $param $value -}} +{{- else -}} +{{- $newURL = printf "%s://%s%s?%s=%s" $parsed.Scheme $host $path $param $value -}} +{{- end -}} {{- end -}} {{- $titlePrefix := cond $isAffiliated "Lien affiliƩ" (cond $isExternal "Lien externe" "") -}} {{- $classes := slice -}} {{- if $isExternal -}} - {{- $classes = $classes | append "external" -}} - {{- if $isAffiliated -}} - {{- $classes = $classes | append "affiliated" -}} - {{- end -}} +{{- $classes = $classes | append "external" -}} +{{- if $isAffiliated -}} +{{- $classes = $classes | append "affiliated" -}} +{{- end -}} {{- end -}} {{- if $isDeadLink -}} - {{- $statusRaw := index $deadInfo "status" -}} - {{- $statusCode := "" -}} - {{- with $statusRaw -}} - {{- $statusCode = printf "%v" . -}} - {{- end -}} - {{- if eq $statusCode "404" -}} - {{- $classes = $classes | append "dead" -}} - {{- else if gt (len $statusCode) 0 -}} - {{- $classes = $classes | append "problematic" -}} - {{- else -}} - {{- $classes = $classes | append "dead" -}} - {{- end -}} +{{- $statusRaw := index $deadInfo "status" -}} +{{- $statusCode := "" -}} +{{- with $statusRaw -}} +{{- $statusCode = printf "%v" . -}} +{{- end -}} +{{- if eq $statusCode "404" -}} +{{- $classes = $classes | append "dead" -}} +{{- else if gt (len $statusCode) 0 -}} +{{- $classes = $classes | append "problematic" -}} +{{- else -}} +{{- $classes = $classes | append "dead" -}} +{{- end -}} {{- end -}} {{- $titleParts := slice -}} {{- with $titlePrefix -}} - {{- $titleParts = $titleParts | append . -}} +{{- $titleParts = $titleParts | append . -}} {{- end -}} {{- with .Title -}} - {{- $titleParts = $titleParts | append . -}} +{{- $titleParts = $titleParts | append . -}} {{- end -}} {{- if $isDeadLink -}} - {{- $deadDetails := slice -}} - {{- with (index $cacheEntry "checkedAt") -}} - {{- $deadDetails = $deadDetails | append (printf "inaccessible depuis le %s" (time.Format "02/01/2006" (time .))) -}} - {{- end -}} - {{- with (index $cacheEntry "errorType") -}} - {{- $deadDetails = $deadDetails | append (printf "raison %s" .) -}} - {{- end -}} - {{- with (index $deadInfo "status") -}} - {{- $deadDetails = $deadDetails | append (printf "statut %v" .) -}} - {{- end -}} - {{- with $deadDetails -}} - {{- $titleParts = $titleParts | append (printf "(%s)" (delimit . " ; ")) -}} - {{- end -}} +{{- $deadDetails := slice -}} +{{- with (index $cacheEntry "checkedAt") -}} +{{- $deadDetails = $deadDetails | append (printf "inaccessible depuis le %s" (time.Format "02/01/2006" (time .))) -}} +{{- end -}} +{{- with (index $cacheEntry "errorType") -}} +{{- $deadDetails = $deadDetails | append (printf "raison %s" .) -}} +{{- end -}} +{{- with (index $deadInfo "status") -}} +{{- $deadDetails = $deadDetails | append (printf "statut %v" .) -}} +{{- end -}} +{{- with $deadDetails -}} +{{- $titleParts = $titleParts | append (printf "(%s)" (delimit . " ; ")) -}} +{{- end -}} {{- end -}} {{- $titleValue := delimit $titleParts " - " -}} {{- $relAttr := "" -}} {{- if $isExternal -}} - {{- $relAttr = "noreferrer noopener" -}} -{{- end -}} - - {{- .Text | safeHTML -}} - -{{- /* */ -}} +{{- $relAttr = "noreferrer noopener" -}} +{{- end -}}{{- .Text | safeHTML -}}{{- /* +*/ -}} \ No newline at end of file