Skip to content

Commit

Permalink
bump svelte, upgrade layout
Browse files Browse the repository at this point in the history
  • Loading branch information
matyunya committed Jan 15, 2020
1 parent 1d98875 commit 622e8a2
Show file tree
Hide file tree
Showing 3 changed files with 44 additions and 49 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
"compression": "^1.7.1",
"express": "^4.17.1",
"sirv": "^0.4.0",
"smelte": "^0.1.10"
"smelte": "^0.2.4"
},
"devDependencies": {
"@babel/core": "^7.0.0",
Expand Down
73 changes: 34 additions & 39 deletions src/routes/_layout.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,18 @@
import ListItem from "components/List/ListItem.svelte";
import NavigationDrawer from "components/NavigationDrawer";
import ProgressLinear from "components/ProgressLinear";
import { writable } from "svelte/store";
const right = writable(false);
const persistent = writable(true);
const elevation = writable(false);
const showNav = writable(true);
import {
right,
elevation,
persistent,
showNav,
showNavMobile,
breakpoint
} from "smelte/src/stores.js";
const { preloading, page } = stores();
let selected = "";
const bp = breakpoint();
$: path = $page.path;
const menu = [{ to: "/about", text: "About" }, { to: "/blog", text: "Blog" }];
Expand Down Expand Up @@ -63,37 +61,34 @@
remove="p-1 h-4 w-4"
iconClasses={i => i.replace('p-4', 'p-3').replace('m-4', 'm-3')}
text
on:click={() => showNavMobile.set(!$showNavMobile)} />
on:click={() => showNav.set(!$showNav)} />
</div>
</AppBar>

{#if $bp}
<main
class="container relative p-8 lg:max-w-3xl lg:ml-64 mx-auto mb-10 mt-24
md:ml-56 md:max-w-md md:px-3"
transition:fade={{ duration: 300 }}>
<NavigationDrawer
bind:showDesktop={$showNav}
bind:showMobile={$showNavMobile}
right={$right}
persistent={$persistent}
elevation={$elevation}
breakpoint={$bp}>
<h6 class="p-6 ml-1 pb-2 text-xs text-gray-900">Menu</h6>
<List items={menu}>
<span slot="item" let:item class="cursor-pointer">
<a href={item.to}>
<ListItem
selected={path.includes(item.to)}
{...item}
dense
navigation />
</a>
</span>
</List>
<hr />
</NavigationDrawer>
<main
class="container relative p-8 lg:max-w-3xl lg:ml-64 mx-auto mb-10 mt-24
md:ml-56 md:max-w-md md:px-3"
transition:fade={{ duration: 300 }}>
<NavigationDrawer
bind:show={$showNav}
right={$right}
persistent={$persistent}
elevation={$elevation}
>
<h6 class="p-6 ml-1 pb-2 text-xs text-gray-900">Menu</h6>
<List items={menu}>
<span slot="item" let:item class="cursor-pointer">
<a href={item.to}>
<ListItem
selected={path.includes(item.to)}
{...item}
dense
navigation />
</a>
</span>
</List>
<hr />
</NavigationDrawer>

<slot />
</main>
{/if}
<slot />
</main>
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -3724,12 +3724,12 @@ slice-ansi@^2.1.0:
astral-regex "^1.0.0"
is-fullwidth-code-point "^2.0.0"

smelte@^0.1.10:
version "0.1.10"
resolved "https://registry.yarnpkg.com/smelte/-/smelte-0.1.10.tgz#62d311a19b0b3e40754c74c47bb017c520949652"
integrity sha512-UaN0aDkOg71RBoPNpFyHTjrprqVwz9YS+OpUn2VqljzOzY5WMMeTjS49SqeoS+ZUMJ0NRFCyMV8ZvZxzrCahGg==
smelte@^0.2.4:
version "0.2.4"
resolved "https://registry.yarnpkg.com/smelte/-/smelte-0.2.4.tgz#b0d92917a1cf5af68127a8753dd1ded01aabf970"
integrity sha512-qBIdjaDxnRaMnlfMyXua1a2GSuKZHXUCm+zaNnOgcPYaXmVC/mjMBS9oRUXI3wNK9suyydmAvQHQwN5TZjNgXg==
dependencies:
svelte-waypoint "^0.1.2"
svelte-waypoint "^0.1.4"
tinycolor2 "^1.4.1"

source-map-support@~0.5.10:
Expand Down Expand Up @@ -3931,10 +3931,10 @@ svelte-preprocess@^2.9.0:
postcss-load-config "^2.0.0"
strip-indent "^2.0.0"

svelte-waypoint@^0.1.2:
version "0.1.3"
resolved "https://registry.yarnpkg.com/svelte-waypoint/-/svelte-waypoint-0.1.3.tgz#4095ac4ebf2f675fde4f72f3a63b5da7c014bed4"
integrity sha512-YwPFy6iekwKy5DzF/2586Domq1IAZPEH3VSkNzGjWK9VpwzeVj7FxA7WSlRNPsEhnVoQ93w0QJFyy0QaMY8ANQ==
svelte-waypoint@^0.1.4:
version "0.1.4"
resolved "https://registry.yarnpkg.com/svelte-waypoint/-/svelte-waypoint-0.1.4.tgz#ab467bed08c5f38716709872cf53d3f9da17831b"
integrity sha512-UEqoXZjJeKj2sWlAIsBOFjxjMn+KP8aFCc/zjdmZi1cCOE59z6T2C+I6ZaAf8EmNQqNzfZVB/Lci4Ci9spzXAw==

svelte@^3.12.1:
version "3.12.1"
Expand Down

0 comments on commit 622e8a2

Please sign in to comment.