🐨 Removes sidebar

This commit is contained in:
Rune Harlyk
2024-02-04 22:14:22 +01:00
parent 1536964165
commit 749d6d10ad
7 changed files with 62 additions and 40 deletions
-31
View File
@@ -1,31 +0,0 @@
<script lang="ts">
import { Link } from 'svelte-routing';
import { Icon, XMark, ChartBar, DevicePhoneMobile, Cog6Tooth } from 'svelte-hero-icons';
import { sidebarOpen } from '../lib/store';
const closeMenu = () => {
sidebarOpen.set(false);
};
</script>
<div
id="drawer-example"
style="background-color:#36393f"
class="fixed top-0 left-0 z-40 h-screen p-4 overflow-y-auto transition-transform
{$sidebarOpen ? '' : '-translate-x-full'} bg-white w-40 dark:bg-gray-800"
tabindex="-1"
aria-labelledby="drawer-label"
>
<button
type="button"
on:click={closeMenu}
class="text-gray-400 bg-transparent hover:bg-gray-200 hover:text-gray-900 rounded-lg text-sm p-1.5 absolute top-2.5 right-2.5 inline-flex items-center dark:hover:bg-gray-600 dark:hover:text-white"
>
<Icon src={XMark} size="32" />
</button>
<div class="h-full w-full flex flex-col justify-evenly items-center">
<Link to="/"><Icon src={DevicePhoneMobile} size="32" /></Link>
<Link to="/health"><Icon src={ChartBar} size="32" /></Link>
<Link to="/config"><Icon src={Cog6Tooth} size="32" /></Link>
</div>
</div>
+5 -4
View File
@@ -1,7 +1,8 @@
<script lang="ts">
import { isConnected, dataBuffer, status } from '../lib/socket';
import { Icon, Bars3, Power, Battery100, Signal, SignalSlash } from 'svelte-hero-icons';
import { emulateModel, sidebarOpen } from '../lib/store';
import { emulateModel } from '../lib/store';
import { Link } from 'svelte-routing'
const views = ["Virtual environment", "Robot camera"]
const modes = ["Drive", "Choreography"]
@@ -15,9 +16,9 @@
<div class="topbar absolute left-0 top-0 w-full z-10 flex justify-between bg-zinc-800">
<div class="flex gap-2 py-2">
<button class="ml-2" on:click={() => sidebarOpen.set(true)}>
<Icon src={Bars3} size="32" />
</button>
<Link to="/settings">
<Icon src={Bars3} size="32" />
</Link>
<select bind:value={selected_modes} class="rounded-md outline outline-2 text-zinc-200 outline-zinc-600 bg-zinc-800">
{#each modes as mode}
<option>{mode}</option>
+3
View File
@@ -0,0 +1,3 @@
<div class="bg-blue-600 w-full h-full">
INFO
</div>