-
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
Showing
5 changed files
with
130 additions
and
4 deletions.
There are no files selected for viewing
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
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,49 @@ | ||
<script setup lang="ts"> | ||
export interface Stamp { | ||
stampId: string | ||
stampName: string | ||
image: string | ||
} | ||
defineProps<{ | ||
stamps: Stamp[] | ||
}>() | ||
const handlePutStamp = (stampId: string) => { | ||
console.log(`stamp: ${stampId}`) | ||
} | ||
</script> | ||
|
||
<template> | ||
<ul :class="$style.stampList"> | ||
<li v-for="stamp in stamps" :key="stamp.stampId" :class="$style.stamp"> | ||
<button | ||
:class="$style.stampButton" | ||
@click="handlePutStamp(stamp.stampId)" | ||
> | ||
<img | ||
:src="stamp.image" | ||
:alt="stamp.stampName" | ||
:width="100" | ||
:height="100" | ||
/> | ||
</button> | ||
</li> | ||
</ul> | ||
</template> | ||
|
||
<style lang="scss" module> | ||
.stampList { | ||
display: flex; | ||
list-style: none; | ||
} | ||
.stamp { | ||
padding: 0; | ||
} | ||
.stampButton { | ||
padding: 0 0.5rem; | ||
&:hover { | ||
background-color: gray; // fixme: 下部になぜかpaddingらしきものがついている | ||
} | ||
} | ||
</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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
<script setup lang="ts"> | ||
import { onMounted, ref } from 'vue' | ||
import { useRoute } from 'vue-router' | ||
import apis, { Meeting, Comment } from '@/lib/apis' | ||
import { parseId } from '@/lib/parsePathParams' | ||
import CommentPanel from '@/components/CommentPanel/CommentPanel.vue' | ||
import StampList from '@/components/StampList/StampList.vue' | ||
import { Stamp } from '@/components/StampList/StampList.vue' | ||
const route = useRoute() | ||
const eventId = parseId(route.params.id) | ||
const event = ref<Meeting>() | ||
const comments = ref<Comment[]>([]) | ||
const stamps: Stamp[] = Array(10).fill({ | ||
stampId: 'aaa', | ||
stampName: 'bbb', | ||
image: 'https://q.trap.jp/api/v3/public/icon/mehm8128' | ||
}) | ||
const fetchMeeting = async () => { | ||
//todo: エラーハンドリング | ||
const res = (await apis.getMeeting(eventId)).data | ||
event.value = res | ||
} | ||
const fetchComments = async () => { | ||
//todo: エラーハンドリング | ||
const res = (await apis.getComment(eventId)).data | ||
comments.value = res | ||
} | ||
onMounted(() => { | ||
fetchMeeting() | ||
fetchComments() | ||
}) | ||
</script> | ||
|
||
<template> | ||
<div :class="$style.container"> | ||
<div :class="$style.leftContainer"> | ||
<iframe | ||
src="https://www.youtube.com/embed/8Yxrw4GDqg4" | ||
:class="$style.video" | ||
/> | ||
<div :class="$style.stampListContainer"> | ||
<stamp-list :stamps="stamps" :class="$style.stampList" /> | ||
</div> | ||
</div> | ||
<comment-panel :comments="comments" :show-overlay="false" /> | ||
</div> | ||
</template> | ||
|
||
<style lang="scss" module> | ||
.container { | ||
display: flex; | ||
justify-content: space-between; | ||
height: 100vh; | ||
} | ||
.leftContainer { | ||
width: 100%; | ||
padding: 1rem 4rem; | ||
} | ||
.video { | ||
width: 100%; | ||
aspect-ratio: 16 / 9; | ||
} | ||
.stampListContainer { | ||
padding-top: 1rem; | ||
} | ||
.stampList { | ||
width: fit-content; | ||
margin: auto auto; | ||
} | ||
</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