diff --git a/app/components/ColorScheme/Img.vue b/app/components/ColorScheme/Img.vue new file mode 100644 index 0000000000..e0d662800a --- /dev/null +++ b/app/components/ColorScheme/Img.vue @@ -0,0 +1,20 @@ + + + + + + + diff --git a/app/components/Landing/IntroHeader.vue b/app/components/Landing/IntroHeader.vue new file mode 100644 index 0000000000..1af2f03386 --- /dev/null +++ b/app/components/Landing/IntroHeader.vue @@ -0,0 +1,138 @@ + + + + + + {{ $t('alt_logo') }} + + + + + {{ env === 'release' ? 'alpha' : env }} + + + + + + {{ $t('tagline') }} + + + diff --git a/app/components/LandingLogo.vue b/app/components/LandingLogo.vue deleted file mode 100644 index 6fa385c2c6..0000000000 --- a/app/components/LandingLogo.vue +++ /dev/null @@ -1,76 +0,0 @@ - - - - - - - - - - {{ env === 'release' ? 'alpha' : env }} - - - - {{ $t('tagline') }} - - - diff --git a/app/components/Noodle/Artemis/Logo.vue b/app/components/Noodle/Artemis/Logo.vue new file mode 100644 index 0000000000..3c20aa1ad0 --- /dev/null +++ b/app/components/Noodle/Artemis/Logo.vue @@ -0,0 +1,19 @@ + + + + + + diff --git a/app/components/Noodle/Kawaii/Logo.vue b/app/components/Noodle/Kawaii/Logo.vue new file mode 100644 index 0000000000..861ba291cb --- /dev/null +++ b/app/components/Noodle/Kawaii/Logo.vue @@ -0,0 +1,8 @@ + + + diff --git a/app/components/Noodle/index.ts b/app/components/Noodle/index.ts new file mode 100644 index 0000000000..3ec094b406 --- /dev/null +++ b/app/components/Noodle/index.ts @@ -0,0 +1,47 @@ +import NoodleKawaiiLogo from './Kawaii/Logo.vue' +import NoodleArtemisLogo from './Artemis/Logo.vue' +// import NoodleTkawaiiLogo from './Tkawaii/Logo.vue' + +export type Noodle = { + // Unique identifier for the noodle + key: string + // Timezone for the noodle (default is auto, i.e. user's timezone) + timezone?: string + // Date for the noodle + date?: string + // Logo for the noodle - could be any component. Relative parent - intro section + logo: Component + // Show npmx tagline or not (default is true) + tagline?: boolean +} + +// Archive noodles - might be shown on special page +// export const ARCHIVE_NOODLES: Noodle[] = [ +// { +// key: 'tkawaii', +// date: '2026-04-08T12:00:00UTC', +// timezone: 'auto', +// logo: NoodleTkawaiiLogo, +// tagline: false, +// }, +// ] + +// Permanent noodles - always shown on specific query param (e.g. ?kawaii) +export const PERMANENT_NOODLES: Noodle[] = [ + { + key: 'kawaii', + logo: NoodleKawaiiLogo, + tagline: false, + }, +] + +// Active noodles - shown based on date and timezone +export const ACTIVE_NOODLES: Noodle[] = [ + { + key: 'artemis', + logo: NoodleArtemisLogo, + date: '2026-04-08T12:00:00Z', + timezone: 'America/Los_Angeles', + tagline: true, + }, +] diff --git a/app/pages/index.vue b/app/pages/index.vue index 48c5575b00..c73c261d83 100644 --- a/app/pages/index.vue +++ b/app/pages/index.vue @@ -26,11 +26,11 @@ defineOgImageComponent('Default', { - + - + + + + + + + + + + + + + + + + + + + + diff --git a/public/extra/npmx-light-artemis.svg b/public/extra/npmx-light-artemis.svg new file mode 100644 index 0000000000..72cb09b6c0 --- /dev/null +++ b/public/extra/npmx-light-artemis.svg @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/test/nuxt/a11y.spec.ts b/test/nuxt/a11y.spec.ts index 64092a6d8c..b028e55564 100644 --- a/test/nuxt/a11y.spec.ts +++ b/test/nuxt/a11y.spec.ts @@ -160,7 +160,9 @@ import { BlueskyPostEmbed, BuildEnvironment, ButtonBase, - LandingLogo, + LandingIntroHeader, + NoodleKawaiiLogo, + NoodleArtemisLogo, LinkBase, CallToAction, CodeDirectoryListing, @@ -354,9 +356,23 @@ describe('component accessibility audits', () => { }) }) - describe('LandingLogo', () => { + describe('LandingIntroHeader', () => { it('should have no accessibility violations', async () => { - const component = await mountSuspended(LandingLogo) + const component = await mountSuspended(LandingIntroHeader) + const results = await runAxe(component) + expect(results.violations).toEqual([]) + }) + }) + + describe('Noodles', () => { + it('should have no accessibility violations', async () => { + const component = await mountSuspended(NoodleKawaiiLogo) + const results = await runAxe(component) + expect(results.violations).toEqual([]) + }) + + it('should have no accessibility violations', async () => { + const component = await mountSuspended(NoodleArtemisLogo) const results = await runAxe(component) expect(results.violations).toEqual([]) }) diff --git a/test/unit/a11y-component-coverage.spec.ts b/test/unit/a11y-component-coverage.spec.ts index 1029590fd1..f196dcd379 100644 --- a/test/unit/a11y-component-coverage.spec.ts +++ b/test/unit/a11y-component-coverage.spec.ts @@ -52,6 +52,7 @@ const SKIPPED_COMPONENTS: Record = { 'SkeletonInline.vue': 'Already covered indirectly via other component tests', 'Button/Group.vue': "Wrapper component, tests wouldn't make much sense here", 'Translation/StatusByFile.unused.vue': 'Unused component, might be needed in the future', + 'ColorScheme/Img.vue': 'Image component, basic ui', } function normalizeComponentPath(filePath: string): string {
+ {{ $t('tagline') }} +
- {{ $t('tagline') }} -