@@ -12,15 +12,14 @@ import {
1212 useLocation ,
1313} from '@solidjs/router' ;
1414import { createEffect , For , lazy , Suspense } from 'solid-js' ;
15- import { Link } from './components/article' ;
16- import { Btn } from './components/button' ;
15+ import { Btn , Link } from './components/button' ;
1716import { Icon } from './components/icon' ;
1817import { Links } from './ts/enum' ;
1918import { hasOwn , locales , setStore , store , t } from './ts/util' ;
2019import { map } from './ts/util' ;
2120import { navs } from './ts/nav' ;
2221
23- function NavToggler ( ) {
22+ function MiniNav ( ) {
2423 return (
2524 < Btn
2625 type = "dropdown"
@@ -36,7 +35,11 @@ function NavToggler() {
3635 < For each = { e . items } >
3736 { ( e ) => (
3837 < li >
39- < Link path = { e . path } > { e . text } </ Link >
38+ < Link
39+ class = "no-underline"
40+ path = { e . path }
41+ children = { e . text }
42+ />
4043 </ li >
4144 ) }
4245 </ For >
@@ -47,7 +50,7 @@ function NavToggler() {
4750 </ Btn >
4851 ) ;
4952}
50- function NavBtns ( ) {
53+ function TopNav ( ) {
5154 return (
5255 < div class = "hidden md:flex" >
5356 < For each = { navs } >
@@ -56,7 +59,7 @@ function NavBtns() {
5659 < For each = { e . items } >
5760 { ( e ) => (
5861 < li >
59- < Link class = "justify-between" path = { e . path } >
62+ < Link class = "no-underline justify-between" path = { e . path } >
6063 < section >
6164 < h2 class = "font-bold" > { e . text } </ h2 >
6265 < p > { e . desc } </ p >
@@ -74,18 +77,14 @@ function NavBtns() {
7477 </ div >
7578 ) ;
7679}
77- function NavLinks ( ) {
80+ function FooterNav ( ) {
7881 return (
7982 < For each = { navs } >
8083 { ( e ) => (
81- < nav >
84+ < nav class = "" >
8285 < h6 class = "footer-title" > { e . text } </ h6 >
8386 < For each = { e . items } >
84- { ( e ) => (
85- < A class = "link link-hover" href = { e . path } >
86- { e . text }
87- </ A >
88- ) }
87+ { ( e ) => < Link class = "link-hover" path = { e . path } children = { e . text } /> }
8988 </ For >
9089 </ nav >
9190 ) }
@@ -100,16 +99,16 @@ function App(p: RouteSectionProps) {
10099 } ) ;
101100 return (
102101 < div class = "flex flex-col h-screen" >
103- < nav class = "navbar shadow-md " >
102+ < nav class = "navbar absolute z-1 " >
104103 < div class = "navbar-start" >
105- < NavToggler />
104+ < MiniNav />
106105 < Btn
107106 type = "link"
108107 path = "/"
109- class = "font-title text-base-content text- lg md:text-2xl"
108+ class = "font-title text-lg md:text-2xl"
110109 text = { t ( 'logo:bluebones' ) }
111110 />
112- < NavBtns />
111+ < TopNav />
113112 </ div >
114113 < div class = "navbar-end" >
115114 < Btn type = "link" path = { Links . donate . path } >
@@ -123,12 +122,11 @@ function App(p: RouteSectionProps) {
123122 icon = { Links . GitHub . icon }
124123 />
125124 < Btn type = "swap" class = "btn-square" >
126- { /*TODO: use store.theme to replace theme controller */ }
127125 < input
128126 type = "checkbox"
129127 class = "theme-controller"
130- value = "dark "
131- checked = { import . meta. env . DEV ? true : store . theme === 'dark ' }
128+ value = "night "
129+ checked = { import . meta. env . DEV ? true : store . theme === 'night ' }
132130 />
133131 < Icon class = "swap-on" children = { mdiWeatherSunny } />
134132 < Icon class = "swap-off" children = { mdiWeatherNight } />
@@ -157,19 +155,16 @@ function App(p: RouteSectionProps) {
157155 < main class = "flex-1" >
158156 < Suspense fallback = { < p > Loading...</ p > } children = { p . children } />
159157 </ main >
160- < footer class = "footer sm:footer-horizontal bg-neutral text-neutral-content p-10" >
158+ < footer class = "footer footer-horizontal sm:footer-vertical footer-center bg-neutral text-neutral-content p-10" >
159+ < FooterNav />
161160 < aside >
162161 < Icon
163162 class = "invert brightness-0"
164163 size = { 48 }
165164 children = "/icon/favicon.ico"
166165 />
167- < p > ©{ new Date ( ) . getFullYear ( ) } Bluebones Team</ p >
168- < a href = "http://beian.miit.gov.cn/" target = "_blank" >
169- 赣ICP备2024021771号
170- </ a >
166+ < p > © { new Date ( ) . getFullYear ( ) } Bluebones Team</ p >
171167 </ aside >
172- < NavLinks />
173168 </ footer >
174169 </ div >
175170 ) ;
@@ -209,5 +204,5 @@ import.meta.env.DEV
209204 *=+++++%
210205` ,
211206 'color:#03a9f4;' ,
212- `\n都来这了,不考虑加入我们吗 ? ${ window . location . origin } /join` ,
207+ `\n都来这了,不考虑加入吗 ? ${ window . location . origin } /join` ,
213208 ) ;
0 commit comments