Skip to content

Commit 8f69afb

Browse files
committed
get URL bar working - closes #25
1 parent 9c1053b commit 8f69afb

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

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

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,10 @@
261261

262262
<input
263263
value={path}
264-
readonly
265264
on:change={(e) => {
266-
// TODO enable URL bar to control iframe
267265
const url = new URL(e.currentTarget.value, adapter.base);
268266
path = url.pathname + url.search + url.hash;
267+
iframe.src = adapter.base + path;
269268
}}
270269
/>
271270
</div>
@@ -405,12 +404,13 @@
405404
width: 100%;
406405
height: 4rem;
407406
display: flex;
407+
gap: 0.5rem;
408408
padding: 0.4rem;
409409
background: #f9f9f9;
410410
}
411411
412412
.chrome button {
413-
padding: 0.5rem 1rem;
413+
padding: 0.5rem;
414414
}
415415
416416
.chrome button img {
@@ -435,11 +435,6 @@
435435
font-size: 1.6rem;
436436
}
437437
438-
/* TODO change this once the input is interactive */
439-
.chrome input:focus {
440-
outline: none;
441-
}
442-
443438
iframe {
444439
width: 100%;
445440
height: 100%;

0 commit comments

Comments
 (0)