diff --git a/templates/Story.tsx b/templates/Story.tsx index 21d8f83..8147908 100644 --- a/templates/Story.tsx +++ b/templates/Story.tsx @@ -42,6 +42,13 @@ export default (props: PropsWithChildren) => { })) ); + const isChapter = props.currentHref.includes("chapter="); + // FIXME: shouldn't be hardcoded + const currentURL = new URL( + "https://voltpad.ruthenic.com" + props.currentHref + ); + const chapterNum = currentURL.searchParams.get("chapter") ?? 0; + return ( @@ -80,6 +87,58 @@ export default (props: PropsWithChildren) => { + + + + + + + {isChapter ? ( + + ) : ( + + )} + + {isChapter ? ( + props.story.chapters[0].partJSON.photoUrl ? ( + + ) : undefined + ) : undefined} + + {isChapter ? ( + props.story.chapters[0].partJSON.videoId ? ( + + ) : undefined + ) : undefined} + + {isChapter ? undefined : ( + ", "\n") + } + /> + )} + {props.story.name} {(() => { if (!props.style) props.style = "";