Skip to content

Commit 0209ac9

Browse files
committed
chore: updates from base repo
1 parent 06e0499 commit 0209ac9

File tree

3 files changed

+12
-8
lines changed

3 files changed

+12
-8
lines changed

src/components/Sidebar.jsx

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ export function Sidebar({ items = [] } = {}) {
1717
function SidebarItem({ item, active }) {
1818
return (
1919
<li class="w-fit">
20-
<a href={"/" + item.key} class="group text-zinc-600">
20+
<a
21+
href={"/" + item.key}
22+
class={`group text-zinc-400 hover:text-zinc-600 ${
23+
active ? "text-zinc-600" : ""}`}
24+
>
2125
{item.label}
2226
<span
2327
class={`block max-w-0 group-hover:max-w-full transition-all duration-500 h-0.5 bg-black ${

src/layouts/base.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,18 @@ export default function BaseLayout({ children, sideBarItems = [] }) {
1414
<small>We make tiny things</small>
1515
</p>
1616
</header>
17-
<main class="flex gap-10">
18-
<aside id="sidebar" class="flex-none text-sm">
17+
<main class="flex flex-col gap-12 sm:flex-row">
18+
<aside id="sidebar" class="flex-1 text-sm">
1919
<Sidebar
2020
items={Object.values(sideBarItems).sort(
2121
(x, y) => x.order - y.order
2222
)}
2323
initialValue={Object.keys(sideBarItems)[0]}
2424
/>
2525
</aside>
26-
<article class="flex-1 prose text-zinc-700">{children}</article>
26+
<article class="w-full md:w-[75%] prose text-zinc-700">
27+
{children}
28+
</article>
2729
</main>
2830
</div>
2931
<footer class="p-2 mx-auto max-w-4xl border-t border-t-zinc">

src/main.jsx

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import { render } from "preact";
21
import {
32
ErrorBoundary,
43
LocationProvider,
@@ -33,15 +32,14 @@ export const prerender = async (data) => {
3332
data: { url: data.url },
3433
head: {
3534
lang: "en",
36-
title: "PreachJS | Tiny preact libraries",
35+
title: "Docs with preact",
3736
elements: new Set([]),
3837
},
3938
};
4039
};
4140

4241
if (typeof window !== "undefined") {
43-
const mounter = import.meta.env.PROD ? hydrate : render;
44-
mounter(<Main />, document.getElementById("app"));
42+
hydrate(<Main />, document.getElementById("app"));
4543
}
4644

4745
function mapPagesToRoutes(routes) {

0 commit comments

Comments
 (0)