1
1
import { isOrgContent } from '@orgajs/orgx'
2
+
2
3
interface LayoutProps {
3
4
title : string
4
5
children : React . ReactNode
5
6
}
6
7
7
- export default function Layout ( { title, pages , children } : LayoutProps ) {
8
+ export default function Layout ( { title, children } : LayoutProps ) {
8
9
return (
9
10
< html >
10
11
< head >
11
12
< title > { title } </ title >
12
13
< link href = "/style.css" rel = "stylesheet" />
13
14
</ head >
14
- < body className = "min-h-screen flex flex-col" >
15
- < nav className = "p-2 bg-gray -100 border-b" >
15
+ < body className = "flex flex-col h-screen " >
16
+ < nav className = "p-2 bg-base -100 border-b" >
16
17
< ol className = "flex gap-4" >
17
18
< li >
18
19
< a href = "/" > Orga</ a >
@@ -28,21 +29,23 @@ export default function Layout({ title, pages, children }: LayoutProps) {
28
29
</ li >
29
30
</ ol >
30
31
</ nav >
31
- < main className = "flex-1 " >
32
+ < main className = "flex-grow flex-row overflow-hidden " >
32
33
{ isOrgContent ( children ) ? < Content > { children } </ Content > : children }
33
34
</ main >
34
- < footer className = "p-4 bg-gray-200" >
35
- < p > © 2021 Orga</ p >
35
+ < footer className = "flex justify-between p-2 bg-base-100 border-t" >
36
+ < div id = "minibuffer" className = "" > </ div >
37
+ < p > © 2025 Orga</ p >
36
38
</ footer >
39
+ < script type = "module" src = "/layout.js" />
37
40
</ body >
38
41
</ html >
39
42
)
40
43
}
41
44
42
45
export function DocumentLayout ( { title, pages, children } ) {
43
46
return (
44
- < div className = "flex h-full" >
45
- < aside className = "w-64 bg-gray-50 p-4 border-r" >
47
+ < div className = "flex h-full w-full " >
48
+ < aside className = "w-64 bg-gray-50 p-4 border-r h-full overflow-y-auto " >
46
49
< ul >
47
50
{ pages
48
51
. sort ( ( a , b ) => a . position - b . position )
@@ -67,5 +70,9 @@ export function DocumentLayout({ title, pages, children }) {
67
70
}
68
71
69
72
function Content ( { children } ) {
70
- return < article className = "prose p-4" > { children } </ article >
73
+ return (
74
+ < div className = "overflow-auto h-full w-full" >
75
+ < article className = "prose p-4" > { children } </ article >
76
+ </ div >
77
+ )
71
78
}
0 commit comments