adds functionality to navigate to screens and layouts

This commit is contained in:
kevmodrome 2020-04-29 13:07:21 +02:00
parent eb1d2dc337
commit 3fba410cf8
5 changed files with 22 additions and 6 deletions

View File

@ -53,8 +53,6 @@
store.setCurrentScreen(screen.title)
$goto(`./:page/${screen.title}`)
}
$: console.log("Params: ", $params)
</script>
<div class="root">

View File

@ -0,0 +1,14 @@
<script>
import { onMount } from "svelte"
import { params } from "@sveltech/routify"
import { store } from "builderStore"
if ($params.screen !== "page-layout") {
store.setCurrentScreen($params.screen)
} else {
store.setScreenType("page")
}
</script>
<slot />
store.setScreenType("page")

View File

@ -0,0 +1,8 @@
<script>
import { params } from "@sveltech/routify"
import { store } from "builderStore"
store.setCurrentPage($params.page)
</script>
<slot />

View File

@ -50,9 +50,6 @@
}
const lastPartOfName = c => (c ? last(c.split("/")) : "")
$: console.log("Pages: ", $store.pages[$store.currentPageName])
$: console.log("Screens: ", $store.screens)
</script>
<div class="root">