|
|
@ -5,17 +5,28 @@ |
|
|
|
:src="`/api/tmdb/image/${size}${src}`" @load="onPosterLoad"> |
|
|
|
<div v-else class="poster-content bg-gray-300 text-gray-500"> |
|
|
|
<svg aria-hidden="true" focusable="false" data-prefix="fas" data-icon="image" class="svg-inline--fa fa-image fa-w-16" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path fill="currentColor" d="M464 448H48c-26.51 0-48-21.49-48-48V112c0-26.51 21.49-48 48-48h416c26.51 0 48 21.49 48 48v288c0 26.51-21.49 48-48 48zM112 120c-30.928 0-56 25.072-56 56s25.072 56 56 56 56-25.072 56-56-25.072-56-56-56zM64 384h384V272l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L208 320l-55.515-55.515c-4.686-4.686-12.284-4.686-16.971 0L64 336v48z"></path></svg> |
|
|
|
<!-- <img v-else class="w-full h-full object-cover" loading="lazy" :ref="`poster-${index}`" |
|
|
|
:src="`/api/tmdb/image/w185${movie.poster_path}`"> --> |
|
|
|
</div> |
|
|
|
<!-- <div class="poster-decal" v-if="isOnPlex"> |
|
|
|
<img class="w-full" src="../assets/plex_logo.svg" alt="Watchable now on Plex"/> |
|
|
|
</div> --> |
|
|
|
<!-- <div class="absolute inset-0 z-20 flex items-end justify-center p-4"> --> |
|
|
|
<!-- <progress-ring class="w-1/3" fontSize="25" :ringWidth="10" :progress="0.99"/> --> |
|
|
|
<!-- <div class="w-full rounded-full bg-gray-100"> |
|
|
|
<div class="w-1/2 bg-red-500" style="padding-top: 6%"></div> |
|
|
|
</div> --> |
|
|
|
<!-- </div> --> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
<script lang="ts"> |
|
|
|
import ProgressRing from './ProgressRing.vue' |
|
|
|
import { defineComponent } from "vue"; |
|
|
|
|
|
|
|
export default defineComponent({ |
|
|
|
components: { |
|
|
|
ProgressRing, |
|
|
|
}, |
|
|
|
data() { |
|
|
|
return { |
|
|
|
isLoaded: false |
|
|
@ -28,6 +39,10 @@ export default defineComponent({ |
|
|
|
} |
|
|
|
}, |
|
|
|
props: { |
|
|
|
isOnPlex: { |
|
|
|
type: Boolean, |
|
|
|
default: false |
|
|
|
}, |
|
|
|
size: { |
|
|
|
type: String, |
|
|
|
default: "w342" |
|
|
@ -37,15 +52,24 @@ export default defineComponent({ |
|
|
|
}); |
|
|
|
</script> |
|
|
|
|
|
|
|
<style lang="postcss"> |
|
|
|
<style lang="css"> |
|
|
|
.poster { |
|
|
|
@apply relative overflow-hidden; |
|
|
|
} |
|
|
|
.poster > .poster-padding { |
|
|
|
padding-top: 143.885%; |
|
|
|
} |
|
|
|
.poster > .poster-decal { |
|
|
|
@apply absolute z-10 top-0 w-full shadow-sm; |
|
|
|
padding: 4%; |
|
|
|
background: rgb(31, 35, 38); |
|
|
|
transform: rotate(-45deg) translateX(-28%) translateY(-100%); |
|
|
|
} |
|
|
|
.poster > .poster-decal > img { |
|
|
|
@apply w-1/3 mx-auto; |
|
|
|
} |
|
|
|
.poster > .poster-content { |
|
|
|
@apply absolute inset-0 flex justify-center items-center; |
|
|
|
@apply absolute inset-0 flex justify-center items-center z-0 shadow-sm; |
|
|
|
} |
|
|
|
.poster > .poster-content > svg { |
|
|
|
width: 35%; |
|
|
|