App.svelte 1.28 KB
<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>