Improved release detail bar behavior.

This commit is contained in:
ThePendulum 2020-07-01 00:25:27 +02:00
parent 240f53047d
commit 53870fda89
18 changed files with 195 additions and 1136 deletions

View File

@ -25,6 +25,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import 'theme';
.children { .children {
display: flex; display: flex;
box-sizing: border-box; box-sizing: border-box;
@ -53,4 +55,10 @@ export default {
display: none; display: none;
} }
} }
@media(max-width: $breakpoint0) {
.children.expanded {
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
}
}
</style> </style>

View File

@ -4,22 +4,28 @@
class="entity content" class="entity content"
> >
<div class="info"> <div class="info">
<a
:href="entity.url"
target="_blank"
rel="noopener"
class="link link-child"
>
<template v-if="entity.hasLogo"> <template v-if="entity.hasLogo">
<img <img
v-if="$route.name === 'network'" v-if="$route.name === 'network'"
class="logo" class="logo logo-child"
:src="`/img/logos/${entity.slug}/thumbs/network.png`" :src="`/img/logos/${entity.slug}/thumbs/network.png`"
> >
<img <img
v-else-if="entity.parent" v-else-if="entity.parent"
class="logo" class="logo logo-child"
:src="`/img/logos/${entity.parent.slug}/thumbs/${entity.slug}.png`" :src="`/img/logos/${entity.parent.slug}/thumbs/${entity.slug}.png`"
> >
<img <img
v-else v-else
class="logo" class="logo logo-child"
:src="`/img/logos/${entity.slug}/thumbs/${entity.slug}.png`" :src="`/img/logos/${entity.slug}/thumbs/${entity.slug}.png`"
> >
</template> </template>
@ -28,11 +34,12 @@
v-else v-else
class="name" class="name"
>{{ entity.name }}</h2> >{{ entity.name }}</h2>
</a>
<router-link <router-link
v-if="entity.parent" v-if="entity.parent"
:to="`/${entity.parent.type}/${entity.parent.slug}`" :to="`/${entity.parent.type}/${entity.parent.slug}`"
class="link parent-link" class="link link-parent"
> >
<img <img
v-if="entity.parent.hasLogo" v-if="entity.parent.hasLogo"
@ -160,6 +167,15 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
text-decoration: none; text-decoration: none;
flex-grow: 1;
}
.link-child {
margin: 0 2rem 0 0;
}
.link-parent {
flex-direction: row-reverse;
} }
} }
@ -176,7 +192,7 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
padding: 0; padding: 0;
margin: 0; white-space: nowrap;
font-size: 1.5rem; font-size: 1.5rem;
} }

View File

@ -20,26 +20,12 @@
>New</router-link> >New</router-link>
</span> </span>
<span class="tags">
<Filters <Filters
class="filters-block" class="filters"
:filter="filter" :filter="filter"
:available-tags="availableTags" :available-tags="availableTags"
@set-filter="setFilter" @set-filter="setFilter"
/> />
<v-popover class="filters-compact">
<Icon icon="filter" />
<div slot="popover">
<Filters
:compact="true"
:filter="filter"
@set-filter="setFilter"
/>
</div>
</v-popover>
</span>
</div> </div>
</template> </template>
@ -141,17 +127,6 @@ export default {
align-items: center; align-items: center;
} }
.filters-block {
display: inline-block;
}
.filters-compact {
font-size: 1rem;
font-weight: bold;
display: none;
margin: 0 0 0 .5rem;
}
.range-button { .range-button {
color: var(--shadow); color: var(--shadow);
display: inline-block; display: inline-block;
@ -187,23 +162,8 @@ export default {
} }
} }
.tags { .filters {
display: inline-block;
flex-shrink: 0; flex-shrink: 0;
} }
@media(max-width: $breakpoint2) {
.pagination {
display: none;
}
}
@media(max-width: $breakpoint) {
.filters-container {
display: none;
}
.filters-compact {
display: inline-block;
}
}
</style> </style>

View File

@ -151,4 +151,10 @@ export default {
fill: var(--success); fill: var(--success);
} }
} }
@media(max-width: $breakpoint0) {
.applied {
display: none;
}
}
</style> </style>

