App.svelte
1.28 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<script>
import Menu from './Menu.svelte';
import Backtotop from './SideItems/Backtotop.svelte';
import Map from './Map.svelte';
import Article from './Articles.svelte';
import { AllFestas } from './Stores/AllFestas';
import jQuery from 'jquery';
function LoadFestas() {
let url = "/festivalList";
jQuery.getJSON(url, (json) => {
AllFestas.set(json);
// console.log(json);
});
// let url = "http://api.visitkorea.or.kr/openapi/service/rest/KorService/areaBasedList?ServiceKey=2lFkvQJYgzOOhwUKiUt8aZVNpd1PpBOf%2FfMNW17cl25DE0GUEDddeR9iGnuSUpggjUoIUgamfhcvnKQ3eH1dAw%3D%3D&contentTypeId=15&areaCode=&sigunguCode=&cat1=&cat2=&cat3=&listYN=Y&MobileOS=ETC&MobileApp=TourAPI3.0_Guide&arrange=A&numOfRows=12&pageNo=1&_type=json";
// jQuery.getJSON(url, (json) => {
// AllFestas.set(json.response.body.items.item);
// console.log(json.response.body.items.item);
// });
}
</script>
<style>
div {
text-align: left;
box-sizing: border-box;
display: block;
}
:global(body) {
padding: 0;
margin: 0;
align-items: center;
align-content: center;
text-align: center;
justify-content: center;
}
:global(html) {
scroll-behavior: smooth;
}
</style>
<svelte:window on:load|once={LoadFestas}></svelte:window>
<div>
<Menu/>
<Map/>
<Backtotop/>
<Article/>
</div>