2019-07-13 11:35:57 +02:00
|
|
|
<script>
|
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
import IconButton from "./common/IconButton.svelte";
|
|
|
|
import { store } from "./builderStore";
|
|
|
|
import UserInterfaceRoot from "./userInterface/UserInterfaceRoot.svelte";
|
|
|
|
import BackendRoot from "./BackendRoot.svelte";
|
|
|
|
import { fade } from "svelte/transition";
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
</script>
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
<div class="root">
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
<div class="top-nav">
|
2019-08-30 09:25:00 +02:00
|
|
|
<IconButton icon="home"
|
|
|
|
color="var(--slate)"
|
|
|
|
hoverColor="var(--secondary75)"/>
|
2019-08-20 08:24:02 +02:00
|
|
|
<span class:active={$store.isBackend}
|
2019-08-30 09:25:00 +02:00
|
|
|
class="topnavitem"
|
2019-08-20 08:24:02 +02:00
|
|
|
on:click={store.showBackend}>
|
|
|
|
Backend
|
|
|
|
</span>
|
|
|
|
<span class:active={!$store.isBackend}
|
2019-08-30 09:25:00 +02:00
|
|
|
class="topnavitem"
|
2019-08-20 08:24:02 +02:00
|
|
|
on:click={store.showFrontend}>
|
|
|
|
Frontend
|
|
|
|
</span>
|
|
|
|
</div>
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
<div class="content">
|
|
|
|
{#if $store.isBackend}
|
|
|
|
<div in:fade out:fade>
|
|
|
|
<BackendRoot />
|
|
|
|
</div>
|
|
|
|
{:else}
|
|
|
|
<div in:fade out:fade>
|
|
|
|
<UserInterfaceRoot />
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
</div>
|
2019-07-13 11:35:57 +02:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
<style>
|
|
|
|
|
|
|
|
.root {
|
|
|
|
height:100%;
|
|
|
|
width:100%;
|
2019-08-30 09:25:00 +02:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2019-08-20 08:24:02 +02:00
|
|
|
}
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
.top-nav {
|
2019-08-30 09:25:00 +02:00
|
|
|
flex: 0 0 auto;
|
|
|
|
height:25px;
|
2019-08-20 08:24:02 +02:00
|
|
|
background: white;
|
|
|
|
border-style:solid;
|
|
|
|
border-width: 0px 0px 1px 0px;
|
|
|
|
border-color: var(--lightslate);
|
|
|
|
padding: 5px;
|
2019-08-30 09:25:00 +02:00
|
|
|
width: 100%;
|
2019-08-20 08:24:02 +02:00
|
|
|
}
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2019-08-20 08:24:02 +02:00
|
|
|
.content {
|
2019-08-30 09:25:00 +02:00
|
|
|
flex: 1 1 auto;
|
|
|
|
width: 100%;
|
|
|
|
height: 100px;
|
2019-08-20 08:24:02 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
.content > div {
|
|
|
|
height:100%;
|
|
|
|
width:100%;
|
|
|
|
}
|
|
|
|
|
2019-08-30 09:25:00 +02:00
|
|
|
.topnavitem {
|
2019-08-20 08:24:02 +02:00
|
|
|
cursor: pointer;
|
|
|
|
color: var(--slate);
|
|
|
|
padding: 0px 15px;
|
|
|
|
}
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2019-08-30 09:25:00 +02:00
|
|
|
.topnavitem:hover {
|
2019-08-20 08:24:02 +02:00
|
|
|
color: var(--secondary75);
|
|
|
|
}
|
2019-07-13 11:35:57 +02:00
|
|
|
|
2019-08-30 09:25:00 +02:00
|
|
|
.active {
|
|
|
|
color: var(--secondary100);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
2019-07-13 11:35:57 +02:00
|
|
|
</style>
|