diff --git a/site/content/examples/hacker-news/App.html b/site/content/examples/hacker-news/App.html index 8650751d31..2f8283fdf2 100644 --- a/site/content/examples/hacker-news/App.html +++ b/site/content/examples/hacker-news/App.html @@ -1,11 +1,10 @@ - - -
- {#if item} - - {:elseif page} - - {/if} -
- \ No newline at end of file + + + + +
+ {#if item} + + {:elseif page} + + {/if} +
\ No newline at end of file diff --git a/site/content/examples/hacker-news/Comment.html b/site/content/examples/hacker-news/Comment.html index f932a30717..241499dcb3 100644 --- a/site/content/examples/hacker-news/Comment.html +++ b/site/content/examples/hacker-news/Comment.html @@ -1,15 +1,3 @@ -
-

{comment.user} {comment.time_ago}

- - {@html comment.content} - -
- {#each comment.comments as child} - - {/each} -
-
- \ No newline at end of file + + +
+

{comment.user} {comment.time_ago}

+ + {@html comment.content} + +
+ {#each comment.comments as child} + + {/each} +
+
\ No newline at end of file diff --git a/site/content/examples/hacker-news/Item.html b/site/content/examples/hacker-news/Item.html index 76a3c10551..9ce2f739f8 100644 --- a/site/content/examples/hacker-news/Item.html +++ b/site/content/examples/hacker-news/Item.html @@ -9,6 +9,22 @@ } + + « back
@@ -24,20 +40,4 @@ {#each item.comments as comment} {/each} - - - \ No newline at end of file + \ No newline at end of file diff --git a/site/content/examples/hacker-news/List.html b/site/content/examples/hacker-news/List.html index 1fe61bdea1..361db9905d 100644 --- a/site/content/examples/hacker-news/List.html +++ b/site/content/examples/hacker-news/List.html @@ -21,16 +21,6 @@ }); -{#if items} - {#each items as item, i} - - {/each} - - page {page + 1} -{:else} -

loading...

-{/if} - \ No newline at end of file + + +{#if items} + {#each items as item, i} + + {/each} + + page {page + 1} +{:else} +

loading...

+{/if} \ No newline at end of file diff --git a/site/content/examples/hacker-news/Summary.html b/site/content/examples/hacker-news/Summary.html index a777761ce4..0ff25964f7 100644 --- a/site/content/examples/hacker-news/Summary.html +++ b/site/content/examples/hacker-news/Summary.html @@ -9,12 +9,6 @@ } - - \ No newline at end of file + + + \ No newline at end of file diff --git a/site/src/routes/repl/_components/Output/Viewer.html b/site/src/routes/repl/_components/Output/Viewer.html index 5a23cc280d..aeeb49060a 100644 --- a/site/src/routes/repl/_components/Output/Viewer.html +++ b/site/src/routes/repl/_components/Output/Viewer.html @@ -99,10 +99,10 @@ event.preventDefault(); - if (el.href.startsWith(top.location.href)) { - const hash = el.href.replace(top.location.href, ''); - if (hash[0] === '#') { - iframe.contentWindow.location.hash = hash; + if (el.href.startsWith(top.location.origin)) { + const url = new URL(el.href); + if (url.hash[0] === '#') { + iframe.contentWindow.location.hash = url.hash; return; } }