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": {
"@prisma/client": "^3.8.1",
"@tailwindcss/line-clamp": "^0.3.1",
"axios": "^0.25.0",
"fastify": "^3.27.0",
"fastify-compress": "^4.0.1",

View file

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

View file

@ -34,7 +34,17 @@ const { t } = useI18n()
<div class="flex flex-col p-2 justify-between">
<div>
<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
v-if="url"
:href="url"
@ -48,12 +58,6 @@ const { t } = useI18n()
}}</span>
</a>
</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>
</template>

View file

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