diff --git a/config/_default/menus.yaml b/config/_default/menus.yaml index 6fb9afbc..ba268515 100644 --- a/config/_default/menus.yaml +++ b/config/_default/menus.yaml @@ -7,6 +7,10 @@ main: title: "Comment me contacter ?" pageRef: /contact/ parent: Accueil + - name: Forge logicielle + title: "Mes dépôts git" + pageRef: https://git.dern.ovh + parent: Accueil - name: Flux RSS title: Restez au courant de mes publications grâce à mon flux RSS pageRef: /index.xml diff --git a/config/_default/params.yaml b/config/_default/params.yaml index f34c98c7..a648d17b 100644 --- a/config/_default/params.yaml +++ b/config/_default/params.yaml @@ -4,6 +4,7 @@ favicon: /favicon.png logo: logo-large.png description: "Richard Dern et ses opinions impopulaires" themeColor: "#060c14" +repositoryURL: https://git.dern.ovh/blog/2025 search: action: /recherche/ param: q diff --git a/layouts/partials/head/metadata.html b/layouts/partials/head/metadata.html index c50d633d..bb337612 100644 --- a/layouts/partials/head/metadata.html +++ b/layouts/partials/head/metadata.html @@ -24,6 +24,9 @@ {{- end }} +{{- with $page.Site.Params.repositoryURL }} + +{{- end }} diff --git a/themes/2026/assets/css/content.css b/themes/2026/assets/css/content.css index 06e36d46..dd9a9172 100644 --- a/themes/2026/assets/css/content.css +++ b/themes/2026/assets/css/content.css @@ -618,6 +618,11 @@ main > article > section.article-asides > section.article-taxonomies { background: linear-gradient(180deg, rgba(93, 134, 173, 0.18) 0%, rgba(17, 27, 42, 0.56) 100%); } +main > article > section.article-asides > section.article-change-history { + border-top-color: var(--color-section-divider-2); + background: linear-gradient(180deg, rgba(143, 106, 216, 0.2) 0%, rgba(17, 27, 42, 0.56) 100%); +} + main > article > section.article-asides > section.article-aside-block > h2 { margin-top: 0; margin-bottom: 0; @@ -738,6 +743,93 @@ body > main.taxonomy-page > section > ul > li > sub { color: var(--color-text-muted); } +main > article > section.article-asides > section.article-change-history > ol { + --article-change-history-marker-size: 1rem; + --article-change-history-marker-offset: 0.25rem; + --article-change-history-marker-top: 0.25rem; + --article-change-history-marker-center: calc( + var(--article-change-history-marker-offset) + (var(--article-change-history-marker-size) / 2) + ); + list-style: none; + margin-top: var(--space-3); + padding-left: 0; +} + +main > article > section.article-asides > section.article-change-history > ol > li { + margin-top: 0; + position: relative; + padding-left: calc(var(--space-6) + 0.2rem); +} + +main > article > section.article-asides > section.article-change-history > ol > li + li { + margin-top: var(--space-4); +} + +main > article > section.article-asides > section.article-change-history > ol > li::before { + content: ""; + position: absolute; + z-index: 1; + inset-block-start: var(--article-change-history-marker-top); + inset-inline-start: var(--article-change-history-marker-offset); + width: var(--article-change-history-marker-size); + height: var(--article-change-history-marker-size); + border: 2px solid #d3b9ff; + border-radius: 50%; + background: #121b2c; + box-shadow: 0 0 0 0.2rem rgba(143, 106, 216, 0.18); +} + +main > article > section.article-asides > section.article-change-history > ol > li::after { + content: ""; + position: absolute; + inset-block-start: calc( + var(--article-change-history-marker-top) + (var(--article-change-history-marker-size) / 2) + ); + inset-inline-start: calc( + var(--article-change-history-marker-center) - (var(--border-width-regular) / 2) + ); + z-index: 0; + width: var(--border-width-regular); + height: calc(100% + var(--space-4)); + border-radius: 999px; + background: linear-gradient(180deg, rgba(211, 185, 255, 0.7) 0%, rgba(143, 106, 216, 0.36) 100%); +} + +main > article > section.article-asides > section.article-change-history > ol > li:last-child::after { + content: none; +} + +main > article > section.article-asides > section.article-change-history > ol > li > :is(a, div) { + display: flex; + flex-direction: column; + gap: 0.25rem; + position: relative; + z-index: 1; + color: inherit; + text-decoration: none; +} + +main > article > section.article-asides > section.article-change-history > ol > li > :is(a, div) > span.article-change-history-subject { + font-family: var(--font-heading); + font-size: 1.08rem; + line-height: 1.2; + color: var(--color-heading); +} + +main > article > section.article-asides > section.article-change-history > ol > li > a:is(:hover, :focus-visible) > span.article-change-history-subject { + color: #f3ddff; + text-decoration: underline; +} + +main > article > section.article-asides > section.article-change-history > ol > li > :is(a, div) > time { + font-size: 0.86rem; + line-height: 1.4; + color: #d8c8f3; + letter-spacing: 0.05em; + text-transform: uppercase; + font-family: var(--font-heading); +} + main > article > section.article-books { margin-block: var(--article-feature-block-margin); border-top: var(--border-width-regular) solid var(--color-accent-3); diff --git a/themes/2026/layouts/_partials/article-asides.html b/themes/2026/layouts/_partials/article-asides.html index 60980339..cd7aef0d 100644 --- a/themes/2026/layouts/_partials/article-asides.html +++ b/themes/2026/layouts/_partials/article-asides.html @@ -1,8 +1,9 @@ {{- $commentsMarkup := strings.TrimSpace (partial "asides/comments.html" .) -}} {{- $keywordsMarkup := strings.TrimSpace (partial "asides/keywords.html" .) -}} +{{- $changeHistoryMarkup := strings.TrimSpace (partial "article-change-history.html" .) -}} {{- $furtherReadingMarkup := strings.TrimSpace (partial "article-further-reading.html" .) -}} {{- $relatedMarkup := strings.TrimSpace (partial "article-related.html" .) -}} -{{- if or (ne $commentsMarkup "") (ne $keywordsMarkup "") (ne $furtherReadingMarkup "") (ne $relatedMarkup "") -}} +{{- if or (ne $commentsMarkup "") (ne $keywordsMarkup "") (ne $changeHistoryMarkup "") (ne $furtherReadingMarkup "") (ne $relatedMarkup "") -}}
{{- with $commentsMarkup -}} {{- . | safeHTML -}} @@ -16,5 +17,8 @@ {{- with $relatedMarkup -}} {{- . | safeHTML -}} {{- end -}} + {{- with $changeHistoryMarkup -}} + {{- . | safeHTML -}} + {{- end -}}
{{- end -}} diff --git a/themes/2026/layouts/_partials/article-change-history.html b/themes/2026/layouts/_partials/article-change-history.html new file mode 100644 index 00000000..69595311 --- /dev/null +++ b/themes/2026/layouts/_partials/article-change-history.html @@ -0,0 +1,40 @@ +{{- with .GitInfo -}} + {{- $history := slice . -}} + {{- range .Ancestors -}} + {{- $history = $history | append . -}} + {{- end -}} + {{- $repositoryURL := "" -}} + {{- $diffAnchor := "" -}} + {{- with $.Site.Params.repositoryURL -}} + {{- $repositoryURL = strings.TrimSuffix "/" (strings.TrimSpace .) -}} + {{- end -}} + {{- with $.File.Path -}} + {{- $diffAnchor = printf "#diff-%s" (sha1 (printf "content/%s" .)) -}} + {{- end -}} + {{- if gt (len $history) 0 -}} +
+

Historique des modifications

+
    + {{- range $history -}} + {{- $commitURL := "" -}} + {{- if ne $repositoryURL "" -}} + {{- $commitURL = printf "%s/commit/%s%s" $repositoryURL .Hash $diffAnchor -}} + {{- end -}} +
  1. + {{- if ne $commitURL "" -}} + + {{ .Subject }} + + + {{- else -}} +
    + {{ .Subject }} + +
    + {{- end -}} +
  2. + {{- end -}} +
+
+ {{- end -}} +{{- end -}}