Info.svelte 1.03 KB
<script>
    import SideBar from "./SideBar.svelte"

    export let festa;
    export let sidebar_show = false;
    let side = "right";

    function hide() {
        if (window.scrollY > 400) {
            sidebar_show = false;
        }
    }
</script>

<style>
    .title {
        font-size: 18pt;
        font-weight: bold;
        text-align: center;
    }

    .content {
        padding: 0.5rem 0.5rem 0.5rem;
        text-align: center;
    }

    .info img {
        max-height: 20rem;
    }

</style>

<svelte:window on:scroll={hide}></svelte:window>
<SideBar bind:show={sidebar_show} {side}>
    <div class="info">
        <div class="title">{festa.title}</div>
        <img alt="festaImg" src={festa.firstimage}><br>
        <div class="content">
            개최지 : {festa.addr1}<br>
            전화번호 : {festa.tel}<br>
            <!-- 행사 시작일 : {festa.startdate}<br>
            행사 시작일 : {festa.enddate}<br>
            날씨 : {festa.weather 어쩌구} -->
        </div>
    </div>
    
    

</SideBar>