Skip to content

Commit

Permalink
add: hotspot modal 추가 #8
Browse files Browse the repository at this point in the history
  • Loading branch information
swy0123 committed May 18, 2023
1 parent 8b30135 commit c5aec96
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 5 deletions.
1 change: 0 additions & 1 deletion frontend/src/components/common/LikeTag.vue
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@ export default {
required: true,
},
number: {
type: Number,
default: 0,
},
},
Expand Down
66 changes: 62 additions & 4 deletions frontend/src/components/home/HotSpotCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,19 @@
@click="cardClick"
>
<user-tag class="user-tag"></user-tag>
<like-tag class="like-tag" :is-liked="true" :number="5"></like-tag>
<like-tag
class="like-tag"
:is-liked="true"
:number="this.item.likes"
></like-tag>

<b-modal v-model="show" class="custom-modal" size="sm" centered hide-header hide-footer>
<b-row class="modal-content" ><img :src="item.img" class="modal-img" /></b-row>

<user-tag class="modal-user"></user-tag>
<div class="close" @click="show=false">X</div>

</b-modal>
</div>
</template>

Expand All @@ -26,15 +37,29 @@ export default {
required: true,
},
},
data() {
return {
id: "",
show: false,
variants: ["primary", "secondary", "success"],
bodyTextVariant: "dark",
};
},
methods: {
hoverEffect() {
this.$refs.card.style.opacity = 0.5;
},
cardClick(){
console.log(this.item.id)
cardClick() {
this.show = true;
console.log(this.item.id);
},
close(){
}
},
created() {},
created() {
this.id = this.item.id;
},
};
</script>

Expand All @@ -57,4 +82,37 @@ export default {
margin-left: 220px;
margin-top: 300px;
}
.modal-content {
display: flex;
align-items: center;
justify-content: center;
width: 300px;
height: 400px;
}
/* .custom-modal .modal-dialog{
max-width: 60px;
max-height: 100px;
} */
.modal-img{
width: 600px;
height: 800px;
border-radius: 20px;
}
.modal-user{
position: absolute;
top: -40%;
left: 5%;
}
.close{
position: absolute;
top: -35%;
right: 10%;
background-color: aqua;
width: 30px;
height: 30px;
}
</style>

0 comments on commit c5aec96

Please sign in to comment.