got started on new look. pivoting to api implementations now

This commit is contained in:
Chris Kruining 2025-04-01 14:17:20 +02:00
parent aa12f5443c
commit 17e769c598
No known key found for this signature in database
GPG key ID: EB894A3560CCCAD2
29 changed files with 1080 additions and 136 deletions

View file

@ -1,4 +1,4 @@
import { Component, Index } from "solid-js";
import { Component, createEffect, createSignal, Index, onMount } from "solid-js";
import type { Entry, Category } from "../content";
import { ListItem } from "./list-item";
import { List } from "~/components/list";
@ -11,13 +11,21 @@ type OverviewProps = {
};
export const Overview: Component<OverviewProps> = (props) => {
const [container, setContainer] = createSignal<HTMLElement>();
onMount(() => {
new MutationObserver(() => {
container()?.querySelector(`.${css.list} > ul > div:nth-child(4) > main > a`)?.focus({ preventScroll: true });
}).observe(document.body, { subtree: true, childList: true });
});
return (
<div class={css.container}>
<Hero entry={props.highlight}></Hero>
<div ref={setContainer} class={css.container}>
<Hero class={css.hero} entry={props.highlight}></Hero>
<Index each={props.categories}>
{(category) => (
<List label={category().label} items={category().entries}>
<List class={css.list} label={category().label} items={category().entries}>
{(entry) => <ListItem entry={entry()} />}
</List>
)}