Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions content/index.md
Original file line number Diff line number Diff line change
@@ -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
---

Expand All @@ -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]]
2 changes: 1 addition & 1 deletion content/todos.md
Original file line number Diff line number Diff line change
@@ -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
---

Expand Down
2 changes: 1 addition & 1 deletion contribute.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Contributing to Statlib</title>
<link rel="stylesheet" href="site.css?v=20261001-homepage">
<link rel="stylesheet" href="site.css?v=20261001-activity">
</head>
<body class="site-page">

Expand Down
2 changes: 1 addition & 1 deletion governance.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Governance — Statlib</title>
<meta name="description" content="Statlib&#x27;s advisory board and maintainer team.">
<link rel="stylesheet" href="site.css?v=20261001-homepage">
<link rel="stylesheet" href="site.css?v=20261001-activity">
</head>
<body class="site-page">

Expand Down
19 changes: 12 additions & 7 deletions homepage.js
Original file line number Diff line number Diff line change
Expand Up @@ -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),
);
Expand Down Expand Up @@ -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}`,
Expand Down Expand Up @@ -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" }, [
Expand All @@ -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}`,
Expand Down
5 changes: 2 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Statlib</title>
<meta name="description" content="A Lean 4 library for foundational and modern theoretical statistics.">
<link rel="stylesheet" href="site.css?v=20261001-homepage">
<link rel="stylesheet" href="site.css?v=20261001-activity">
</head>
<body class="site-page">

Expand All @@ -28,15 +28,14 @@ <h1>Statlib</h1>
<p><a href="https://github.com/stat-lib/statlib" target="_blank" rel="noopener">Statlib</a> 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 <a href="#activity">below</a>. Interested in joining us? Visit our <a href="https://leanprover.zulipchat.com/#narrow/channel/611809-Statlib" target="_blank" rel="noopener">Zulip channel</a>.</p>
<section id="activity" class="people">
<h2>Community activity</h2>
<p>Activity is refreshed from GitHub on a schedule and served as a stable snapshot.</p>
<div id="activity-board" class="data-board" aria-live="polite" aria-busy="true">
<p class="data-status">Loading community activity…</p>
</div>
</section>
</div>
</main>

<script src="homepage.js" defer></script>
<script src="homepage.js?v=20261001-activity" defer></script>

</body>
</html>
2 changes: 1 addition & 1 deletion roadmap.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Roadmap — Statlib</title>
<meta name="description" content="Theorems and concepts queued for formalization, by topic.">
<link rel="stylesheet" href="site.css?v=20261001-homepage">
<link rel="stylesheet" href="site.css?v=20261001-activity">
</head>
<body class="site-page">

Expand Down
8 changes: 8 additions & 0 deletions site.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions todos.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>Open formalization work — Statlib</title>
<meta name="description" content="Lean theorem statements currently open for contribution in Statlib.">
<link rel="stylesheet" href="site.css?v=20261001-homepage">
<link rel="stylesheet" href="site.css?v=20261001-activity">
</head>
<body class="site-page">

Expand All @@ -32,7 +32,7 @@ <h1>Open formalization work</h1>
</div>
</main>

<script src="homepage.js" defer></script>
<script src="homepage.js?v=20261001-activity" defer></script>

</body>
</html>
2 changes: 1 addition & 1 deletion tools/build_site.py
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ def render_page(page_key: str, meta: dict[str, str], body_html: str) -> str:
head.append(f'<meta name="description" content="{html.escape(description)}">')
head.extend(
[
'<link rel="stylesheet" href="site.css?v=20261001-homepage">',
'<link rel="stylesheet" href="site.css?v=20261001-activity">',
"</head>",
'<body class="site-page">',
"",
Expand Down
Loading