Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mobile feed item card touch #78

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 28 additions & 19 deletions components/FeedItemCard.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,7 @@
<div>
<v-hover>
<template #default="{ isHovering, props: hoverProps }">
<v-card
v-bind="hoverProps"
:to="props.to || `/${data?.creator}/${data?.slug || data?.id}`"
class="feed-item-card"
>
<v-card v-bind="hoverProps" class="feed-item-card">
<v-img ref="img" :src="src" aspect-ratio="1">
<template #placeholder>
<div class="d-flex align-center justify-center fill-height">
Expand Down Expand Up @@ -59,20 +55,28 @@
width="100%"
height="100%"
>
<div v-if="isPlayable" class="play-icon ml-n6">
<v-icon>{{ 'mdi-play' }}</v-icon>
</div>
<v-row align="end" class="fill-height pa-1 pl-4">
<v-col>
<a class="text-white font-weight-bold">
{{ data?.title }}
</a>
<br>
<a class="text-white font-italic">
{{ data?.creator }}
</a>
</v-col>
</v-row>
<v-card
height="100%"
flat
color="transparent"
:ripple="false"
:to="to"
>
<div v-if="isPlayable" class="play-icon ml-n6">
<v-icon>{{ 'mdi-play' }}</v-icon>
</div>
<v-row align="end" class="fill-height pa-1 pl-4">
<v-col>
<a class="text-white font-weight-bold">
{{ data?.title }}
</a>
<br>
<a class="text-white font-italic">
{{ data?.creator }}
</a>
</v-col>
</v-row>
</v-card>
</v-overlay>
</template>
</v-img>
Expand Down Expand Up @@ -142,4 +146,9 @@ const isPlayable = computed(() => {
return false
})

const to = computed(() => {
return props.to
|| `/${data.value?.creator}/${data.value?.slug || data.value?.id}`
})

</script>
Loading