examples links

pull/7038/head
Ignatius Bagus 5 years ago
parent 35376f2487
commit 1dfb728769
No known key found for this signature in database
GPG Key ID: 357C6674A45CC06B

@ -2,7 +2,7 @@
let promise = getRandomNumber(); let promise = getRandomNumber();
async function getRandomNumber() { async function getRandomNumber() {
const res = await fetch(`tutorial/random-number`); const res = await fetch(`/tutorial/random-number`);
const text = await res.text(); const text = await res.text();
if (res.ok) { if (res.ok) {
@ -27,4 +27,4 @@
<p>The number is {number}</p> <p>The number is {number}</p>
{:catch error} {:catch error}
<p style="color: red">{error.message}</p> <p style="color: red">{error.message}</p>
{/await} {/await}

@ -41,7 +41,7 @@
line-height: 1.2; line-height: 1.2;
} }
.address { background-image: url(tutorial/icons/map-marker.svg) } .address { background-image: url(/tutorial/icons/map-marker.svg) }
.email { background-image: url(tutorial/icons/email.svg) } .email { background-image: url(/tutorial/icons/email.svg) }
.missing { color: #999 } .missing { color: #999 }
</style> </style>

@ -3,7 +3,7 @@
$: type = name.slice(name.lastIndexOf('.') + 1); $: type = name.slice(name.lastIndexOf('.') + 1);
</script> </script>
<span style="background-image: url(tutorial/icons/{type}.svg)">{name}</span> <span style="background-image: url(/tutorial/icons/{type}.svg)">{name}</span>
<style> <style>
span { span {
@ -11,4 +11,4 @@
background: 0 0.1em no-repeat; background: 0 0.1em no-repeat;
background-size: 1em 1em; background-size: 1em 1em;
} }
</style> </style>

@ -30,14 +30,14 @@
<style> <style>
span { span {
padding: 0 0 0 1.5em; padding: 0 0 0 1.5em;
background: url(tutorial/icons/folder.svg) 0 0.1em no-repeat; background: url(/tutorial/icons/folder.svg) 0 0.1em no-repeat;
background-size: 1em 1em; background-size: 1em 1em;
font-weight: bold; font-weight: bold;
cursor: pointer; cursor: pointer;
} }
.expanded { .expanded {
background-image: url(tutorial/icons/folder-open.svg); background-image: url(/tutorial/icons/folder-open.svg);
} }
ul { ul {

@ -14,7 +14,7 @@
<img <img
class:curious={hereKitty} class:curious={hereKitty}
alt="Kitten wants to know what's going on" alt="Kitten wants to know what's going on"
src="tutorial/kitten.png" src="/tutorial/kitten.png"
> >
<style> <style>
@ -34,4 +34,4 @@
:global(body) { :global(body) {
overflow: hidden; overflow: hidden;
} }
</style> </style>

@ -1,5 +1,5 @@
<svelte:head> <svelte:head>
<link rel="stylesheet" href="tutorial/dark-theme.css"> <link rel="stylesheet" href="/tutorial/dark-theme.css">
</svelte:head> </svelte:head>
<h1>Hello world!</h1> <h1>Hello world!</h1>

Loading…
Cancel
Save