Skip to content

Commit cb90bc1

Browse files
Deployed 955dc6c to dev with ProperDocs 1.6.7 and mike 2.2.0
1 parent a96381e commit cb90bc1

25 files changed

Lines changed: 846 additions & 20 deletions

File tree

dev/404.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1491,6 +1491,10 @@ <h1 class="slim-not-found__title">Page not found</h1>
14911491

14921492
<script src="/slim/latest/javascripts/slimctl-terminal.js"></script>
14931493

1494+
<script src="/slim/latest/javascripts/slim-repobeats-data.js"></script>
1495+
1496+
<script src="/slim/latest/javascripts/slim-repobeats.js"></script>
1497+
14941498

14951499
</body>
14961500
</html>

dev/community/index.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1826,6 +1826,10 @@ <h2 id="related-agntcy-components">Related AGNTCY components</h2>
18261826

18271827
<script src="../javascripts/slimctl-terminal.js"></script>
18281828

1829+
<script src="../javascripts/slim-repobeats-data.js"></script>
1830+
1831+
<script src="../javascripts/slim-repobeats.js"></script>
1832+
18291833

18301834
</body>
18311835
</html>

dev/index.html

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1568,6 +1568,10 @@ <h1 class="slim-hero__title">Secure Low-Latency Interactive Messaging</h1>
15681568
See SLIM in Action
15691569
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg>
15701570
</a>
1571+
<a class="slim-hero__btn" href="#community">
1572+
Community
1573+
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 4l-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"/></svg>
1574+
</a>
15711575
<a class="slim-hero__btn" href="https://github.com/agntcy/slim" target="_blank" rel="noopener noreferrer">
15721576
GitHub
15731577
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 .5C5.73.5.5 5.73.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.56 0-.28-.01-1.02-.02-2-3.2.7-3.88-1.54-3.88-1.54-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.23-1.28-5.23-5.69 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11.1 11.1 0 0 1 5.8 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.81 1.19 1.84 1.19 3.1 0 4.42-2.69 5.39-5.25 5.68.41.36.78 1.06.78 2.14 0 1.55-.01 2.8-.01 3.18 0 .31.21.68.8.56A11.51 11.51 0 0 0 23.5 12C23.5 5.73 18.27.5 12 .5z"/></svg>
@@ -1705,6 +1709,104 @@ <h2 class="slim-section-title" id="see-slim-in-action">See SLIM in Action</h2>
17051709
</section>
17061710
</section>
17071711

