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
8 changes: 4 additions & 4 deletions .agents/skills/add-a-custom-badge/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Ask for anything missing; never guess it. The "Badge request" issue form asks fo

| What | Why |
| --- | --- |
| Each person's GitHub username and role (`creator`, `co-creator`, `maintainer` or `organizer`) | who wears it |
| Each person's GitHub username and role (`creator`, `co-creator`, `founder`, `co-founder`, `maintainer`, `organizer` or `lead organizer`) | who wears it |
| Project name | the tooltip |
| Website, its main page | where the badge links |
| GitHub repository (required for a library or a tool) | to check the project and the role |
Expand All @@ -39,8 +39,8 @@ Done when every row not marked optional has an answer (the repository only for a
] },
```

- **`badge`.** Two or three words, playful, about what the project does ("Analog alchemist", "Icon smith", "Slide master"). Use a word other badges don't already use. Don't use the plain role ("Creator"): the one exception is the badge of Angularians' own creator.
- **`tone`.** The project's name in kebab case. Add its colours to `app/src/app/profile/badge-pill.css`, after the other projects, built from the brand colour `C` like theirs: `--pill-bg: color-mix(in oklab, C 10%, transparent)`, `--pill-text: L`, `--pill-ring: color-mix(in oklab, C 30%, transparent)` in `.tone-<project>`, then `--pill-text: D` and `--pill-ring: color-mix(in oklab, C 40%, transparent)` in `:host-context(.dark) .tone-<project>`. `L` is `C` darkened until it has 4.5:1 contrast on white. `D` is `C` lightened until it has 4.5:1 on `#0a0a0a`.
- **`badge`.** Two or three words, playful, about what the project does ("Analog alchemist", "Icon smith", "Slide master"). Use a word other badges don't already use. Don't use the plain role ("Creator"): the one exception is the badge of Angularians' own creator. A conference or a community is different: its badge is its real name and the role ("NG Poland organizer"), never a joke, with `badgeIsOfficial: true`.
- **`tone`.** The project's name in kebab case. Add its colours to `app/src/app/profile/badge-pill.css`, after the other projects, built from the brand colour `C` like theirs: `--pill-bg: color-mix(in oklab, C 10%, transparent)`, `--pill-text: L`, `--pill-ring: color-mix(in oklab, C 30%, transparent)` in `.tone-<project>`, then `--pill-text: D` and `--pill-ring: color-mix(in oklab, C 40%, transparent)` in `:host-context(.dark) .tone-<project>`. `L` is `C` darkened until it has 4.5:1 contrast on white. `D` is `C` lightened until it has 4.5:1 on `#0a0a0a`. Add the same `C` and `D` to `TAG_COLORS` in `app/src/server/card/tag-colors.ts`: the card has no theme.
- **`builtOn`.** Leave it out. It is only for the tools Angularians itself runs on.
4. **Notices.** Add the logo's credit to `THIRD_PARTY_NOTICES.md`, under "Credited logos".
5. **Data.** Leave `data/` as the collector wrote it.
Expand All @@ -59,7 +59,7 @@ pnpm dev
With `pnpm dev` running, open:
- `/<username>`: the badge shows with the logo and title, its tooltip reads "<Role> of <Project>", and clicking it opens the website.
- Both themes, and phone width.
- `/<username>/card.png`: the logo shows in the card's footer.
- `/<username>/card.png`: the badge shows under the stats, with its logo, title and colour.

Done when the test, typecheck and build pass and each page above shows the badge as described.

Expand Down
2 changes: 1 addition & 1 deletion .agents/skills/add-a-translator/SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ Done when you hold the footer link, the date of the angular/angular commit that
## 2. Add it

