@@ -20,42 +20,49 @@ export function ChatAreaContainer(props: {
2020 < aside
2121 className = { clsx (
2222 // モバイルでは全画面表示する
23- "fixed inset-0 pt-20 bg-base-100" ,
23+ "fixed inset-0 bg-base-100" ,
2424 // PCではスクロールで動かない右サイドバー
25- "has-chat-1:sticky has-chat-1:top-16 has-sidebar:top-0 has-chat-1:pt-4" ,
25+ // 左にサイドバーがない=navvarがある とき、navbar分のスペースをあける(top-16, h-[100vh-4rem])
26+ "has-chat-1:sticky has-chat-1:top-16 has-sidebar:top-0" ,
2627 "has-chat-1:basis-2/5 has-chat-1:max-w-chat-area has-chat-1:h-[calc(100vh-4rem)] has-sidebar:h-screen" ,
2728 "has-chat-1:shadow-md has-chat-1:bg-base-200" ,
2829 // navbar(z-40)よりは下、ChatListForSectionのdropdown(デフォルトでz-999だがz-30に変えている)よりも上
29- "z-35" ,
30- "p-4 pb-16" ,
31- "flex flex-col" ,
32- "overflow-y-auto"
30+ "z-35"
3331 ) }
3432 >
35- < ChatAreaStateUpdater chatId = { props . chatId } />
36- < div className = "flex flex-row items-center" >
37- < span className = "flex-1 text-base font-bold opacity-40" >
38- AIへの質問
39- </ span >
40- < Link className = "btn btn-ghost" href = "/chat" scroll = { false } >
41- < svg
42- className = "w-8 h-8 -scale-x-100"
43- viewBox = "0 0 24 24"
44- fill = "none"
45- xmlns = "http://www.w3.org/2000/svg"
46- >
47- < path
48- d = "M18 17L13 12L18 7M11 17L6 12L11 7"
49- stroke = "currentColor"
50- strokeWidth = "1.5"
51- strokeLinecap = "round"
52- strokeLinejoin = "round"
53- />
54- </ svg >
55- < span className = "text-lg" > 閉じる</ span >
56- </ Link >
33+ < div className = "absolute inset-x-0 bottom-0 h-16 bg-linear-to-t from-base-200 to-base-200/0 z-1" />
34+ < div
35+ className = { clsx (
36+ "p-4 pb-16" ,
37+ "pt-20 has-chat-1:pt-4" ,
38+ "h-full flex flex-col overflow-y-auto"
39+ ) }
40+ >
41+ < ChatAreaStateUpdater chatId = { props . chatId } />
42+ < div className = "flex flex-row items-center" >
43+ < span className = "flex-1 text-base font-bold opacity-40" >
44+ AIへの質問
45+ </ span >
46+ < Link className = "btn btn-ghost" href = "/chat" scroll = { false } >
47+ < svg
48+ className = "w-8 h-8 -scale-x-100"
49+ viewBox = "0 0 24 24"
50+ fill = "none"
51+ xmlns = "http://www.w3.org/2000/svg"
52+ >
53+ < path
54+ d = "M18 17L13 12L18 7M11 17L6 12L11 7"
55+ stroke = "currentColor"
56+ strokeWidth = "1.5"
57+ strokeLinecap = "round"
58+ strokeLinejoin = "round"
59+ />
60+ </ svg >
61+ < span className = "text-lg" > 閉じる</ span >
62+ </ Link >
63+ </ div >
64+ { props . children }
5765 </ div >
58- { props . children }
5966 </ aside >
6067 ) ;
6168}
0 commit comments