Scraping movie links from Gamma scene page. Removed expand option from scene page media to make way for album button.

This commit is contained in:
DebaucheryLibrarian 2021-01-22 22:55:20 +01:00
parent 40e0c92ec7
commit 985b523031
3 changed files with 34 additions and 21 deletions

View File

@ -158,22 +158,13 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import 'theme'; @import 'breakpoints';
.media { .media {
height: 18rem;
flex-shrink: 0; flex-shrink: 0;
white-space: nowrap; white-space: nowrap;
font-size: 0; font-size: 0;
height: 18rem;
&.expanded {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
grid-gap: 1rem;
justify-content: center;
padding: 1rem;
margin: 0 0 1rem 0;
}
} }
.poster-link { .poster-link {
@ -246,20 +237,19 @@ export default {
} }
.item { .item {
height: 100%;
max-width: 100%; max-width: 100%;
box-shadow: 0 0 3px var(--shadow-weak); box-shadow: 0 0 3px var(--shadow-weak);
background-size: cover; background-size: cover;
} }
.trailer-container { .trailer-container {
height: 18rem;
width: 32rem; width: 32rem;
max-width: 100%; max-width: 100%;
} }
.trailer { .trailer {
width: 100%; width: 100%;
max-width: 32rem;
max-height: 100%; max-height: 100%;
object-fit: cover; object-fit: cover;
@ -279,7 +269,23 @@ export default {
} }
} }
@media(max-width: $breakpoint0) { @media(max-width: $breakpoint-kilo) {
.media.expanded {
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr));
}
}
@media(max-width: $breakpoint) {
.media.expanded {
grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
}
}
@media(max-width: $breakpoint-micro) {
.media.expanded {
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
}
.media:not(.expanded) .item, .media:not(.expanded) .item,
.trailer-container { .trailer-container {
height: 56vw; /* 16:9 ratio for full-width video */ height: 56vw; /* 16:9 ratio for full-width video */

View File

@ -24,13 +24,6 @@
<Details :release="release" /> <Details :release="release" />
<Expand
v-if="release.photos && release.photos.length > 0"
class="expand-bottom expand-dark"
:expanded="expanded"
@expand="(state) => expanded = state"
/>
<div class="info column"> <div class="info column">
<div class="row"> <div class="row">
<h2 <h2

View File

@ -303,6 +303,20 @@ async function scrapeScene(html, url, site, baseRelease, mobileHtml) {
}, },
]; ];
const movie = $('.dvdLink');
if (movie) {
const movieUrl = qu.prefixUrl(movie.attr('href'), site.url);
release.movie = {
url: movieUrl,
title: movie.attr('title'),
entryId: movieUrl.match(/\/(\d+)(\/|$)/)?.[1],
covers: [movie.find('img').attr('src')],
entity: site,
};
}
return release; return release;
} }