Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 54 additions & 0 deletions public/img/DeArrow.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 4 additions & 0 deletions src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -312,4 +312,8 @@ h2 {
.thumbnail-left {
@apply bottom-5px left-5px text-xs font-bold bg-red-600 uppercase;
}

.thumbnail-top-right {
@apply top-5px right-5px;
}
</style>
9 changes: 8 additions & 1 deletion src/components/VideoItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,20 @@
>
<VideoThumbnail :item="item" />

<div>
<div class="flex justify-between">
<p
style="display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical"
class="link flex overflow-hidden pt-2 font-bold"
:title="title"
v-text="title"
/>
<img
v-if="typeof item.dearrow?.titles[0]?.title !== 'undefined'"
src="/img/DeArrow.svg"
:title="item.title"
class="m-2 box-content aspect-square hover:grayscale"
:style="{ height: '1lh' }"
/>
</div>
</router-link>

Expand Down
48 changes: 39 additions & 9 deletions src/components/VideoThumbnail.vue
Original file line number Diff line number Diff line change
@@ -1,12 +1,28 @@
<template>
<div class="w-full">
<img
loading="lazy"
class="aspect-video w-full rounded-md object-contain"
:src="item.thumbnail"
:alt="item.title"
:class="{ 'shorts-img': item.isShort, 'opacity-75': item.watched }"
/>
<div class="video-thumbnail w-full">
<div class="relative">
<img
loading="lazy"
class="actual-thumbnail aspect-video w-full rounded-md object-contain"
:src="thumbnail"
:alt="title"
:class="{ 'shorts-img': item.isShort, 'opacity-75': item.watched }"
/>
<img
v-if="typeof item.dearrow?.thumbnails[0]?.thumbnail !== 'undefined'"
loading="lazy"
class="original-thumbnail aspect-video w-full rounded-md object-contain"
:src="item.thumbnail"
:alt="item.title"
:class="{ 'shorts-img': item.isShort, 'opacity-75': item.watched }"
/>
<img
v-if="typeof item.dearrow?.thumbnails[0]?.thumbnail !== 'undefined'"
src="/img/DeArrow.svg"
class="dearrow-thumbnail thumbnail-overlay thumbnail-top-right box-content aspect-square bg-transparent hover:grayscale"
:style="{ height: '1lh' }"
/>
</div>
<!-- progress bar -->
<div class="relative h-1 w-full">
<div
Expand Down Expand Up @@ -58,8 +74,22 @@ export default {
};
</script>

<style>
<style scoped>
.shorts-img {
@apply w-full object-contain;
}

.original-thumbnail {
display: none;
}

.video-thumbnail:has(.dearrow-thumbnail:hover):has(.original-thumbnail) {
.actual-thumbnail {
display: none;
}

.original-thumbnail {
display: initial;
}
}
</style>