feat: update header layout

This commit is contained in:
kunish 2023-08-28 22:28:30 +08:00
parent ad43bdaa9b
commit 07c82e87d8
No known key found for this signature in database
GPG Key ID: 647A12B4F782C430

View File

@ -5,6 +5,7 @@ import {
IconHome, IconHome,
IconNetwork, IconNetwork,
IconNetworkOff, IconNetworkOff,
IconPalette,
IconRuler, IconRuler,
IconSettings, IconSettings,
} from '@tabler/icons-solidjs' } from '@tabler/icons-solidjs'
@ -17,9 +18,8 @@ export const Header = () => {
const navigate = useNavigate() const navigate = useNavigate()
return ( return (
<div class="sticky inset-x-0 top-0 z-10 flex items-center rounded-md bg-base-200 px-4 py-2"> <ul class="menu rounded-box menu-horizontal sticky left-0 top-0 z-10 flex items-center justify-center gap-2 bg-base-200 p-2">
<Show when={location.pathname !== '/setup'}> <Show when={location.pathname !== '/setup'}>
<ul class="menu rounded-box menu-horizontal">
<li> <li>
<A class="tooltip tooltip-bottom" href="/" data-tip="Home"> <A class="tooltip tooltip-bottom" href="/" data-tip="Home">
<IconHome /> <IconHome />
@ -27,11 +27,7 @@ export const Header = () => {
</li> </li>
<li> <li>
<A <A class="tooltip tooltip-bottom" href="/proxies" data-tip="Proxies">
class="tooltip tooltip-bottom"
href="/proxies"
data-tip="Proxies"
>
<IconGlobe /> <IconGlobe />
</A> </A>
</li> </li>
@ -77,15 +73,14 @@ export const Header = () => {
<IconNetworkOff /> <IconNetworkOff />
</button> </button>
</li> </li>
</ul>
</Show> </Show>
<div class="drawer drawer-end ml-auto w-auto"> <div class="drawer drawer-end w-auto sm:ml-auto">
<input id="themes" type="checkbox" class="drawer-toggle" /> <input id="themes" type="checkbox" class="drawer-toggle" />
<div class="drawer-content"> <div class="drawer-content">
<label for="themes" class="btn drawer-button btn-sm m-2 uppercase"> <label for="themes" class="btn btn-primary drawer-button btn-sm">
Themes <IconPalette />
</label> </label>
</div> </div>
@ -107,6 +102,6 @@ export const Header = () => {
</ul> </ul>
</div> </div>
</div> </div>
</div> </ul>
) )
} }