View File

@ -139,7 +139,6 @@ export default {
overflow-x: auto; overflow-x: auto;
scrollbar-width: none; scrollbar-width: none;
scroll-behavior: smooth; scroll-behavior: smooth;
padding: .5rem;
font-size: 0; font-size: 0;
&.expanded { &.expanded {
@ -197,7 +196,6 @@ export default {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
margin: 0 .5rem 0 0;
box-shadow: 0 0 3px var(--shadow-weak); box-shadow: 0 0 3px var(--shadow-weak);
.warning { .warning {

View File

@ -3,45 +3,22 @@
v-if="release" v-if="release"
class="content" class="content"
> >
<Scroll
class="scroll-light"
:expandable="false"
>
<Media :release="release" />
<template v-slot:expanded>
<Media
:release="release"
class="expanded"
/>
</template>
</Scroll>
<div class="details"> <div class="details">
<div class="column"> <div class="column">
<div class="site">
<template v-if="release.entity.parent">
<a
:href="`/${release.entity.type}/${release.entity.slug}`"
>
<img
:src="`/img/logos/${release.entity.parent.slug}/thumbs/${release.entity.slug}.png`"
:title="release.entity.name"
class="logo logo-site"
>
</a>
<span class="chain">by</span>
<a :href="`/network/${release.entity.parent.slug}`">
<img
:src="`/img/logos/${release.entity.parent.slug}/thumbs/network.png`"
:title="release.entity.parent.name"
:alt="release.entity.parent.name"
class="logo logo-network"
>
</a>
</template>
<a
v-else
:href="`/channel/${release.entity.slug}`"
>
<img
:src="`/img/logos/${release.entity.slug}/thumbs/network.png`"
:title="release.entity.name"
class="logo logo-site"
>
</a>
</div>
<div class="tidbits"> <div class="tidbits">
<a <a
v-if="release.date" v-if="release.date"
@ -55,22 +32,56 @@
> >
<span class="showable">{{ formatDate(release.date, 'MMM D, YYYY') }}</span> <span class="showable">{{ formatDate(release.date, 'MMM D, YYYY') }}</span>
<span class="hideable">{{ formatDate(release.date, 'MMMM D, YYYY') }}</span> <span class="hideable">{{ formatDate(release.date, 'MMMM D, YYYY') }}</span>
<Icon icon="share2" />
</a>
</div>
<div class="site">
<template v-if="release.entity.parent">
<a :href="`/network/${release.entity.parent.slug}`">
<img
:src="`/img/logos/${release.entity.parent.slug}/thumbs/network.png`"
:title="release.entity.parent.name"
:alt="release.entity.parent.name"
class="logo logo-network"
>
</a>
<span class="chain">presents</span>
<a
:href="`/${release.entity.type}/${release.entity.slug}`"
>
<img
v-if="release.entity.type === 'network'"
:src="`/img/logos/${release.entity.slug}/thumbs/network.png`"
:title="release.entity.name"
class="logo logo-site"
>
<img
v-else
:src="`/img/logos/${release.entity.parent.slug}/thumbs/${release.entity.slug}.png`"
:title="release.entity.name"
class="logo logo-site"
>
</a>
</template>
<a
v-else
:href="`/channel/${release.entity.slug}`"
>
<img
:src="`/img/logos/${release.entity.slug}/thumbs/network.png`"
:title="release.entity.name"
class="logo logo-site"
>
</a> </a>
</div> </div>
</div> </div>
</div> </div>
<Scroll class="scroll-light">
<Media :release="release" />
<template v-slot:expanded>
<Media
:release="release"
class="expanded"
/>
</template>
</Scroll>
<div class="info column"> <div class="info column">
<div class="row title-container"> <div class="row title-container">
<h2 class="title">{{ release.title }}</h2> <h2 class="title">{{ release.title }}</h2>
@ -152,9 +163,7 @@
<p <p
v-if="release.description" v-if="release.description"
class="row description" class="row description"
> >{{ release.description }}</p>
{{ release.description }}
</p>
<span class="row-label">Studio</span> <span class="row-label">Studio</span>
@ -162,13 +171,10 @@
v-if="release.studio" v-if="release.studio"
class="row" class="row"
> >
<a <router-link
v-if="release.studio" :to="`/studio/${release.studio.slug}`"
:href="release.studio.url"
target="_blank"
rel="noopener noreferrer"
class="link" class="link"
>{{ release.studio.name }}</a> >{{ release.studio.name }}</router-link>
</div> </div>
<span class="row-label">Shoot #</span> <span class="row-label">Shoot #</span>
@ -208,7 +214,7 @@
import Media from './media.vue'; import Media from './media.vue';
import Actor from '../actors/tile.vue'; import Actor from '../actors/tile.vue';
import Release from '../tile/release.vue'; import Release from './tile.vue';
import Releases from './releases.vue'; import Releases from './releases.vue';
import Scroll from '../scroll/scroll.vue'; import Scroll from '../scroll/scroll.vue';
@ -218,15 +224,6 @@ function pageTitle() {
async function mounted() { async function mounted() {
this.release = await this.$store.dispatch('fetchReleaseById', this.$route.params.releaseId); this.release = await this.$store.dispatch('fetchReleaseById', this.$route.params.releaseId);
/*
this.filename = format(config.filename.pattern, {
...this.release,
shootId: this.release.shootId || '',
date: this.formatDate(this.release.date, config.filename.date),
}, {
spreadSeparator: config.filename.separator,
});
*/
} }
export default { export default {
@ -267,6 +264,7 @@ export default {
cursor: default; cursor: default;
.column { .column {
height: 100%;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
@ -280,6 +278,7 @@ export default {
.tidbits { .tidbits {
flex-shrink: 0; flex-shrink: 0;
height: 100%;
} }
.tidbit { .tidbit {
@ -291,15 +290,15 @@ export default {
border-right: solid 1px var(--lighten-hint); border-right: solid 1px var(--lighten-hint);
} }
.icon {
fill: var(--lighten-weak);
margin: 0 .25rem 0 0;
}
&.date { &.date {
flex-shrink: 0; flex-shrink: 0;
padding: 0 1rem; padding: 0 2rem 0 0;
font-weight: bold; font-weight: bold;
.icon {
fill: var(--lighten);
margin: -.2rem 0 0 .5rem;
}
} }
} }
@ -315,7 +314,8 @@ export default {
} }
.logo-site { .logo-site {
height: 3rem; height: 2.5rem;
width: 100%;
max-width: 15rem; max-width: 15rem;
margin: .25rem 0; margin: .25rem 0;
object-fit: contain; object-fit: contain;
@ -400,10 +400,6 @@ export default {
font-size: 1rem; font-size: 1rem;
} }
.scroll {
border-bottom: solid 1px var(--shadow-hint);
}
.actors { .actors {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr)); grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
@ -421,7 +417,7 @@ export default {
} }
.link { .link {
display: inline-block; display: inline-flex;
color: var(--link); color: var(--link);
text-decoration: none; text-decoration: none;
@ -472,10 +468,6 @@ export default {
display: inline-block; display: inline-block;
} }
.logo-site {
max-width: 100%;
}
.actors { .actors {
grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr)); grid-template-columns: repeat(auto-fill, minmax(8rem, 1fr));
} }

View File

@ -7,7 +7,7 @@
<span class="poster"> <span class="poster">
<span class="details"> <span class="details">
<span <span
v-if="release.entity.parent" v-if="release.entity.type !== 'network' && release.entity.parent"
class="site" class="site"
> >
<router-link <router-link

View File

@ -37,7 +37,7 @@
</template> </template>
<script> <script>
import Actor from '../tile/actor.vue'; import Actor from '../actors/tile.vue';
import Releases from '../releases/releases.vue'; import Releases from '../releases/releases.vue';
async function search() { async function search() {

View File

@ -1,282 +0,0 @@
<template>
<div
v-if="actor"
class="actor"
>
<router-link
:to="{ name: 'actor', params: { actorId: actor.id, actorSlug: actor.slug } }"
class="link"
>
<span
class="handle"
>
<span
v-tooltip.top="actor.name"
class="name"
>{{ actor.name }}</span>
<router-link
v-if="actor.network"
v-tooltip="actor.network.name"
:to="{ name: 'network', params: { networkSlug: actor.network.slug } }"
class="favicon"
>
<img
:src="`/img/logos/${actor.network.slug}/favicon.png`"
class="favicon-icon"
>
</router-link>
<Icon
v-if="alias"
v-tooltip="`Alias of ${alias.name}`"
icon="users3"
class="favicon alias"
/>
<Icon
v-if="actor.dateOfDeath"
v-tooltip="`Died ${formatDate(actor.dateOfDeath, 'MMMM D, YYYY')}`"
icon="tombstone"
class="favicon died"
/>
</span>
<div class="avatar-container">
<img
v-if="actor.avatar"
:data-src="sfw ? `/img/${actor.avatar.sfw.thumbnail}` : `/media/${actor.avatar.thumbnail}`"
:data-loading="sfw ? `/img/${actor.avatar.sfw.lazy}` : `/media/${actor.avatar.lazy}`"
class="avatar lazy"
>
<span
v-else
class="avatar"
><img
:src="`/img/avatar_${actor.gender || 'female'}.svg`"
class="avatar-fallback"
></span>
<span
class="details"
>
<span class="gender-age">
<Gender :gender="actor.gender" />
<span
v-if="actor.ageAtDeath"
v-tooltip="`Born ${formatDate(actor.dateOfBirth, 'MMMM D, YYYY')}<br>Died ${formatDate(actor.dateOfDeath, 'MMMM D, YYYY')}`"
class="age-death"
>{{ actor.ageAtDeath }}</span>
<span
v-else-if="actor.age"
v-tooltip="`Born on ${formatDate(actor.dateOfBirth, 'MMMM D, YYYY')}`"
class="age-now"
>{{ actor.age }}</span>
<span
v-if="actor.ageThen && actor.ageThen < actor.age"
v-tooltip="`${actor.ageThen} years old on release date`"
class="age-then"
>{{ actor.ageThen }}</span>
</span>
<span
v-if="actor.origin"
v-tooltip="`Born in ${actor.origin.country.alias || actor.origin.country.name}`"
class="country"
>
{{ actor.origin.country.alpha2 }}
<img
class="flag"
:src="`/img/flags/${actor.origin.country.alpha2.toLowerCase()}.svg`"
>
</span>
<span
v-else
class="country"
/>
</span>
</div>
</router-link>
</div>
</template>
<script>
import Gender from '../actors/gender.vue';
function sfw() {
return this.$store.state.ui.sfw;
}
export default {
components: {
Gender,
},
props: {
actor: {
type: Object,
default: null,
},
alias: {
type: Object,
default: null,
},
},
computed: {
sfw,
},
};
</script>
<style lang="scss" scoped>
@import 'theme';
.actor {
width: 100%;
display: inline-block;
position: relative;
margin: 0 .5rem .5rem 0;
box-shadow: 0 0 3px var(--darken-weak);
background: var(--background);
overflow: hidden;
&::before {
content: '';
display: inline-block;
padding-bottom: 150%;
}
}
.link {
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
position: absolute;
top: 0;
left: 0;
color: var(--text);
text-decoration: none;
&:hover {
color: var(--primary);
}
}
.handle {
display: flex;
align-items: center;
justify-content: center;
font-weight: bold;
box-shadow: 0 0 3px var(--shadow);
.name {
padding: .5rem;
}
.alias {
fill: var(--shadow);
}
}
.favicon {
font-size: 0;
padding: .5rem .25rem;
&:last-child {
padding: .5rem;
}
&.died {
fill: var(--shadow);
}
}
.favicon-icon {
width: 1rem;
height: 1rem;
}
.name {
flex-grow: 1;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.avatar-container {
display: flex;
flex-grow: 1;
position: relative;
overflow: hidden;
background: var(--profile);
}
.avatar {
color: var(--darken-weak);
background: var(--darken-hint);
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
object-fit: cover;
object-position: 50% 0;
}
.avatar-fallback {
max-height: 100%;
max-width: 100%;
opacity: .1;
}
.details {
background: var(--darken);
color: var(--text-light);
width: 100%;
height: 1.75rem;
display: flex;
align-items: center;
justify-content: space-between;
box-sizing: border-box;
padding: .5rem;
position: absolute;
bottom: 0;
font-size: .9rem;
font-weight: bold;
}
.gender-age {
display: flex;
align-items: center;
}
.gender {
margin: .25rem .25rem 0 0;
}
.country {
display: flex;
justify-content: flex-end;
align-items: center;
}
.flag {
height: .75rem;
margin: 0 0 0 .5rem;
}
.age-now,
.age-death {
margin: 0 .25rem 0 0;
}
.age-then {
color: var(--lighten);
}
</style>

View File

@ -1,74 +0,0 @@
<template>
<a
:href="`/${entity.type}/${entity.slug}`"
:title="entity.name"
class="tile"
>
<img
v-if="entity.type === 'channel'"
:src="`/img/logos/${entity.parent.slug}/thumbs/${entity.slug}.png`"
:alt="entity.name"
class="logo"
>
<img
v-else
:src="`/img/logos/${entity.slug}/thumbs/network.png`"
:alt="entity.name"
class="logo"
>
</a>
</template>
<script>
export default {
props: {
entity: {
type: Object,
default: null,
},
},
};
</script>
<style lang="scss" scoped>
@import 'theme';
.tile {
height: 6rem;
background: $tile;
display: flex;
flex-shrink: 0;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: .5rem 1rem;
border-radius: .25rem;
box-shadow: 0 0 3px rgba(0, 0, 0, .25);
text-align: center;
}
.link {
text-decoration: none;
}
.logo {
max-width: 100%;
max-height: 100%;
color: $text-contrast;
display: flex;
align-items: center;
justify-content: center;
font-size: 1rem;
font-weight: bold;
filter: $logo-highlight;
}
.title {
color: $text;
height: 100%;
display: flex;
align-items: center;
margin: 0;
}
</style>

View File

@ -1,67 +0,0 @@
<template>
<a
:href="`/network/${network.slug}`"
:title="network.name"
class="tile"
:class="{ sfw }"
>
<img
:src="`/img/logos/${network.slug}/thumbs/network.png`"
:alt="network.name"
class="logo lazy"
>
</a>
</template>
<script>
function sfw() {
return this.$store.state.ui.sfw;
}
export default {
props: {
network: {
type: Object,
default: null,
},
},
computed: {
sfw,
},
};
</script>
<style lang="scss" scoped>
@import 'theme';
.tile {
height: 6rem;
background: var(--profile);
display: flex;
flex-shrink: 0;
justify-content: center;
align-items: center;
box-sizing: border-box;
padding: .5rem 1rem;
box-shadow: 0 0 3px rgba(0, 0, 0, .25);
text-align: center;
}
.link {
text-decoration: none;
}
.logo {
max-width: 100%;
max-height: 100%;
font-size: 1rem;
}
.title {
color: var(--text);
height: 100%;
display: flex;
align-items: center;
margin: 0;
}
</style>

View File

@ -1,361 +0,0 @@
<template>
<div
:id="`${release.type}-${release.id}`"
:class="{ [release.type]: true }"
class="tile"
>
<span class="poster">
<span class="details">
<router-link
v-if="release.site && release.site.independent"
:to="`/network/${release.network.slug}`"
class="site site-link"
><img
:src="`/img/logos/${release.network.slug}/favicon.png`"
class="favicon"
>{{ release.network.name }}</router-link>
<span
v-else-if="release.network"
class="site"
>
<router-link
v-tooltip.bottom="`Part of ${release.network.name}`"
:title="`Part of ${release.network.name}`"
:to="`/network/${release.network.slug}`"
class="site-link"
><img
:src="`/img/logos/${release.network.slug}/favicon.png`"
class="favicon"
></router-link>
<router-link
v-tooltip.bottom="`More from ${release.site.name}`"
:title="`More from ${release.site.name}`"
:to="`/site/${release.site.slug}`"
class="site-link"
>{{ release.site.name }}</router-link>
</span>
<span v-else />
<a
v-if="release.date"
v-tooltip.bottom="release.url && `View scene on ${release.site.name}`"
:title="release.url && `View scene on ${release.site.name}`"
:href="release.url"
:class="{ upcoming: isAfter(release.date, new Date()), new: release.isNew }"
target="_blank"
rel="noopener noreferrer"
class="date"
>{{ formatDate(release.date, 'MMM D, YYYY') }}</a>
<a
v-else
:href="release.url"
:class="{ upcoming: isAfter(release.date, new Date()), new: release.isNew }"
title="Scene date N/A, showing date added"
target="_blank"
rel="noopener noreferrer"
class="date"
>{{ `(${formatDate(release.dateAdded, 'MMM D, YYYY')})` }}</a>
</span>
<a
:href="`/${release.type || 'scene'}/${release.id}/${release.slug}`"
target="_blank"
rel="noopener noreferrer"
class="link"
>
<img
v-if="release.poster"
:data-src="sfw ? `/img/${release.poster.sfw.thumbnail}` : `/media/${release.poster.thumbnail}`"
:data-loading="sfw ? `/img/${release.poster.sfw.lazy}` : `/media/${release.poster.lazy}`"
:alt="release.title"
class="thumbnail"
>
<span
v-else-if="release.covers && release.covers.length > 0"
class="covers"
>
<img
v-for="cover in release.covers"
:key="cover.id"
:data-src="sfw ? `/img/${cover.sfw.thumbnail}` : `/media/${cover.thumbnail}`"
:data-loading="sfw ? `/img/${cover.sfw.lazy}` : `/media/${cover.lazy}`"
:alt="release.title"
class="thumbnail cover"
>
</span>
<div
v-else
:title="release.title"
class="thumbnail"
>No thumbnail available</div>
</a>
</span>
<div class="info">
<a
:href="`/${release.type || 'scene'}/${release.id}/${release.slug}`"
target="_blank"
rel="noopener noreferrer"
class="row link"
>
<h3
v-tooltip.top="release.title"
:title="release.title"
class="title"
>
<Icon
v-if="release.type === 'movie'"
icon="film"
/>{{ release.title }}
</h3>
</a>
<span class="row">
<ul class="actors nolist">
<li
v-for="actor in release.actors"
:key="actor.id"
class="actor"
>
<router-link
:to="{ name: 'actor', params: { actorId: actor.id, actorSlug: actor.slug } }"
class="actor-link"
>{{ actor.name }}</router-link>
</li>
</ul>
</span>
<ul
v-if="release.tags.length > 0"
:title="release.tags.map(tag => tag.name).join(', ')"
class="tags nolist"
>
<li
v-for="tag in release.tags"
:key="`tag-${tag.slug}`"
class="tag"
>
<router-link
:to="`/tag/${tag.slug}`"
class="tag-link"
>{{ tag.name }}</router-link>
</li>
</ul>
</div>
</div>
</template>
<script>
function sfw() {
return this.$store.state.ui.sfw;
}
export default {
props: {
release: {
type: Object,
default: null,
},
referer: {
type: String,
default: null,
},
},
computed: {
sfw,
},
};
</script>
<style lang="scss" scoped>
@import 'theme';
.tile {
background: var(--background);
display: flex;
flex-direction: column;
box-sizing: border-box;
padding: 0 0 .5rem 0;
overflow: hidden;
box-shadow: 0 0 3px var(--darken-weak);
height: 100%;
}
.poster {
position: relative;
margin: 0 0 .5rem 0;
}
.covers {
background: var(--profile);
display: flex;
.cover {
width: 50%;
}
}
.thumbnail {
width: 100%;
height: 14rem;
display: flex;
justify-content: center;
align-items: center;
object-fit: cover;
background-position: center;
background-size: cover;
background-color: var(--shadow-hint);
color: var(--shadow);
text-shadow: 1px 1px 0 var(--highlight);
}
.row {
display: flex;
justify-content: space-between;
align-items: center;
box-sizing: border-box;
padding: 0 .5rem;
margin: 0 0 .25rem 0;
}
.details {
width: 100%;
display: flex;
justify-content: space-between;
position: absolute;
font-size: 0;
.favicon {
height: 1rem;
margin: 0 .25rem 0 0;
}
}
.site,
.date {
color: var(--text-light);
display: flex;
align-items: center;
background: var(--darken);
position: relative;
font-size: .8rem;
padding: .25rem;
text-decoration: none;
}
.date {
&.upcoming:before {
content: '';
background: var(--primary);
width: .5rem;
display: inline-block;
position: absolute;
top: 0;
bottom: 0;
left: -.5rem;
}
&.new {
font-weight: bold;
}
}
.site {
font-weight: bold;
}
.site-link {
display: flex;
color: var(--text-light);
text-decoration: none;
}
.info {
display: flex;
flex-direction: column;
flex-grow: 1;
}
.link {
text-decoration: none;
}
.title {
margin: 0 .25rem .25rem 0;
color: var(--text);
max-height: 2.75rem;
font-size: 1rem;
line-height: 1.5;
text-overflow: ellipsis;
overflow: hidden;
.icon {
margin: 0 .25rem 0 0;
}
}
.network {
color: #555;
margin: 0 .25rem 0 0;
font-size: .8rem;
}
.actors {
word-wrap: break-word;
overflow: hidden;
max-height: 2.75rem;
line-height: 1.5rem;
}
.tags {
max-height: .5rem;
padding: .25rem .5rem 1rem .5rem;
word-wrap: break-word;
overflow-y: hidden;
}
.actor {
margin: 0 .25rem 0 0;
}
.tag {
margin: 0 .25rem .25rem 0;
}
.actor:not(:last-of-type)::after {
content: ",";
}
.actor-link {
text-decoration: none;
&:hover {
color: var(--primary);
}
}
.actor-link {
color: var(--link);
}
.tag-link {
color: var(--shadow);
display: inline-block;
padding: .25rem;
font-size: .75rem;
font-weight: bold;
text-decoration: none;
line-height: 1;
border: solid 1px var(--shadow-hint);
&:hover {
color: var(--primary);
}
}
</style>

View File

@ -1,67 +0,0 @@
<template>
<a
:href="`/site/${site.slug}`"
:title="site.name"
class="tile"
>
<img
:src="`/img/logos/${site.network.slug}/thumbs/${site.slug}.png`"
:alt="site.name"
class="logo"
>
</a>
</template>
<script>
export default {
props: {
site: {
type: Object,
default: null,
},
},
};
</script>
<style lang="scss" scoped>
@import 'theme';
.tile {
height: 6rem;
background: $tile;
display: flex;
flex-shrink: 0;
flex-direction: column;
align-items: center;
box-sizing: border-box;
padding: .5rem 1rem;
border-radius: .25rem;
box-shadow: 0 0 3px rgba(0, 0, 0, .25);
text-align: center;
}
.link {
text-decoration: none;
}
.logo {
width: 100%;
height: 5rem;
color: $text-contrast;
display: flex;
align-items: center;
justify-content: center;
object-fit: contain;
font-size: 1rem;
font-weight: bold;
filter: $logo-highlight;
}
.title {
color: $text;
height: 100%;
display: flex;
align-items: center;
margin: 0;
}
</style>

View File

@ -1,105 +0,0 @@
<template>
<router-link
:to="{ name: 'tag', params: { tagSlug: tag.slug, tags: 'all-tags', range: 'latest' } }"
:title="tag.name"
class="tile"
>
<span class="title">{{ tag.name }}</span>
<template v-if="tag.poster">
<img
v-if="!lazy && !sfw"
:src="`/img/${tag.poster.thumbnail}`"
:title="tag.poster.comment"
:alt="tag.name"
class="poster"
>
<img
v-if="!lazy && sfw"
:src="`/img/${tag.poster.sfw.thumbnail}`"
:title="tag.poster.sfw.comment"
:alt="tag.name"
class="poster"
>
<img
v-if="lazy && !sfw"
:data-src="`/img/${tag.poster.thumbnail}`"
:data-loading="`/img/${tag.poster.lazy}`"
:title="tag.poster.comment"
:alt="tag.name"
class="poster"
>
<img
v-if="lazy && sfw"
:data-src="`/img/${tag.poster.sfw.thumbnail}`"
:data-loading="`/img/${tag.poster.sfw.lazy}`"
:title="tag.poster.sfw.comment"
:alt="tag.name"
class="poster"
>
</template>
</router-link>
</template>
<script>
function sfw() {
return this.$store.state.ui.sfw;
}
export default {
props: {
tag: {
type: Object,
default: null,
},
lazy: {
type: Boolean,
default: false,
},
},
computed: {
sfw,
},
};
</script>
<style lang="scss" scoped>
@import 'theme';
.tile {
color: var(--text-light);
background: var(--profile);
display: flex;
flex-direction: column;
justify-content: flex-end;
box-sizing: border-box;
position: relative;
text-align: center;
text-decoration: none;
box-shadow: 0 0 3px var(--darken-weak);
}
.poster {
width: 100%;
height: 17rem;
object-fit: cover;
object-position: 50% 100%;
}
.title {
width: 100%;
display: flex;
box-sizing: border-box;
padding: .5rem 1rem;
position: absolute;
bottom: 0;
background: var(--darken);
font-size: 1rem;
font-weight: bold;
text-transform: capitalize;
text-shadow: 0 0 3px var(--darken-strong);
}
</style>

View File

@ -9,6 +9,10 @@
border-radius: 16px; border-radius: 16px;
} }
&:not(.popover) .tooltip-inner {
padding: .25rem .5rem;
}
.tooltip-arrow { .tooltip-arrow {
width: 0; width: 0;
height: 0; height: 0;

View File

@ -60,6 +60,10 @@ function initEntitiesActions(store, _router) {
offset: $offset offset: $offset
orderBy: $orderBy orderBy: $orderBy
filter: { filter: {
and: [
{
or: [
{
entity: { entity: {
or: [ or: [
{ slug: { equalTo: $entitySlug } }, { slug: { equalTo: $entitySlug } },
@ -67,6 +71,15 @@ function initEntitiesActions(store, _router) {
{ parent: { parent: { slug: { equalTo: $entitySlug } } } } { parent: { parent: { slug: { equalTo: $entitySlug } } } }
] ]
} }
}
{
studio: {
slug: { equalTo: $entitySlug },
}
}
]
}
{
or: [ or: [
{ {
date: { date: {
@ -84,6 +97,8 @@ function initEntitiesActions(store, _router) {
} }
} }
] ]
}
]
releasesTagsConnection: { releasesTagsConnection: {
none: { none: {
tag: { tag: {

View File

@ -102,6 +102,22 @@ const routes = [
component: Entity, component: Entity,
name: 'network', name: 'network',
}, },
{
path: '/studio/:entitySlug',
redirect: from => ({
name: 'studio',
params: {
...from.params,
range: 'latest',
pageNumber: 1,
},
}),
},
{
path: '/studio/:entitySlug/:range/:pageNumber',
component: Entity,
name: 'studio',
},
{ {
path: '/tag/:tagSlug', path: '/tag/:tagSlug',
redirect: from => ({ redirect: from => ({

View File

@ -51,7 +51,7 @@ async function attachChannelEntities(releases) {
const channelEntities = await knex('entities') const channelEntities = await knex('entities')
.select(knex.raw('entities.*, row_to_json(parents) as parent')) .select(knex.raw('entities.*, row_to_json(parents) as parent'))
.whereIn('entities.slug', releasesWithoutEntity.map(release => release.channel)) .whereIn('entities.slug', releasesWithoutEntity.map(release => release.channel))
.where('entities.type', 2) .where('entities.type', 'channel')
.leftJoin('entities AS parents', 'parents.id', 'entities.parent_id'); .leftJoin('entities AS parents', 'parents.id', 'entities.parent_id');
const channelEntitiesBySlug = channelEntities.reduce((acc, entity) => ({ ...acc, [entity.slug]: entity }), {}); const channelEntitiesBySlug = channelEntities.reduce((acc, entity) => ({ ...acc, [entity.slug]: entity }), {});
@ -84,7 +84,7 @@ async function attachStudios(releases) {
const studios = await knex('entities') const studios = await knex('entities')
.whereIn('slug', studioSlugs) .whereIn('slug', studioSlugs)
.where('type', 3); .where('type', 'studio');
const studioBySlug = studios.reduce((acc, studio) => ({ ...acc, [studio.slug]: studio }), {}); const studioBySlug = studios.reduce((acc, studio) => ({ ...acc, [studio.slug]: studio }), {});