File tree 2 files changed +9
-7
lines changed
2 files changed +9
-7
lines changed Original file line number Diff line number Diff line change 28
28
.then ((response ) => response .text ())
29
29
.then ((text ) => parseYaml (text ) as Config )
30
30
// TODO error handling
31
- // .catch((error) => {
32
- // console.error(error);
33
- // throw new Error("error")
34
- // });
31
+
32
+ const basePath = location .origin + location .pathname ;
35
33
</script >
36
34
37
35
{#if ! path }
38
36
<div class =" error" >
39
- Please define config path as search param, e.g. ?config=/public/conf.yaml
37
+ <div >
38
+ <p >Please define config path as search param, e.g.:</p >
39
+ <a href =" {basePath }?config=/scrollymap/storyBoard.yml" > {basePath }?config=/scrollymap/storyBoard.yaml</a >
40
+ </div >
40
41
</div >
41
42
{:else }
42
43
{#await promise }
43
- <div class = " error " >Waiting</div >
44
+ <div >Waiting</div >
44
45
{:then config }
45
46
<div class =" map" >
46
47
<Map steps ={config .steps } />
70
71
</Scrolly >
71
72
</div >
72
73
</section >
73
- <!-- TODO error handling
74
+ <!-- TODO error handling
74
75
{:catch error}
75
76
<p>{error.message}</p> -->
76
77
{/await }
Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ import { svelte } from '@sveltejs/vite-plugin-svelte';
4
4
import sveltePreprocess from 'svelte-preprocess' ;
5
5
6
6
export default defineConfig ( {
7
+ base : "/scrollymap/" ,
7
8
plugins : [
8
9
svelte ( {
9
10
/* plugin options */
You can’t perform that action at this time.
0 commit comments