T46a Site · Owner's notes: short story names, aligned icons, a whole city title, tighter story tops, hidden scroll bars, a tablet step at 1024
This commit is contained in:
1 parent
9079b21bdb
commit
ac1a869fb5
9 files changed
+45
-29
No files matched your search
@@ -2,6 +2,8 @@ import manifest from "../../examples/gallery/stories.json";
|
||||
|
||||
export interface Story {
|
||||
title: string;
|
||||
/** The first component alone, as pages show it. */
|
||||
name: string;
|
||||
slug: string;
|
||||
components: string[];
|
||||
}
|
||||
@@ -14,7 +16,10 @@ export interface Chapter {
|
||||
stories: Story[];
|
||||
}
|
||||
|
||||
export const chapters: Chapter[] = manifest.pages;
|
||||
export const chapters: Chapter[] = manifest.pages.map((c) => ({
|
||||
...c,
|
||||
stories: c.stories.map((s) => ({ ...s, name: s.title.split(/ \/ | · | → | \(/)[0].trim() })),
|
||||
}));
|
||||
|
||||
export const componentCount = new Set(chapters.flatMap((c) => c.stories.flatMap((s) => s.components))).size;
|
||||
|
||||
|
||||
Reference in new issue
Block a user