2021-12-09 11:53:54 +00:00
|
|
|
<script lang="ts">
|
2021-12-09 12:56:06 +00:00
|
|
|
import {Navbar, NavbarBrand, Nav, NavItem, NavLink, Collapse, NavbarToggler, Dropdown, DropdownItem, DropdownMenu, DropdownToggle} from 'sveltestrap';
|
|
|
|
import { createEventDispatcher } from 'svelte';
|
|
|
|
|
|
|
|
const dispatch = createEventDispatcher();
|
|
|
|
|
|
|
|
function changeStyle(style: string) {
|
|
|
|
dispatch('styleChange', style.toLowerCase());
|
|
|
|
}
|
|
|
|
|
2021-12-09 11:53:54 +00:00
|
|
|
let isOpen = false;
|
|
|
|
|
|
|
|
const toggle = () => (isOpen = !isOpen);
|
|
|
|
</script>
|
|
|
|
|
2021-12-09 12:56:06 +00:00
|
|
|
<Navbar color="transparent" light expand="lg">
|
|
|
|
<NavbarBrand>pk-webs</NavbarBrand>
|
2021-12-09 11:53:54 +00:00
|
|
|
<NavbarToggler on:click={toggle}></NavbarToggler>
|
2021-12-09 12:56:06 +00:00
|
|
|
<Collapse {isOpen} navbar expand="lg">
|
|
|
|
<Nav class="ms-auto" navbar>
|
|
|
|
<Dropdown nav inNavbar>
|
|
|
|
<DropdownToggle>Styles</DropdownToggle>
|
|
|
|
<DropdownMenu end>
|
|
|
|
<DropdownItem on:click={() => changeStyle("light")}>Light</DropdownItem>
|
|
|
|
<DropdownItem on:click={() => changeStyle("dark")}>Dark</DropdownItem>
|
|
|
|
</DropdownMenu>
|
|
|
|
</Dropdown>
|
|
|
|
<NavItem>
|
|
|
|
<NavLink href="/dash">Dash</NavLink>
|
|
|
|
</NavItem>
|
|
|
|
<NavItem>
|
|
|
|
<NavLink href="/settings">Settings</NavLink>
|
|
|
|
</NavItem>
|
|
|
|
<NavItem>
|
|
|
|
<NavLink href="/templates">templates</NavLink>
|
|
|
|
</NavItem>
|
|
|
|
<NavItem>
|
|
|
|
<NavLink href="/public">Public</NavLink>
|
|
|
|
</NavItem>
|
|
|
|
</Nav>
|
|
|
|
</Collapse>
|
2021-12-09 11:53:54 +00:00
|
|
|
</Navbar>
|