Skip to content

Commit 22f48f5

Browse files
committed
Hide editor on mobile
1 parent 6a00358 commit 22f48f5

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

web/src/app.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
<meta charset="utf-8" />
66
<link rel="icon" href="%sveltekit.assets%/favicon.png" />
77
<meta name="viewport" content="width=device-width, initial-scale=1" />
8+
<title>Write With Harper</title>
89
%sveltekit.head%
910
</head>
1011

web/src/routes/+page.svelte

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
<script>
22
import Editor from '$lib/Editor.svelte';
3+
4+
let width = window.innerWidth;
5+
6+
window.addEventListener('resize', () => {
7+
width = window.innerWidth;
8+
});
39
</script>
410

511
<div class="w-full h-screen flex flex-col items-center m-0 p-0">
@@ -17,6 +23,12 @@
1723
</div>
1824
</div>
1925
<div class="w-full 2xl:w-3/4 flex-shrink flex-grow overflow-hidden">
20-
<Editor />
26+
{#if width > 768}
27+
<Editor />
28+
{:else}
29+
<p class="italic text-lg w-full text-center">
30+
Open this page on a bigger screen to start checking your work.
31+
</p>
32+
{/if}
2133
</div>
2234
</div>

0 commit comments

Comments
 (0)