Skip to content

Instantly share code, notes, and snippets.

@shinokada
Last active October 18, 2022 08:51
Show Gist options
  • Save shinokada/be8119c0f2470f3d908d9b1a226fad52 to your computer and use it in GitHub Desktop.
Save shinokada/be8119c0f2470f3d908d9b1a226fad52 to your computer and use it in GitHub Desktop.
<script>
import '../app.postcss';
import { Navbar, NavBrand, NavLi, NavUl, NavHamburger, Sidebar, SidebarBrand, SidebarGroup, SidebarItem, SidebarWrapper } from 'flowbite-svelte';
let divClass = 'w-full md:block md:w-auto pr-8';
let ulClass = 'flex flex-col p-4 mt-4 md:flex-row md:space-x-8 md:mt-0 md:text-lg md:font-medium';
</script>
<Navbar let:hidden let:toggle>
<NavBrand href="/">
<img src="https://flowbite-svelte.com/images/flowbite-svelte-icon-logo.svg" class="mr-3 h-6 sm:h-9" alt="Flowbite-Svelte Logo" />
<span class="self-center whitespace-nowrap text-xl font-semibold dark:text-white">
My Website
</span>
</NavBrand>
<NavHamburger on:click={toggle} />
<NavUl {hidden} {divClass} {ulClass}>
<NavLi href="/">Home</NavLi>
<NavLi href="/pages/about">About</NavLi>
<NavLi href="https://github.com/themesberg/flowbite-svelte">GitHub</NavLi>
</NavUl>
</Navbar>
<slot />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment