mirror of
https://github.com/TeamPiped/Piped.git
synced 2024-08-14 23:57:27 +00:00
handle shorts videos in trending page
This commit is contained in:
parent
0007aab519
commit
325e5f01f0
1 changed files with 13 additions and 1 deletions
|
@ -10,13 +10,25 @@
|
||||||
},
|
},
|
||||||
}"
|
}"
|
||||||
>
|
>
|
||||||
<img :height="height" :width="width" class="w-full" :src="video.thumbnail" alt="" loading="lazy" />
|
<img
|
||||||
|
:style="`max-height: ${height}px; max-width: ${width}px`"
|
||||||
|
class="w-full"
|
||||||
|
:src="video.thumbnail"
|
||||||
|
:alt="video.title"
|
||||||
|
loading="lazy"
|
||||||
|
/>
|
||||||
<div class="relative text-sm">
|
<div class="relative text-sm">
|
||||||
<span
|
<span
|
||||||
class="thumbnail-overlay thumbnail-right"
|
class="thumbnail-overlay thumbnail-right"
|
||||||
v-if="video.duration > 0"
|
v-if="video.duration > 0"
|
||||||
v-text="timeFormat(video.duration)"
|
v-text="timeFormat(video.duration)"
|
||||||
/>
|
/>
|
||||||
|
<span class="thumbnail-overlay thumbnail-right" v-if="video.duration <= 60" v-text="`SHORTS`" />
|
||||||
|
<span
|
||||||
|
class="thumbnail-overlay thumbnail-right"
|
||||||
|
v-else-if="video.duration >= 60"
|
||||||
|
v-text="timeFormat(video.duration)"
|
||||||
|
/>
|
||||||
<i18n-t v-else keypath="video.live" class="thumbnail-overlay thumbnail-right !bg-red-600" tag="div">
|
<i18n-t v-else keypath="video.live" class="thumbnail-overlay thumbnail-right !bg-red-600" tag="div">
|
||||||
<font-awesome-icon class="!w-3" :icon="['fas', 'broadcast-tower']" />
|
<font-awesome-icon class="!w-3" :icon="['fas', 'broadcast-tower']" />
|
||||||
</i18n-t>
|
</i18n-t>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue