diff --git a/content/index.md b/content/index.md index 04e8d2b..896b1c6 100644 --- a/content/index.md +++ b/content/index.md @@ -1,7 +1,7 @@ --- title: Statlib description: A Lean 4 library for foundational and modern theoretical statistics. -script: homepage.js +script: homepage.js?v=20261001-activity intro: false --- @@ -11,6 +11,4 @@ intro: false ## Community activity {#activity .people} -Activity is refreshed from GitHub on a schedule and served as a stable snapshot. - [[community-activity]] diff --git a/content/todos.md b/content/todos.md index 2b0e376..eb98986 100644 --- a/content/todos.md +++ b/content/todos.md @@ -1,7 +1,7 @@ --- title: Open formalization work — Statlib description: Lean theorem statements currently open for contribution in Statlib. -script: homepage.js +script: homepage.js?v=20261001-activity intro: true --- diff --git a/contribute.html b/contribute.html index 31cbc9f..676761d 100644 --- a/contribute.html +++ b/contribute.html @@ -4,7 +4,7 @@ Contributing to Statlib - + diff --git a/governance.html b/governance.html index cb43dd2..42de0e6 100644 --- a/governance.html +++ b/governance.html @@ -5,7 +5,7 @@ Governance — Statlib - + diff --git a/homepage.js b/homepage.js index db48fc4..1599ca2 100644 --- a/homepage.js +++ b/homepage.js @@ -166,7 +166,7 @@ ); } - function activityCard(person, rank, grandTotal, yMax) { + function activityCard(person, rank, grandTotal, yMax, startIndex) { const meta = KINDS.filter((kind) => person[kind.key] > 0).map((kind) => count(person[kind.key], kind), ); @@ -205,7 +205,7 @@ el("div", { class: "gh-meta", text: meta.join(" · ") }), ]), shareBar, - weeklyChart(person.weeks, yMax, { + weeklyChart(person.weeks.slice(startIndex), yMax, { height: 56, axis: false, label: `Weekly activity by ${person.name}`, @@ -306,20 +306,25 @@ 0, ), })); - const combinedMax = Math.max(1, ...combined.map(weekTotal)); + const firstActiveWeek = combined.findIndex((week) => weekTotal(week) > 0); + const startIndex = firstActiveWeek > 0 ? firstActiveWeek - 1 : 0; + const visibleCombined = combined.slice(startIndex); + const combinedMax = Math.max(1, ...visibleCombined.map(weekTotal)); const personMax = Math.max( 1, - ...rows.flatMap((person) => person.weeks.map(weekTotal)), + ...rows.flatMap((person) => person.weeks.slice(startIndex).map(weekTotal)), ); const grandTotal = rows.reduce((sum, person) => sum + person.total, 0); const cards = el("ol", { class: "gh-cards" }); rows.forEach((person, index) => { - cards.append(activityCard(person, index + 1, grandTotal, personMax)); + cards.append( + activityCard(person, index + 1, grandTotal, personMax, startIndex), + ); }); board.append( el("div", { class: "data-summary" }, [ - el("span", { text: `${activity.window} · ${rows.length} contributors` }), + el("span", { text: `${rows.length} contributors` }), el("span", { text: `Updated ${fmtUpdated(data.generated_at)}` }), ]), el("div", { class: "gh-view" }, [ @@ -328,7 +333,7 @@ el("div", { class: "gh-overview-title", text: "Activity per week" }), legend(), ]), - weeklyChart(combined, combinedMax, { + weeklyChart(visibleCombined, combinedMax, { height: 120, axis: true, label: `Weekly activity in ${activity.repository}`, diff --git a/index.html b/index.html index 2a9c460..fce3ae6 100644 --- a/index.html +++ b/index.html @@ -5,7 +5,7 @@ Statlib - + @@ -28,7 +28,6 @@

Statlib

Statlib is an open community that aims to support the verification of classical, contemporary, and emerging research in mathematical statistics; its vision and goals are shaped by the whole community. Please check out our contributors below. Interested in joining us? Visit our Zulip channel.

Community activity

-

Activity is refreshed from GitHub on a schedule and served as a stable snapshot.

Loading community activity…

@@ -36,7 +35,7 @@

Community activity

- + diff --git a/roadmap.html b/roadmap.html index de2210c..4f1b962 100644 --- a/roadmap.html +++ b/roadmap.html @@ -5,7 +5,7 @@ Roadmap — Statlib - + diff --git a/site.css b/site.css index 1eabba9..9d0d0e2 100644 --- a/site.css +++ b/site.css @@ -406,6 +406,14 @@ body.site-page { border-bottom: 1px solid var(--line-soft); } +.site-page #activity h2 { + margin-bottom: 12px; +} + +.site-page #activity .data-summary { + margin-top: 0; +} + .site-page .people ul { list-style: none; margin: 0; diff --git a/todos.html b/todos.html index d1e3679..98352f0 100644 --- a/todos.html +++ b/todos.html @@ -5,7 +5,7 @@ Open formalization work — Statlib - + @@ -32,7 +32,7 @@

Open formalization work

- + diff --git a/tools/build_site.py b/tools/build_site.py index c6eca98..31bd274 100755 --- a/tools/build_site.py +++ b/tools/build_site.py @@ -311,7 +311,7 @@ def render_page(page_key: str, meta: dict[str, str], body_html: str) -> str: head.append(f'') head.extend( [ - '', + '', "", '', "",