1712+
<section class="slim-community" id="community">
1713+
<h2 class="slim-section-title">Community</h2>
1714+
<p class="slim-community__lede">
1715+
Connect with AGNTCY contributors, join working group meetings, and help shape secure agent messaging.
1716+
For more information, see the <a href="community.md">community page</a>.
1717+
</p>
1718+
1719+
<div class="slim-community-social">
1720+
<a
1721+
class="slim-community-card"
1722+
href="https://discord.gg/nbeEENusy"
1723+
target="_blank"
1724+
rel="noopener noreferrer"
1725+
>
1726+
<span class="slim-community-card__icon" aria-hidden="true">
1727+
<svg viewBox="0 0 24 24" role="img"><path d="M20.317 4.37a19.791 19.791 0 0 0-4.885-1.515.074.074 0 0 0-.079.037 12.3 12.3 0 0 0-.608 1.25 18.27 18.27 0 0 0-5.487 0 12.64 12.64 0 0 0-.617-1.25.077.077 0 0 0-.079-.037A19.736 19.736 0 0 0 3.677 4.37a.07.07 0 0 0-.032.027C.533 9.046-.32 13.58.099 18.057a.082.082 0 0 0 .031.057 19.9 19.9 0 0 0 5.993 3.03.078.078 0 0 0 .084-.028 14.09 14.09 0 0 0 1.226-1.994.076.076 0 0 0-.041-.106 13.107 13.107 0 0 1-1.872-.892.077.077 0 0 1-.008-.128 10.2 10.2 0 0 0 .372-.292.074.074 0 0 1 .077-.01c3.928 1.793 8.18 1.793 12.062 0a.074.074 0 0 1 .078.01c.12.098.246.198.373.292a.077.077 0 0 1-.006.127 12.299 12.299 0 0 1-1.873.892.077.077 0 0 0-.041.107c.36.698.772 1.362 1.225 1.993a.076.076 0 0 0 .084.028 19.839 19.839 0 0 0 6.002-3.03.077.077 0 0 0 .032-.054c.5-5.177-.838-9.674-3.549-13.66a.061.061 0 0 0-.031-.03zM8.02 15.33c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.956-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.956 2.418-2.157 2.418zm7.975 0c-1.183 0-2.157-1.085-2.157-2.419 0-1.333.955-2.419 2.157-2.419 1.21 0 2.176 1.096 2.157 2.42 0 1.333-.946 2.418-2.157 2.418z"/></svg>
1728+
</span>
1729+
<span class="slim-community-card__body">
1730+
<span class="slim-community-card__title">Discord</span>
1731+
<span class="slim-community-card__text">Chat with maintainers and contributors in the AGNTCY Discord server.</span>
1732+
</span>
1733+
</a>
1734+
1735+
<a
1736+
class="slim-community-card"
1737+
href="https://zoom-lfx.platform.linuxfoundation.org/meetings/agntcy?view=week"
1738+
target="_blank"
1739+
rel="noopener noreferrer"
1740+
>
1741+
<span class="slim-community-card__icon" aria-hidden="true">
1742+
<svg viewBox="0 0 24 24" role="img"><path d="M19 4h-1V2h-2v2H8V2H6v2H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V6a2 2 0 0 0-2-2zm0 16H5V10h14v10zM5 8V6h14v2H5zm2 4h10v2H7v-2zm0 4h7v2H7v-2z"/></svg>
1743+
</span>
1744+
<span class="slim-community-card__body">
1745+
<span class="slim-community-card__title">Meetings</span>
1746+
<span class="slim-community-card__text">Join working group and community meetings on the AGNTCY calendar.</span>
1747+
</span>
1748+
</a>
1749+
1750+
<a
1751+
class="slim-community-card"
1752+
href="https://blogs.agntcy.org/"
1753+
target="_blank"
1754+
rel="noopener noreferrer"
1755+
>
1756+
<span class="slim-community-card__icon" aria-hidden="true">
1757+
<svg viewBox="0 0 24 24" role="img"><path d="M19 3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14a2 2 0 0 0 2-2V5a2 2 0 0 0-2-2zm-5 14H7v-2h7v2zm3-4H7v-2h10v2zm0-4H7V7h10v2z"/></svg>
1758+
</span>
1759+
<span class="slim-community-card__body">
1760+
<span class="slim-community-card__title">Blog</span>
1761+
<span class="slim-community-card__text">Read announcements, tutorials, and technical deep dives from the SLIM team.</span>
1762+
</span>
1763+
</a>
1764+
</div>
1765+
1766+
<div class="slim-community-contribute">
1767+
<div class="slim-community-contribute__text">
1768+
<h3 class="slim-community-contribute__title">Contribute</h3>
1769+
<p>
1770+
Help build SLIM by contributing code, reporting bugs, or suggesting enhancements. Pick up a
1771+
good first issue, review open pull requests, or read the contributing guide to get started.
1772+
</p>
1773+
<div class="slim-community-contribute__actions">
1774+
<a
1775+
class="slim-community-contribute__btn"
1776+
href="https://github.com/agntcy/slim"
1777+
target="_blank"
1778+
rel="noopener noreferrer"
1779+
>
1780+
Visit our GitHub
1781+
<svg viewBox="0 0 24 24" aria-hidden="true"><path d="M12 .5C5.73.5.5 5.73.5 12c0 5.08 3.29 9.39 7.86 10.91.58.11.79-.25.79-.56 0-.28-.01-1.02-.02-2-3.2.7-3.88-1.54-3.88-1.54-.53-1.34-1.29-1.7-1.29-1.7-1.05-.72.08-.71.08-.71 1.16.08 1.77 1.19 1.77 1.19 1.03 1.77 2.7 1.26 3.36.96.1-.75.4-1.26.73-1.55-2.55-.29-5.23-1.28-5.23-5.69 0-1.26.45-2.29 1.19-3.1-.12-.29-.52-1.46.11-3.05 0 0 .97-.31 3.18 1.18a11.1 11.1 0 0 1 5.8 0c2.2-1.49 3.17-1.18 3.17-1.18.63 1.59.23 2.76.11 3.05.74.81 1.19 1.84 1.19 3.1 0 4.42-2.69 5.39-5.25 5.68.41.36.78 1.06.78 2.14 0 1.55-.01 2.8-.01 3.18 0 .31.21.68.8.56A11.51 11.51 0 0 0 23.5 12C23.5 5.73 18.27.5 12 .5z"/></svg>
1782+
</a>
1783+
<a
1784+
class="slim-community-contribute__btn slim-community-contribute__btn--highlight"
1785+
href="https://github.com/search?q=repo%3Aagntcy%2Fslim+type%3Aissue+label%3A%22good-first-issue%22%2C%22good+first+issue%22&type=issues"
1786+
target="_blank"
1787+
rel="noopener noreferrer"
1788+
>
1789+
Good first issues
1790+
</a>
1791+
</div>
1792+
</div>
1793+
<div class="slim-community-contribute__metrics">
1794+
<a
1795+
class="slim-repobeats__link"
1796+
href="https://github.com/agntcy/slim/pulse"
1797+
target="_blank"
1798+
rel="noopener noreferrer"
1799+
data-slim-repobeats
1800+
data-repo="agntcy/slim"
1801+
>
1802+
<div class="slim-repobeats" aria-busy="true" aria-label="GitHub repository metrics">
1803+
<p class="slim-repobeats__loading">Loading repository metrics…</p>
1804+
</div>
1805+
</a>
1806+
</div>
1807+
</div>
1808+
</section>
1809+
17081810
</div>
17091811

