-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
da-in
committed
Jan 9, 2024
1 parent
8c7cb3a
commit 2071bbb
Showing
9 changed files
with
86 additions
and
31 deletions.
There are no files selected for viewing
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
<template> | ||
<div class="h-[9px] bg-grey-20 w-full"/> | ||
</template> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,74 @@ | ||
<template> | ||
<nav-bar /> | ||
<img :src='mock' alt='popup store thumbnail'> | ||
<div> | ||
<h1>{{ data.title }}</h1> | ||
<span>{{ data.startDate }}</span> | ||
<span> ~ </span> | ||
<span>{{ data.endDate }}</span><br /> | ||
<span>{{ data.time }}</span><br /> | ||
<span v-if='data.region'>{{ data.region.join(' ') }}</span> | ||
<div class="flex flex-col py-5 px-5 gap-2"> | ||
<span class="cap-1 text-coral-60">{{data.category}}</span> | ||
<h1 class="head-1">{{ data.title }}</h1> | ||
<div class="flex flex-col body-2 gap-2"> | ||
<div v-if="data.startDate || data.endDate" class="row"> | ||
<img :src="calendar" class="icon" alt="운영 기간" /> | ||
<span>{{ data.startDate }}</span> | ||
<span v-if="data.startDate && data.endDate"> ~ </span> | ||
<span>{{ data.endDate }}</span><br /> | ||
</div> | ||
<div v-if="data.time" class="row"> | ||
<img :src="time" class="icon" alt="운영 시간"/> | ||
<span>{{ data.time }}</span><br /> | ||
</div> | ||
<div v-if='data.region' class="row"> | ||
<img :src="location" class="icon" alt="지역"/> | ||
<span >서울시 {{ data.region }}</span> | ||
</div> | ||
<div v-if='data.link' class="row"> | ||
<img :src="link" class="icon" alt="링크"/> | ||
<a :href='url' class="text-link truncate" >{{ data.link }}</a> | ||
</div> | ||
</div> | ||
</div> | ||
<div> | ||
<h2 class='font-bold'>소개</h2> | ||
<span>{{ data.description }}</span> | ||
<division/> | ||
<div class="flex flex-col items-start py-5 px-5 gap-2"> | ||
<h2 class='sub-1 mb-3'>소개</h2> | ||
<span :class="`body-1 whitespace-pre-wrap ${!showMore && 'line-clamp-[9]'}`">{{ data.description }}</span> | ||
<button class="body-2 text-tertiary" @click="toggleShorMore">{{ showMore ? '접기' : '더보기' }}</button> | ||
</div> | ||
<div> | ||
<h2 class='font-bold'>위치</h2> | ||
<span>{{ data.location }}</span> | ||
</div> | ||
<div> | ||
<h2 class='font-bold'>홈페이지</h2> | ||
<a :href='link'>{{ data.link }}</a> | ||
<division/> | ||
<div class="flex flex-col py-5 px-5 gap-2"> | ||
<h2 class='sub-1 mb-3'>위치</h2> | ||
<span class="body-1">{{ data.location }}</span> | ||
</div> | ||
</template> | ||
<script setup lang='ts'> | ||
import NavBar from '../../components/nav/NavBar.vue' | ||
import mock from '../../assets/mock.png' | ||
import { getPopup } from '../../requests/getPopup.ts' | ||
import { computed } from 'vue' | ||
import {computed, ref} from 'vue' | ||
import Division from '../../components/division/Division.vue' | ||
import {time, calendar, location, link} from '../../assets' | ||
const data = getPopup() | ||
const link = computed(() => { | ||
const showMore = ref(false) | ||
const toggleShorMore = () => { | ||
showMore.value = !showMore.value | ||
} | ||
const url = computed(() => { | ||
if (data.link.startsWith('https://')) { | ||
return data.link | ||
} else { | ||
return 'https://' + data.link | ||
} | ||
}) | ||
</script> | ||
<style scoped> | ||
.icon { | ||
width: 22px; | ||
height: 22px; | ||
margin-right: 8px; | ||
} | ||
.row { | ||
display: flex; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters