Skip to content

Commit eff3e65

Browse files
committed
Show the team's live activity and the loop that brings the next person in
A line under the hero shows what the team just did on GitHub, the contributors section lists everyone who contributed in the last 30 days with what they did, and the join section opens with the loop the hub runs on (learn, contribute, get named, share) with today's numbers. Activity comes from GitHub when a visitor opens the hub and from a snapshot the deploy builds every day otherwise. New events: section_view, live_click, loop_click and click_event for the events section.
1 parent a67f0e7 commit eff3e65

6 files changed

Lines changed: 361 additions & 7 deletions

File tree

‎.github/workflows/deploy.yml‎

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@ on:
44
push:
55
branches: [main]
66
schedule:
7+
# stats once a week (Monday), the activity feed every day
78
- cron: "17 0 * * 1"
9+
- cron: "17 21 * * *"
810
workflow_dispatch:
911

1012
permissions:
@@ -24,7 +26,7 @@ jobs:
2426
persist-credentials: false
2527

2628
- name: Refresh GitHub stats
27-
if: github.event_name != 'push'
29+
if: github.event_name == 'workflow_dispatch' || github.event.schedule == '17 0 * * 1'
2830
env:
2931
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
3032
run: |
@@ -37,6 +39,11 @@ jobs:
3739
git push "https://x-access-token:${GITHUB_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" HEAD:main
3840
fi
3941
42+
- name: Build the activity feed
43+
env:
44+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
run: python3 scripts/build_activity.py data/activity.json || echo "activity feed kept as is"
46+
4047
- name: Check data files
4148
run: python3 scripts/check_data.py
4249

‎assets/css/hub.css‎

