update mobile cards / fix overflow errors

This commit is contained in:
hay-kot 2021-04-21 21:50:10 -08:00
commit f2f947bfe8
2 changed files with 43 additions and 14 deletions

View file

@ -1,23 +1,39 @@
<template> <template>
<v-card <v-card
class="mx-auto"
hover hover
:to="`/recipe/${slug}`" :to="`/recipe/${slug}`"
max-height="125"
@click="$emit('selected')" @click="$emit('selected')"
> >
<v-list-item> <v-list-item three-line>
<v-list-item-avatar rounded size="125" class="mt-0 ml-n4"> <v-list-item-avatar
<v-img :src="getImage(slug)"> </v-img> tile
</v-list-item-avatar> size="125"
<v-list-item-content class="align-self-start"> color="grey"
<v-list-item-title> class="v-mobile-img rounded-sm my-0 ml-n4"
{{ name }} >
</v-list-item-title> <v-img :src="getImage(slug)" lazy-src=""></v-img
<v-rating length="5" size="16" dense :value="rating"></v-rating> ></v-list-item-avatar>
<div class="text"> <v-list-item-content>
<v-list-item-action-text> <v-list-item-title class=" mb-1">{{ name }}</v-list-item-title>
{{ description | truncate(115) }} <v-list-item-subtitle> {{ description }} </v-list-item-subtitle>
</v-list-item-action-text> <div class="d-flex justify-center align-center">
<RecipeChips
:items="tags"
:title="false"
:limit="1"
:small="true"
:isCategory="false"
/>
<v-rating
color="secondary"
class="ml-auto"
background-color="secondary lighten-3"
dense
length="5"
size="15"
:value="rating"
></v-rating>
</div> </div>
</v-list-item-content> </v-list-item-content>
</v-list-item> </v-list-item>
@ -25,8 +41,12 @@
</template> </template>
<script> <script>
import RecipeChips from "@/components/Recipe/RecipeViewer/RecipeChips";
import { api } from "@/api"; import { api } from "@/api";
export default { export default {
components: {
RecipeChips,
},
props: { props: {
name: String, name: String,
slug: String, slug: String,
@ -36,6 +56,9 @@ export default {
route: { route: {
default: true, default: true,
}, },
tags: {
default: true,
},
}, },
methods: { methods: {
@ -47,6 +70,11 @@ export default {
</script> </script>
<style> <style>
.v-mobile-img {
padding-top: 0;
padding-bottom: 0;
padding-left: 0;
}
.v-card--reveal { .v-card--reveal {
align-items: center; align-items: center;
bottom: 0; bottom: 0;

View file

@ -73,6 +73,7 @@
:slug="recipe.slug" :slug="recipe.slug"
:rating="recipe.rating" :rating="recipe.rating"
:image="recipe.image" :image="recipe.image"
:tags="recipe.tags"
/> />
</v-col> </v-col>
</v-row> </v-row>