From a865dcbb69b0541ccdab941eede8c3005dfed9c7 Mon Sep 17 00:00:00 2001 From: "Danilo M." Date: Fri, 8 May 2026 17:39:07 +0200 Subject: feat: add contribution graph widget Sidebar (/is pages, cellSize=8) and footer (sitewide, cellSize=6). Fetches /contributions.json, split-cell linear-gradient rendering (gitolite=green/accent2, github=purple/accent), opacity intensity levels, month labels, tooltip, i18n IT/EN. WCAG 2.1 AA compliant. Co-Authored-By: Claude Sonnet 4.6 --- layouts/partials/contribution-graph.html | 19 +++++++++++++++++++ layouts/partials/footer.html | 3 +++ layouts/partials/sidebar.html | 5 +++++ 3 files changed, 27 insertions(+) create mode 100644 layouts/partials/contribution-graph.html (limited to 'layouts/partials') diff --git a/layouts/partials/contribution-graph.html b/layouts/partials/contribution-graph.html new file mode 100644 index 0000000..5dde2b4 --- /dev/null +++ b/layouts/partials/contribution-graph.html @@ -0,0 +1,19 @@ +{{- $cellSize := .cellSize | default 8 -}} +{{- $lang := .page.Lang | default "en" -}} +{{- $label := i18n "contrib_widget_label" -}} +{{- $heading := i18n "contrib_heading" -}} + + + +{{- $js := resources.Get "js/contribution-graph.js" | minify -}} + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html index aec694b..4287d19 100644 --- a/layouts/partials/footer.html +++ b/layouts/partials/footer.html @@ -68,6 +68,9 @@
{{ i18n "footer_about_focus_value" }}
+
+ {{- partial "contribution-graph.html" (dict "cellSize" 6 "page" .) -}} +
diff --git a/layouts/partials/sidebar.html b/layouts/partials/sidebar.html index 2047c12..1c3f020 100644 --- a/layouts/partials/sidebar.html +++ b/layouts/partials/sidebar.html @@ -62,6 +62,11 @@ + {{- if and (eq .Section "is") (eq .Kind "section") }} + + {{- partial "contribution-graph.html" (dict "cellSize" 8 "page" .) -}} + {{- end }} + -- cgit v1.2.3