2019-07-13 21:35:57 +12:00
|
|
|
<script>
|
2020-02-03 22:50:30 +13: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-08-20 18:24:02 +12:00
|
|
|
</script>
|
2019-07-13 21:35:57 +12:00
|
|
|
|
2019-08-20 18:24:02 +12:00
|
|
|
<div class="root">
|
2019-07-13 21:35:57 +12:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
<div class="top-nav">
|
|
|
|
<button class="home-logo">
|
2020-02-28 00:55:00 +13:00
|
|
|
<img src="/_builder/assets/budibase-logo-only.png" />
|
2020-02-03 22:50:30 +13:00
|
|
|
</button>
|
|
|
|
<!-- <IconButton icon="home"
|
2019-08-30 19:25:00 +12:00
|
|
|
color="var(--slate)"
|
2020-01-21 02:45:00 +13:00
|
|
|
hoverColor="var(--secondary75)"/> -->
|
2020-02-03 22:50:30 +13:00
|
|
|
<span
|
|
|
|
class:active={$store.isBackend}
|
|
|
|
class="topnavitem"
|
|
|
|
on:click={store.showBackend}>
|
|
|
|
Backend
|
|
|
|
</span>
|
|
|
|
<span
|
|
|
|
class:active={!$store.isBackend}
|
|
|
|
class="topnavitem"
|
|
|
|
on:click={store.showFrontend}>
|
|
|
|
Frontend
|
|
|
|
</span>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
{#if $store.isBackend}
|
|
|
|
<div in:fade out:fade>
|
|
|
|
<BackendRoot />
|
|
|
|
</div>
|
|
|
|
{:else}
|
|
|
|
<div in:fade out:fade>
|
|
|
|
<UserInterfaceRoot />
|
|
|
|
</div>
|
|
|
|
{/if}
|
|
|
|
</div>
|
2020-01-21 02:45:00 +13:00
|
|
|
|
2019-07-13 21:35:57 +12:00
|
|
|
</div>
|
|
|
|
|
2019-08-20 18:24:02 +12:00
|
|
|
<style>
|
2020-02-03 22:50:30 +13:00
|
|
|
.root {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
2019-08-30 19:25:00 +12:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2020-02-03 22:50:30 +13:00
|
|
|
}
|
2020-01-21 03:12:29 +13:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
.top-nav {
|
2019-08-30 19:25:00 +12:00
|
|
|
flex: 0 0 auto;
|
2020-01-21 02:45:00 +13:00
|
|
|
height: 48px;
|
2019-08-20 18:24:02 +12:00
|
|
|
background: white;
|
2020-02-21 06:11:41 +13:00
|
|
|
padding: 0px 15px 0 1.8rem;
|
2020-01-21 02:45:00 +13:00
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
border-bottom: 1px solid #ddd;
|
2020-02-25 10:31:35 +13:00
|
|
|
box-sizing: border-box;
|
2020-02-03 22:50:30 +13:00
|
|
|
}
|
2019-07-13 21:35:57 +12:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
.content {
|
2019-08-30 19:25:00 +12:00
|
|
|
flex: 1 1 auto;
|
|
|
|
width: 100%;
|
|
|
|
height: 100px;
|
2020-02-25 10:31:35 +13:00
|
|
|
overflow: hidden;
|
2020-02-03 22:50:30 +13:00
|
|
|
}
|
2019-08-20 18:24:02 +12:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
.content > div {
|
|
|
|
height: 100%;
|
|
|
|
width: 100%;
|
|
|
|
}
|
2019-08-20 18:24:02 +12:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
.topnavitem {
|
2019-08-20 18:24:02 +12:00
|
|
|
cursor: pointer;
|
2019-09-24 09:22:57 +12:00
|
|
|
color: var(--secondary50);
|
2020-01-21 02:45:00 +13:00
|
|
|
margin: 0px 15px;
|
|
|
|
padding-top: 4px;
|
2019-09-24 09:22:57 +12:00
|
|
|
font-weight: 600;
|
2020-01-21 02:45:00 +13:00
|
|
|
font-size: 1rem;
|
|
|
|
height: 100%;
|
|
|
|
display: flex;
|
|
|
|
align-items: center;
|
|
|
|
box-sizing: border-box;
|
2020-02-03 22:50:30 +13:00
|
|
|
}
|
2019-07-13 21:35:57 +12:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
.topnavitem:hover {
|
2019-08-20 18:24:02 +12:00
|
|
|
color: var(--secondary75);
|
2019-09-24 09:22:57 +12:00
|
|
|
font-weight: 600;
|
2020-02-03 22:50:30 +13:00
|
|
|
}
|
2019-09-24 09:22:57 +12:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
.active {
|
2019-09-24 09:22:57 +12:00
|
|
|
color: var(--primary100);
|
2020-01-21 02:45:00 +13:00
|
|
|
font-weight: 600;
|
|
|
|
border-bottom: 2px solid var(--primary100);
|
|
|
|
border-top: 2px solid transparent;
|
2020-02-03 22:50:30 +13:00
|
|
|
}
|
2019-08-30 19:25:00 +12:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
.home-logo {
|
2020-01-21 02:45:00 +13:00
|
|
|
border-style: none;
|
2020-02-03 22:50:30 +13:00
|
|
|
background-color: rgba(0, 0, 0, 0);
|
2020-01-21 02:45:00 +13:00
|
|
|
cursor: pointer;
|
|
|
|
outline: none;
|
|
|
|
height: 40px;
|
2020-02-21 06:11:41 +13:00
|
|
|
padding: 8px 10px 8px 0;
|
2020-02-03 22:50:30 +13:00
|
|
|
}
|
2020-01-21 02:45:00 +13:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
.home-logo:hover {
|
2020-01-21 02:45:00 +13:00
|
|
|
color: var(--hovercolor);
|
2020-02-03 22:50:30 +13:00
|
|
|
}
|
2020-01-21 02:45:00 +13:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
.home-logo:active {
|
|
|
|
outline: none;
|
|
|
|
}
|
2020-01-21 02:45:00 +13:00
|
|
|
|
2020-02-03 22:50:30 +13:00
|
|
|
.home-logo img {
|
2020-01-21 02:45:00 +13:00
|
|
|
height: 100%;
|
2020-02-03 22:50:30 +13:00
|
|
|
}
|
2020-01-21 02:45:00 +13:00
|
|
|
</style>
|