1. Get each id: `gh api users/<username> -q .id`.
2. A new translation: an entry in `TRANSLATIONS`, in the footer's order, with `language` in that language, its `code` and `flag` (a country in `COUNTRIES` of `shared/src/countries.ts`), `site`, `repository` and `joinedAt` (the day the footer commit landed: its committer date), and its `.tone-lang-<code>` in `badge-pill.css`, built from the flag's main colour as the other languages' are, added to the dark `:is()` list above them too. A new translator: `{ githubId: <id>, username: '<username>' }` in its `translators`, with `helper: true` unless they lead it (their badge then says contributor, and they score 10).
2. A new translation: an entry in `TRANSLATIONS`, in the footer's order, with `language` in that language, its `code` and `flag` (a country in `COUNTRIES` of `shared/src/countries.ts`), `site`, `repository` and `joinedAt` (the day the footer commit landed: its committer date), and its `.tone-lang-<code>` in `badge-pill.css`, built from the flag's main colour as the other languages' are, added to the dark `:is()` list above them too, and to `TAG_COLORS` in `app/src/server/card/tag-colors.ts` for the card. If its name uses letters the card cannot draw yet, the card says only "Translator": `DRAWABLE` and `TAG_FONTS` in `app/src/server/card/tag-fonts.ts` need it (for Korean, Japanese or Chinese, a font from Google Fonts with `text=` set to the name, kept in `app/src/server/card/fonts`). A new translator: `{ githubId: <id>, username: '<username>' }` in its `translators`, with `helper: true` unless they lead it (their badge then says contributor, and they score 10).
3. Update the list's "as of <month year>" line.

Done when the ids are in, `pnpm test` passes, and `/<username>` with `pnpm dev` shows "<language> translator" (or "<language> contributor" for a helper).
Expand Down
3 changes: 3 additions & 0 deletions .github/ISSUE_TEMPLATE/badge-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,11 @@ body:
options:
- Creator
- Co-creator
- Founder
- Co-founder
- Maintainer
- Organizer
- Lead organizer
validations:
required: true
- type: textarea
Expand Down
5 changes: 4 additions & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ MIT, Copyright (c) 2026 HatScripts. The full licence ships with the package.

