fix overlapping description issue

Signed-off-by: Benny Samir Hierl <bennysamir@posteo.de>
This commit is contained in:
Benny Samir Hierl 2022-02-06 18:08:52 +01:00
parent f997045b48
commit b653faceac
5 changed files with 120 additions and 274 deletions

369
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -19,6 +19,7 @@
}, },
"dependencies": { "dependencies": {
"@prisma/client": "^3.8.1", "@prisma/client": "^3.8.1",
"@tailwindcss/line-clamp": "^0.3.1",
"axios": "^0.25.0", "axios": "^0.25.0",
"fastify": "^3.27.0", "fastify": "^3.27.0",
"fastify-compress": "^4.0.1", "fastify-compress": "^4.0.1",

View file

@ -19,7 +19,7 @@ export const wishlistItemResponseSchema = {
title: { type: 'string' }, title: { type: 'string' },
url: { type: 'string' }, url: { type: 'string' },
imageSrc: { type: 'string' }, imageSrc: { type: 'string' },
description: { type: 'string' }, description: { type: 'string', maxLength: 300 },
comment: { type: 'string' }, comment: { type: 'string' },
bought: { type: 'boolean' }, bought: { type: 'boolean' },
wishlistId: { type: 'string' }, wishlistId: { type: 'string' },

View file

@ -34,7 +34,17 @@ const { t } = useI18n()
<div class="flex flex-col p-2 justify-between"> <div class="flex flex-col p-2 justify-between">
<div> <div>
<h1 class="text-lg mb-1 font-bold">{{ title }}</h1> <h1 class="text-lg mb-1 font-bold">{{ title }}</h1>
<p class="text-sm">{{ description }}</p> <p class="text-sm sm:line-clamp-3">
{{ description }}
</p>
</div>
<div class="flex flex-row items-baseline space-x-2">
<BaseButton
class="mt-4 sm:mt-2 text-xs"
:icon="IconCart"
@click="$emit('bought')"
>{{ t('components.wishlist-item.bought-button.text') }}</BaseButton
>
<a <a
v-if="url" v-if="url"
:href="url" :href="url"
@ -48,12 +58,6 @@ const { t } = useI18n()
}}</span> }}</span>
</a> </a>
</div> </div>
<BaseButton
class="mt-4 sm:mt-2 text-xs"
:icon="IconCart"
@click="$emit('bought')"
>{{ t('components.wishlist-item.bought-button.text') }}</BaseButton
>
</div> </div>
</div> </div>
</template> </template>

View file

@ -1,8 +1,8 @@
// eslint-disable-next-line no-undef /* eslint-disable no-undef */
module.exports = { module.exports = {
content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'], content: ['./index.html', './src/**/*.{vue,js,ts,jsx,tsx}'],
theme: { theme: {
extend: {}, extend: {},
}, },
plugins: [], plugins: [require('@tailwindcss/line-clamp')],
} }