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
7 changes: 6 additions & 1 deletion .github/workflows/build-catalog.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,11 @@ on:
# workflow_dispatch: {}
# schedule:
# - cron: '17 3 * * *' # nightly
# push:
# branches: [main]
# paths:
# - scripts/fetch-catalog.mjs
# - docs/config.json

permissions:
contents: write
Expand Down Expand Up @@ -49,4 +54,4 @@ jobs:

git add docs/catalog.json
git commit -m "chore: update catalog"
git push
git push origin HEAD:main
28 changes: 22 additions & 6 deletions docs/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -773,13 +773,29 @@ function render(list) {
const language = repo.language ? `${langLabel}: ${repo.language}` : `${langLabel}: —`;
const updated = repo.updatedAt ? `${updatedLabel}: ${formatDate(repo.updatedAt)}` : `${updatedLabel}: —`;
const archived = repo.archived ? archivedLabel : '';
const starsValue = typeof repo.stargazersCount === 'number' ? repo.stargazersCount : null;
const forksValue = typeof repo.forksCount === 'number' ? repo.forksCount : null;
const stars = starsValue === null ? '' : `${starsLabel}: ${formatCount(starsValue)}`;
const forks = forksValue === null ? '' : `${forksLabel}: ${formatCount(forksValue)}`;
meta.textContent = [language, updated, stars, forks, archived].filter(Boolean).join(' • ');
meta.textContent = [language, updated, archived].filter(Boolean).join(' • ');

card.append(title, desc, meta);
const stats = document.createElement('div');
stats.className = 'stats';

const starsValue = toCount(repo.stargazersCount);
const forksValue = toCount(repo.forksCount);

const starStat = document.createElement('span');
starStat.className = 'stat';
starStat.textContent = `★ ${formatCount(starsValue)}`;
starStat.title = `${starsLabel}: ${formatCount(starsValue)}`;
starStat.setAttribute('aria-label', starStat.title);

const forkStat = document.createElement('span');
forkStat.className = 'stat';
forkStat.textContent = `⎇ ${formatCount(forksValue)}`;
forkStat.title = `${forksLabel}: ${formatCount(forksValue)}`;
forkStat.setAttribute('aria-label', forkStat.title);

stats.append(starStat, forkStat);

card.append(title, desc, meta, stats);

if (repo.topics?.length) {
const chips = document.createElement('div');
Expand Down
2 changes: 1 addition & 1 deletion docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,6 @@ <h1 class="title" data-i18n="org.title">Microsoft Cloud Sandbox - Unofficial</h1
</div>
</footer>

<script type="module" src="./app.js"></script>
<script type="module" src="./app.js?v=20260303"></script>
</body>
</html>
15 changes: 15 additions & 0 deletions docs/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,21 @@ body {
font-size: 12px;
}

.stats {
display: flex;
flex-wrap: wrap;
gap: 12px;
margin-top: 10px;
color: var(--muted);
font-size: 12px;
}

.stat {
display: inline-flex;
align-items: center;
gap: 6px;
}

.chips {
display: flex;
flex-wrap: wrap;
Expand Down