File tree Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Expand file tree Collapse file tree 3 files changed +12
-8
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,11 @@ export function Sidebar({ items = [] } = {}) {
1717function 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 ${
Original file line number Diff line number Diff 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" >
Original file line number Diff line number Diff line change 1- import { render } from "preact" ;
21import {
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
4241if ( 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
4745function mapPagesToRoutes ( routes ) {
You can’t perform that action at this time.
0 commit comments