Lines changed: 66 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ button.btn.sm { font-size: 14px; }
16111611
.map-how { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 20px; margin: 4px 16px 12px; padding: 10px 14px; border-radius: 12px; background: var(--surface-2); }
16121612
.map-how li { gap: 8px; font-size: 13px; }
16131613
.ln-no { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: var(--on-line); font-family: var(--f-display); font-size: 12.5px; font-weight: 800; line-height: 1; flex-shrink: 0; }
1614-
.ln-no.sm { width: 18px; height: 18px; font-size: 11.5px; margin-left: 3px; }
1614+
.ln-no.sm { width: 18px; height: 18px; font-size: 12px; margin-left: 3px; }
16151615
.line-legend { margin: 0 0 6px; align-items: center; }
16161616
.ll-k { font-size: 13px; font-weight: 800; color: var(--ink); margin-right: 4px; }
16171617
.ll { padding: 5px 12px 5px 5px; }
@@ -1667,3 +1667,68 @@ button.btn.sm { font-size: 14px; }
16671667
.line-legend::-webkit-scrollbar { display: none; }
16681668
.line-legend li { flex-shrink: 0; }
16691669
}
1670+
1671+
/* ---------- alive: the activity line under the hero, the feed with names, the loop ---------- */
1672+
.avatar.xs { width: 22px; height: 22px; font-size: 12px; position: relative; }
1673+
.live { display: flex; align-items: center; gap: 10px 14px; margin-top: 10px; padding: 10px 16px; border-radius: 14px; background: var(--surface); font-size: 14px; min-height: 46px; }
1674+
.live[hidden] { display: none; }
1675+
.lv-k { display: inline-flex; align-items: center; gap: 7px; font-weight: 800; white-space: nowrap; flex-shrink: 0; }
1676+
.lv-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--live); box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 50%, transparent); }
1677+
@media (prefers-reduced-motion: no-preference) {
1678+
.lv-dot { animation: lv-pulse 2s ease-out infinite; }
1679+
@keyframes lv-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--live) 55%, transparent); } 100% { box-shadow: 0 0 0 9px transparent; } }
1680+
}
1681+
.lv-line { display: flex; align-items: center; gap: 6px; min-width: 0; flex: 1; white-space: nowrap; overflow: hidden; }
1682+
.lv-what { display: inline-flex; align-items: baseline; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
1683+
.lv-line time, .ac-list time { color: var(--muted); font-size: 13px; flex-shrink: 0; margin-left: 4px; }
1684+
.lv-more { flex-shrink: 0; font-size: 13.5px; font-weight: 700; color: var(--accent); text-decoration: none; }
1685+
.lv-more:hover { text-decoration: underline; }
1686+
.ac-who { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; color: var(--ink); text-decoration: none; flex-shrink: 0; }
1687+
.ac-who:hover { text-decoration: underline; }
1688+
.ac-repo { all: unset; cursor: pointer; font-weight: 700; color: var(--ink); margin-left: 4px; }
1689+
span.ac-repo { cursor: default; }
1690+
button.ac-repo:hover { text-decoration: underline; }
1691+
.ac-repo:focus-visible, .ac-who:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
1692+
.ac-verb { color: var(--ink); }
1693+
.ac-title { margin-left: 6px; color: var(--muted); text-decoration: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1694+
a.ac-title:hover { text-decoration: underline; }
1695+
.lv-what .ac-title { display: none; }
1696+
@media (max-width: 760px) {
1697+
.live { flex-wrap: wrap; }
1698+
.lv-line { flex-basis: 100%; order: 3; }
1699+
.lv-more { margin-left: auto; }
1700+
}
1701+
.activity { margin-top: 12px; padding: 18px 20px; border-radius: 20px; background: var(--surface); }
1702+
.activity[hidden] { display: none; }
1703+
.ac-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
1704+
.ac-head h3 { font-size: 17px; }
1705+
.ac-head p { font-size: 14px; color: var(--muted); }
1706+
.ac-people { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; margin-top: 12px; }
1707+
.ac-n { font-size: 14px; color: var(--muted); }
1708+
.ac-n b { font-size: 20px; color: var(--ink); margin-right: 2px; }
1709+
.ac-people ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; }
1710+
.ac-people li .ac-who { padding: 3px 10px 3px 3px; border-radius: 999px; background: var(--surface-2); font-size: 13.5px; }
1711+
.ac-list { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 0; }
1712+
.ac-list li { display: flex; align-items: baseline; gap: 6px; padding: 9px 0; border-top: 1px solid var(--rule); font-size: 14px; min-width: 0; }
1713+
.ac-list li .ac-who { align-self: center; }
1714+
.ac-what { display: flex; align-items: baseline; min-width: 0; flex: 1; overflow: hidden; white-space: nowrap; }
1715+
.ac-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin-top: 12px; font-size: 12.5px; color: var(--muted); }
1716+
@media (max-width: 760px) {
1717+
.ac-list li { flex-wrap: wrap; }
1718+
.ac-what { flex-basis: 100%; white-space: normal; flex-wrap: wrap; }
1719+
.ac-title { white-space: normal; }
1720+
}
1721+
.loop { list-style: none; margin: 0 0 14px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; counter-reset: none; position: relative; }
1722+
.loop > li > a { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 14px 16px; border-radius: 16px; background: var(--surface); color: var(--ink); text-decoration: none; position: relative; }
1723+
.loop > li > a:hover { box-shadow: 0 6px 20px rgba(20, 22, 43, .08); }
1724+
.loop > li > a:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
1725+
.loop > li:not(.lp-back):not(:nth-child(4)) > a::after { content: "›"; position: absolute; right: -10px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 13px; font-weight: 800; display: grid; place-items: center; z-index: 1; line-height: 1; }
1726+
.lp-n { font-family: var(--f-display); font-size: 22px; font-weight: 800; color: var(--accent); line-height: 1; }
1727+
.loop b { font-size: 15.5px; margin-top: 4px; }
1728+
.loop a span:last-child { font-size: 13.5px; color: var(--muted); }
1729+
.lp-back { grid-column: 1 / -1; padding: 8px 14px; border-radius: 12px; border: 1.5px dashed color-mix(in srgb, var(--accent) 45%, var(--rule)); color: var(--muted); font-size: 13.5px; text-align: center; }
1730+
@media (max-width: 760px) {
1731+
.loop { grid-template-columns: repeat(2, minmax(0, 1fr)); }
1732+
.loop > li:nth-child(2) > a::after { display: none; }
1733+
}
1734+
#join .steps li::before { display: none; }

0 commit comments

Comments
 (0)