From 187804f9a1c286988f6b5b83f0a5ea5b264248c2 Mon Sep 17 00:00:00 2001 From: kskarthik <11899221+kskarthik@users.noreply.github.com> Date: Sat, 25 Jun 2022 16:30:45 +0530 Subject: [PATCH] Fix shorts Thumbnail scaling (#1153) * handle shorts videos in trending page * shorts label for video items if video length <= a minute * fix translation * fix: shorts thumbnail scaling * Use tailwind classes and properly do localization. * Add class for short videos. Co-authored-by: Kavin <20838718+FireMasterK@users.noreply.github.com> --- src/components/VideoItem.vue | 27 ++++++++++++++++++++++++++- src/locales/en.json | 3 ++- 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/src/components/VideoItem.vue b/src/components/VideoItem.vue index 56e8b499..90e27236 100644 --- a/src/components/VideoItem.vue +++ b/src/components/VideoItem.vue @@ -10,13 +10,26 @@ }, }" > - +
+ + + @@ -108,6 +121,13 @@ .thumbnail-right { @apply bottom-5px right-5px; } +.thumbnail-left { + @apply bottom-5px left-5px text-xs font-bold bg-red-600 uppercase; +} + +.shorts-img { + @apply max-h-[17.5vh] w-full object-contain; +} diff --git a/src/locales/en.json b/src/locales/en.json index 63d77357..bcb7574d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -105,7 +105,8 @@ "sponsor_segments": "Sponsors Segments", "ratings_disabled": "Ratings Disabled", "chapters": "Chapters", - "live": "{0} Live" + "live": "{0} Live", + "shorts": "Shorts" }, "search": { "did_you_mean": "Did you mean: {0}?",