- [Manrope](https://github.com/sharanda/manrope), the site's font: SIL Open Font License 1.1, Copyright 2019 The Manrope
Project Authors, through `@fontsource-variable/manrope` (and, for the cards, `app/src/server/card/fonts`).
- [Noto Sans KR, JP, SC and TC](https://fonts.google.com/noto), for the language names on the cards: SIL Open Font License 1.1, Copyright 2014-2021 Adobe, reduced by Google Fonts to the letters used, in `app/src/server/card/fonts`.
- [cobe](https://github.com/shuding/cobe), the globe: MIT, Copyright (c) 2021 Shu Ding.
- [satori](https://github.com/vercel/satori) and [resvg-js](https://github.com/yisibl/resvg-js), which draw the cards:
MPL 2.0, unmodified.
Expand All @@ -127,7 +128,9 @@ The special badges also show, unchanged, the marks of Pangular Inspector (https:

The badges of Ashley Hunter's Angular Native (https://ng-native.com) and Angular Primitives
(https://angularprimitives.com) show their marks, unchanged, in `app/public/credits/`. Santosh Yadav's ngx-builders
(https://github.com/ngx-builders) shows its GitHub organization avatar, unchanged.
(https://github.com/ngx-builders) shows its GitHub organization avatar, unchanged. The badges of NG Baguette (https://ngbaguette.angulardevs.fr) and Angular
Devs France (https://angulardevs.fr) show their logos, reduced to 256 pixels (NG Baguette's white logo on a dark tile, so it shows in both themes), and OpenNG (https://www.openng.org) its GitHub
organization avatar. NG Poland (https://ng-poland.pl) and NG Asia (https://ng-asia.org) show the mark their own sites use, and NG Tunisia (https://ng-tunisia.org) its logo, reduced to 256 pixels. Angular Space (https://www.angularspace.com) shows its site icon, unchanged, and Angular Wrocław (https://www.meetup.com/angularwroclaw/) the shield from its Meetup banner.

## Data

Expand Down
Binary file added app/public/credits/angular-devs-france.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/credits/angular-space.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/credits/angular-wroclaw.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/credits/ng-asia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/credits/ng-baguette.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/credits/ng-poland.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/credits/ng-tunisia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/public/credits/openng.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions app/src/app/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,4 @@
</main>
<app-site-footer />
<app-hammer-strike />
<app-angie-intro />
3 changes: 2 additions & 1 deletion app/src/app/app.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
import { isPlatformBrowser, Location } from '@angular/common';
import { afterNextRender, Component, DestroyRef, inject, Injector, PLATFORM_ID, signal } from '@angular/core';
import { NavigationEnd, NavigationStart, Router, RouterOutlet } from '@angular/router';
import { AngieIntro } from './layout/angie-intro';
import { HammerStrike } from './layout/hammer-strike';
import { SiteFooter } from './layout/site-footer';
import { SiteHeader } from './layout/site-header';
import { ThemeService } from './theme.service';

@Component({
selector: 'app-root',
imports: [HammerStrike, RouterOutlet, SiteFooter, SiteHeader],
imports: [AngieIntro, HammerStrike, RouterOutlet, SiteFooter, SiteHeader],
templateUrl: './app.html',
styleUrl: './app.css',
})
Expand Down
26 changes: 26 additions & 0 deletions app/src/app/layout/angie-intro.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
.sponsor {
border: 1px solid var(--github-red);
color: var(--github-red);
background-color: color-mix(in oklab, var(--github-red) 12%, transparent);
}

.sponsor:hover {
background-color: color-mix(in oklab, var(--github-red) 22%, transparent);
}

.quiet {
justify-self: center;
font-size: var(--text-xs);
color: var(--muted-foreground);
text-decoration: underline;
text-underline-offset: 2px;
}

.quiet:hover {
color: var(--foreground);
}

.quiet:focus-visible {
outline: 2px solid var(--ring);
outline-offset: 2px;
}
21 changes: 21 additions & 0 deletions app/src/app/layout/angie-intro.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<hlm-dialog [state]="state()" [closeOnOutsidePointerEvents]="false" [disableClose]="true" (stateChanged)="closeWhenDismissed($event)">
<hlm-dialog-content *hlmDialogPortal [showCloseButton]="canClose()" class="max-h-[90dvh] overflow-y-auto sm:max-w-md">
<hlm-dialog-header class="items-center text-center">
<img src="/angie/angie-hammer.png" alt="" width="112" height="112" class="size-28 translate-x-3" />
<h2 hlmDialogTitle>That was Angie</h2>
<p hlmDialogDescription>She is <a [href]="pressKitUrl" target="_blank" rel="noopener" class="font-medium text-foreground underline underline-offset-2">Angular’s official mascot</a>. Here she guards <span class="brand text-primary">ng-halla</span>, the hall of every <span class="brand text-primary">Angularian</span>. Click that word or a logo and she comes back.</p>
</hlm-dialog-header>
<p class="text-center text-sm text-pretty text-muted-foreground" aria-live="polite">
@if (starred()) {
If you can, a sponsor helps pay for the hosting and keeps the hall open.
} @else {
It is free, has no ads and is run by <a [href]="authorUrl" target="_blank" rel="noopener" class="font-medium text-foreground underline underline-offset-2">one maintainer</a>. A star helps other <span class="ml-0.5 inline-flex items-baseline gap-1 font-medium whitespace-nowrap text-foreground"><app-angular-logo class="size-[1.1em] self-center" />Angular</span> developers find it, and a sponsor helps pay for the hosting.
}
</p>
<div class="grid gap-2 sm:grid-cols-2">
<a hlmBtn [variant]="starred() ? 'secondary' : 'default'" [href]="repoUrl" target="_blank" rel="noopener" (click)="markStarred()"><ng-icon [name]="starIcon()" aria-hidden="true" /> {{ starLabel() }}</a>
<a hlmBtn variant="ghost" class="sponsor" [href]="sponsorUrl" target="_blank" rel="noopener"><ng-icon name="remixHeartLine" aria-hidden="true" /> Sponsor</a>
</div>
<button type="button" class="quiet" (click)="turnOff()">Too loud? Turn off Angie’s lightning</button>
</hlm-dialog-content>
</hlm-dialog>
31 changes: 31 additions & 0 deletions app/src/app/layout/angie-intro.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
import { TestBed } from '@angular/core/testing'
import { vi } from 'vitest'
import { AngieIntro } from './angie-intro'
import { AngieService } from './angie.service'

describe('AngieIntro', () => {
beforeEach(() => {
localStorage.clear()
vi.useFakeTimers()
})

afterEach(() => vi.useRealTimers())

it('offers the close button five seconds after it opens', () => {
const fixture = TestBed.createComponent(AngieIntro)
const canClose = () => (fixture.componentInstance as unknown as { canClose(): boolean }).canClose()
TestBed.inject(AngieService).stormEnded()
TestBed.tick()
vi.advanceTimersByTime(4999)
expect(canClose()).toBe(false)
vi.advanceTimersByTime(1)
expect(canClose()).toBe(true)
})

it('thanks for the star', () => {
const intro = TestBed.createComponent(AngieIntro).componentInstance as unknown as { markStarred(): void, starLabel(): string }
expect(intro.starLabel()).toBe('Star on GitHub')
intro.markStarred()
expect(intro.starLabel()).toBe('Thanks for the star')
})
})
55 changes: 55 additions & 0 deletions app/src/app/layout/angie-intro.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
import { Component, computed, effect, inject, linkedSignal, signal } from '@angular/core'
import { NgIcon, provideIcons } from '@ng-icons/core'
import { remixCheckLine, remixHeartLine, remixStarLine } from '@ng-icons/remixicon'
import { HlmButton } from '@spartan-ng/helm/button'
import { HlmDialogImports } from '@spartan-ng/helm/dialog'
import { REPO_URL, SITE_AUTHOR, SPONSOR_URL } from '../site'
import { AngieService } from './angie.service'
import { AngularLogo } from './angular-logo'

const CLOSE_BUTTON_DELAY = 5000
const PRESS_KIT_URL = 'https://angular.dev/press-kit'

@Component({
selector: 'app-angie-intro',
imports: [AngularLogo, HlmButton, HlmDialogImports, NgIcon],
providers: [provideIcons({ remixCheckLine, remixHeartLine, remixStarLine })],
templateUrl: './angie-intro.html',
styleUrl: './angie-intro.css',
})
export class AngieIntro {
private readonly angie = inject(AngieService)
protected readonly state = computed(() => (this.angie.introOpen() ? 'open' : 'closed'))
protected readonly canClose = linkedSignal({ source: this.angie.introOpen, computation: () => false })
protected readonly starred = signal(false)
protected readonly starLabel = computed(() => (this.starred() ? 'Thanks for the star' : 'Star on GitHub'))
protected readonly starIcon = computed(() => (this.starred() ? 'remixCheckLine' : 'remixStarLine'))
protected readonly authorUrl = SITE_AUTHOR.url
protected readonly pressKitUrl = PRESS_KIT_URL
protected readonly repoUrl = REPO_URL
protected readonly sponsorUrl = SPONSOR_URL

constructor() {
this.revealCloseButtonLater()
}

protected closeWhenDismissed(state: string): void {
if (state === 'closed') this.angie.closeIntro()
}

protected markStarred(): void {
this.starred.set(true)
}

protected turnOff(): void {
this.angie.turnOff()
}

private revealCloseButtonLater(): void {
effect((onCleanup) => {
if (!this.angie.introOpen()) return
const timer = setTimeout(() => this.canClose.set(true), CLOSE_BUTTON_DELAY)
onCleanup(() => clearTimeout(timer))
})
}
}
53 changes: 53 additions & 0 deletions app/src/app/layout/angie.service.spec.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
import { TestBed } from '@angular/core/testing'
import { ANGIE_MET_KEY, ANGIE_OFF_KEY, AngieService } from './angie.service'

describe('AngieService', () => {
beforeEach(() => {
localStorage.clear()
TestBed.resetTestingModule()
})

it('is on by default', () => {
expect(TestBed.inject(AngieService).on()).toBe(true)
})

it('turns off and on, remembering only off', () => {
const angie = TestBed.inject(AngieService)
angie.toggle()
expect(angie.on()).toBe(false)
expect(localStorage.getItem(ANGIE_OFF_KEY)).toBe('1')
angie.toggle()
expect(angie.on()).toBe(true)
expect(localStorage.getItem(ANGIE_OFF_KEY)).toBeNull()
})

it('stays off on the next visit', () => {
localStorage.setItem(ANGIE_OFF_KEY, '1')
expect(TestBed.inject(AngieService).on()).toBe(false)
})

it('introduces her once, after the first storm', () => {
const angie = TestBed.inject(AngieService)
expect(angie.introOpen()).toBe(false)
angie.stormEnded()
expect(angie.introOpen()).toBe(true)
expect(localStorage.getItem(ANGIE_MET_KEY)).toBe('1')
angie.closeIntro()
angie.stormEnded()
expect(angie.introOpen()).toBe(false)
})

it('does not introduce her on a later visit', () => {
localStorage.setItem(ANGIE_MET_KEY, '1')
const angie = TestBed.inject(AngieService)
angie.stormEnded()
expect(angie.introOpen()).toBe(false)
})

it('does not introduce her once she is off', () => {
const angie = TestBed.inject(AngieService)
angie.toggle()
angie.stormEnded()
expect(angie.introOpen()).toBe(false)
})
})
68 changes: 68 additions & 0 deletions app/src/app/layout/angie.service.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
import { DOCUMENT, isPlatformBrowser } from '@angular/common'
import { effect, inject, PLATFORM_ID, Service, signal } from '@angular/core'

export const ANGIE_OFF_KEY = 'angularians-angie-off'
export const ANGIE_MET_KEY = 'angularians-angie-met'

@Service()
export class AngieService {
private readonly document = inject(DOCUMENT)
private readonly browser = isPlatformBrowser(inject(PLATFORM_ID))

private met = false

readonly on = signal(true)
readonly introOpen = signal(false)

constructor() {
if (!this.browser) return
this.restoreChoice()
this.markPage()
}

toggle(): void {
this.on.update(on => !on)
try {
if (this.on()) localStorage.removeItem(ANGIE_OFF_KEY)
else localStorage.setItem(ANGIE_OFF_KEY, '1')
}
catch {
// Not remembered, still applied.
}
}

stormEnded(): void {
if (!this.on() || this.met) return
this.met = true
this.introOpen.set(true)
try {
localStorage.setItem(ANGIE_MET_KEY, '1')
}
catch {
// Not remembered: she introduces herself again next visit.
}
}

turnOff(): void {
if (this.on()) this.toggle()
this.closeIntro()
}

closeIntro(): void {
this.introOpen.set(false)
}

private restoreChoice(): void {
try {
this.met = localStorage.getItem(ANGIE_MET_KEY) === '1'
if (localStorage.getItem(ANGIE_OFF_KEY) === '1') this.on.set(false)
}
catch {
// Storage can be blocked: on, the default.
}
}

private markPage(): void {
effect(() => this.document.documentElement.classList.toggle('angie-off', !this.on()))
}
}
46 changes: 46 additions & 0 deletions app/src/app/layout/github-stars.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
.repo {
width: calc(var(--spacing) * 9);
padding-inline: 0;
justify-content: center;
}

.divider,
.stars {
display: none;
}

.stars {
align-items: center;
gap: calc(var(--spacing) * 1);
font-size: var(--text-sm);
font-weight: 500;
font-variant-numeric: tabular-nums;
color: var(--muted-foreground);
}

.stars ng-icon {
color: var(--primary);
}

@media (width >= 40rem) {
.repo {
width: auto;
min-width: calc(var(--spacing) * 27);
gap: calc(var(--spacing) * 2);
border: 1px solid var(--border);
border-radius: 9999px;
padding-inline: calc(var(--spacing) * 3);
justify-content: center;
}

.divider {
display: block;
width: 1px;
height: calc(var(--spacing) * 4);
background-color: var(--border);
}

.stars {
display: inline-flex;
}
}
Loading
Loading