Skip to content

Commit c1e1e58

Browse files
Rich-HarrisRich Harris
and
Rich Harris
authored
mobile layout (#254)
* partial fix for #12 * use dynamic viewport units --------- Co-authored-by: Rich Harris <[email protected]>
1 parent cc3cd30 commit c1e1e58

File tree

4 files changed

+10
-8
lines changed

4 files changed

+10
-8
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
"@lezer/javascript": "^1.4.1",
4747
"@lezer/lr": "^1.3.3",
4848
"@replit/codemirror-lang-svelte": "^6.0.0",
49-
"@rich_harris/svelte-split-pane": "^1.0.0",
49+
"@rich_harris/svelte-split-pane": "^1.0.1",
5050
"@webcontainer/api": "^1.0.2",
5151
"adm-zip": "^0.5.10",
5252
"ansi-to-html": "^0.7.2",

pnpm-lock.yaml

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/routes/+layout.svelte

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
:global(body) {
5151
margin: 0;
5252
width: 100%;
53-
min-height: 100vh;
53+
min-height: 100dvh;
5454
}
5555
5656
/* TODO when we remove the launch banner, we can remove this override */
@@ -60,7 +60,7 @@
6060
6161
main {
6262
width: 100%;
63-
height: calc(100vh - var(--nav-h));
63+
height: calc(100dvh - var(--nav-h));
6464
position: relative;
6565
top: var(--nav-h);
6666
}

src/routes/tutorial/[slug]/Editor.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,9 @@
7575
editor_states.set(file.name, state);
7676
}
7777
78-
editor_view.setState(state);
78+
if (editor_view) {
79+
editor_view.setState(state);
80+
}
7981
}
8082
8183
onMount(() => {

0 commit comments

Comments
 (0)