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 = [] } = {}) {
17
17
function SidebarItem ( { item, active } ) {
18
18
return (
19
19
< 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
+ >
21
25
{ item . label }
22
26
< span
23
27
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 = [] }) {
14
14
< small > We make tiny things</ small >
15
15
</ p >
16
16
</ 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" >
19
19
< Sidebar
20
20
items = { Object . values ( sideBarItems ) . sort (
21
21
( x , y ) => x . order - y . order
22
22
) }
23
23
initialValue = { Object . keys ( sideBarItems ) [ 0 ] }
24
24
/>
25
25
</ 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 >
27
29
</ main >
28
30
</ div >
29
31
< 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" ;
2
1
import {
3
2
ErrorBoundary ,
4
3
LocationProvider ,
@@ -33,15 +32,14 @@ export const prerender = async (data) => {
33
32
data : { url : data . url } ,
34
33
head : {
35
34
lang : "en" ,
36
- title : "PreachJS | Tiny preact libraries " ,
35
+ title : "Docs with preact" ,
37
36
elements : new Set ( [ ] ) ,
38
37
} ,
39
38
} ;
40
39
} ;
41
40
42
41
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" ) ) ;
45
43
}
46
44
47
45
function mapPagesToRoutes ( routes ) {
You can’t perform that action at this time.
0 commit comments