17101812
<section class="slim-get-started">
@@ -1853,6 +1955,10 @@ <h2 class="slim-section-title" id="explore-slim">Explore SLIM</h2>
18531955

18541956
<script src="javascripts/slimctl-terminal.js"></script>
18551957

1958+
<script src="javascripts/slim-repobeats-data.js"></script>
1959+
1960+
<script src="javascripts/slim-repobeats.js"></script>
1961+
18561962

18571963
</body>
18581964
</html>

dev/javascripts/slim-repobeats-data.js

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/javascripts/slim-repobeats.js

Lines changed: 228 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,228 @@
1+
/* Copyright AGNTCY Contributors (https://github.com/agntcy) */
2+
/* SPDX-License-Identifier: Apache-2.0 */
3+
4+
/* RepoBeats-style GitHub activity panel (data from slim-repobeats-data.js). */
5+
document$.subscribe(function () {
6+
document.querySelectorAll("[data-slim-repobeats]").forEach(function (root) {
7+
if (root.dataset.slimRepobeatsInit === "true") {
8+
return;
9+
}
10+
root.dataset.slimRepobeatsInit = "true";
11+
12+
var repo = root.dataset.repo || "agntcy/slim";
13+
var panel = root.querySelector(".slim-repobeats");
14+
if (!panel) {
15+
return;
16+
}
17+
18+
var data = window.__SLIM_REPOBEATS_DATA__;
19+
if (!data) {
20+
showRepobeatsError(panel, repo);
21+
return;
22+
}
23+
24+
if (data.embedId) {
25+
panel.innerHTML =
26+
'<img class="slim-repobeats__embed" src="https://repobeats.axiom.co/api/embed/' +
27+
encodeURIComponent(data.embedId) +
28+
'.svg" alt="GitHub repository metrics" decoding="async" loading="lazy" width="814" height="318" />';
29+
panel.removeAttribute("aria-busy");
30+
return;
31+
}
32+
33+
renderRepobeatsPanel(panel, data);
34+
});
35+
});
36+
37+
function showRepobeatsError(panel, repo) {
38+
panel.innerHTML =
39+
'<p class="slim-repobeats__error">Could not load repository metrics. ' +
40+
'<a href="https://github.com/' +
41+
repo +
42+
'/pulse" target="_blank" rel="noopener noreferrer">View activity on GitHub</a>.</p>';
43+
panel.removeAttribute("aria-busy");
44+
}
45+
46+
function renderRepobeatsPanel(panel, data) {
47+
var recentCommits = data.recentCommits;
48+
if (!recentCommits && data.commitBars && data.commitBars.length) {
49+
recentCommits = data.commitBars.slice(-5).reduce(function (sum, value) {
50+
return sum + value;
51+
}, 0);
52+
}
53+
54+
panel.innerHTML =
55+
renderSummaryRow(
56+
"commits",
57+
recentCommits + " Contributions in the Last 30 Days",
58+
data.commitBars || [],
59+
"rgba(236, 72, 153, 1)"
60+
) +
61+
renderSummaryRow(
62+
"prs",
63+
data.openPrs + " Pull Requests Opened",
64+
data.commitBars || [],
65+
"rgba(123, 88, 201, 1)"
66+
) +
67+
'<div class="slim-repobeats__split">' +
68+
renderSplitCard(
69+
"issues",
70+
"Issues",
71+
data.issuesOpened + " opened",
72+
data.issuesClosed + " closed",
73+
data.issueWeeks || [],
74+
"rgba(64, 108, 196, 1)",
75+
"rgba(34, 197, 94, 1)"
76+
) +
77+
renderSplitCard(
78+
"pulls",
79+
"Pull Requests",
80+
data.prsOpened + " opened",
81+
data.prsMerged + " merged",
82+
data.prWeeks || [],
83+
"rgba(123, 88, 201, 1)",
84+
"rgba(34, 197, 94, 1)"
85+
) +
86+
"</div>" +
87+
renderContributors(data.contributors || [], data.repo || "agntcy/slim");
88+
panel.removeAttribute("aria-busy");
89+
}
90+
91+
function renderSummaryRow(kind, title, values, color) {
92+
return (
93+
'<div class="slim-repobeats__row slim-repobeats__row--' +
94+
kind +
95+
'">' +
96+
'<div class="slim-repobeats__row-head">' +
97+
'<span class="slim-repobeats__icon slim-repobeats__icon--' +
98+
kind +
99+
'" style="color:' +
100+
color +
101+
'"></span>' +
102+
'<span class="slim-repobeats__title">' +
103+
escapeHtml(title) +
104+
"</span>" +
105+
"</div>" +
106+
renderBars(values, color) +
107+
"</div>"
108+
);
109+
}
110+
111+
function renderSplitCard(kind, label, opened, closed, values, openColor, closedColor) {
112+
return (
113+
'<div class="slim-repobeats__card slim-repobeats__card--' +
114+
kind +
115+
'">' +
116+
'<div class="slim-repobeats__card-head">' +
117+
'<span class="slim-repobeats__card-label">' +
118+
escapeHtml(label) +
119+
"</span>" +
120+
"</div>" +
121+
'<div class="slim-repobeats__card-stats">' +
122+
'<span class="slim-repobeats__card-stat" style="color:' +
123+
openColor +
124+
'">' +
125+
escapeHtml(opened) +
126+
"</span>" +
127+
'<span class="slim-repobeats__card-stat" style="color:' +
128+
closedColor +
129+
'">' +
130+
escapeHtml(closed) +
131+
"</span>" +
132+
"</div>" +
133+
renderBars(values, openColor, "slim-repobeats__bars--compact") +
134+
"</div>"
135+
);
136+
}
137+
138+
function renderContributors(contributors, repo) {
139+
var maxVisible = 12;
140+
141+
if (!contributors.length) {
142+
return (
143+
'<div class="slim-repobeats__contributors">' +
144+
'<span class="slim-repobeats__contributors-label">Top contributors</span>' +
145+
'<img class="slim-repobeats__contrib" src="https://contrib.rocks/image?repo=' +
146+
encodeURIComponent(repo) +
147+
"&amp;max=" +
148+
maxVisible +
149+
"&amp;columns=" +
150+
maxVisible +
151+
'" alt="Top contributors to ' +
152+
repo +
153+
'" decoding="async" loading="lazy" />' +
154+
"</div>"
155+
);
156+
}
157+
158+
var items = contributors
159+
.slice(0, maxVisible)
160+
.map(function (contributor) {
161+
return (
162+
'<img class="slim-repobeats__avatar" src="' +
163+
escapeHtml(contributor.avatar_url) +
164+
'" alt="' +
165+
escapeHtml(contributor.login) +
166+
'" title="' +
167+
escapeHtml(contributor.login) +
168+
'" loading="lazy" width="32" height="32" />'
169+
);
170+
})
171+
.join("");
172+
173+
return (
174+
'<div class="slim-repobeats__contributors">' +
175+
'<span class="slim-repobeats__contributors-label">Top contributors</span>' +
176+
'<div class="slim-repobeats__contributor-list">' +
177+
items +
178+
"</div>" +
179+
"</div>"
180+
);
181+
}
182+
183+
function renderBars(values, color, extraClass) {
184+
var bars = normalizeBars(values)
185+
.map(function (level) {
186+
return (
187+
'<span class="slim-repobeats__bar" style="--level:' +
188+
level +
189+
";--bar-color:" +
190+
color +
191+
'"></span>'
192+
);
193+
})
194+
.join("");
195+
196+
return (
197+
'<div class="slim-repobeats__bars' +
198+
(extraClass ? " " + extraClass : "") +
199+
'" aria-hidden="true">' +
200+
bars +
201+
"</div>"
202+
);
203+
}
204+
205+
function normalizeBars(values) {
206+
var max = 0;
207+
values.forEach(function (value) {
208+
if (value > max) {
209+
max = value;
210+
}
211+
});
212+
if (!max) {
213+
return values.map(function () {
214+
return 0.08;
215+
});
216+
}
217+
return values.map(function (value) {
218+
return Math.max(0.08, value / max);
219+
});
220+
}
221+
222+
function escapeHtml(value) {
223+
return String(value)
224+
.replace(/&/g, "&amp;")
225+
.replace(/</g, "&lt;")
226+
.replace(/>/g, "&gt;")
227+
.replace(/"/g, "&quot;");
228+
}

dev/search/search_index.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)