Improved compact scene tile layout, added dark versions of entity favicons.

This commit is contained in:
DebaucheryLibrarian 2021-01-17 23:31:49 +01:00
parent dd5284c55a
commit 1dea94c0cf
185 changed files with 232 additions and 123 deletions

View File

@ -71,7 +71,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import 'theme'; @import 'breakpoints';
.heading { .heading {
padding: 0; padding: 0;
@ -111,15 +111,9 @@ export default {
font-weight: bold; font-weight: bold;
} }
@media(max-width: $breakpoint3) { @media(max-width: $breakpoint-kilo) {
.tiles { .tiles {
grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); grid-gap: .5rem;
}
}
@media(max-width: $breakpoint2) {
.tiles {
grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr));
} }
} }
</style> </style>

View File

@ -4,122 +4,132 @@
:class="{ new: release.isNew }" :class="{ new: release.isNew }"
class="tile" class="tile"
> >
<span class="poster"> <div class="tile-body">
<a <span class="poster">
:href="`/scene/${release.id}/${release.slug || ''}`" <a
target="_blank" :href="`/scene/${release.id}/${release.slug || ''}`"
rel="noopener noreferrer" target="_blank"
class="link" rel="noopener noreferrer"
> class="link"
<img
v-if="release.poster"
:src="sfw ? `/img/${release.poster.sfw.thumbnail}` : `/media/${release.poster.thumbnail}`"
:style="{ 'background-image': sfw ? `/img/${release.poster.sfw.lazy}` : `/media/${release.poster.lazy}` }"
:alt="release.title"
class="thumbnail"
loading="lazy"
>
<span
v-else-if="release.covers && release.covers.length > 0"
class="covers"
> >
<img <img
v-for="cover in release.covers" v-if="release.poster"
:key="cover.id" :src="sfw ? `/img/${release.poster.sfw.thumbnail}` : `/media/${release.poster.thumbnail}`"
:src="sfw ? `/img/${cover.sfw.thumbnail}` : `/media/${cover.thumbnail}`" :style="{ 'background-image': sfw ? `/img/${release.poster.sfw.lazy}` : `/media/${release.poster.lazy}` }"
:style="{ 'background-image': sfw ? `/img/${cover.sfw.lazy}` : `/media/${cover.lazy}` }"
:alt="release.title" :alt="release.title"
class="thumbnail cover" class="thumbnail"
loading="lazy" loading="lazy"
> >
</span>
<div <span
v-else v-else-if="release.covers && release.covers.length > 0"
:title="release.title" class="covers"
class="thumbnail"
>No thumbnail available</div>
</a>
<Details :release="release" />
</span>
<div class="info">
<a
:href="`/scene/${release.id}/${release.slug || ''}`"
target="_blank"
rel="noopener noreferrer"
class="row link"
>
<h3
v-if="release.title"
v-tooltip.bottom="release.title"
:title="release.title"
class="title"
>{{ release.title }}</h3>
<h3
v-else-if="release.actors.length > 0"
class="title title-composed"
>{{ release.actors[0].name }} for {{ release.entity.name }}</h3>
<h3
v-else
class="title title-empty"
>{{ release.entity.name }}</h3>
</a>
<span class="row">
<ul
class="actors nolist"
:title="release.actors.map(actor => actor.name).join(', ')"
>
<li
v-for="actor in release.actors"
:key="actor.id"
class="actor"
> >
<router-link <img
:to="{ name: 'actor', params: { actorId: actor.id, actorSlug: actor.slug } }" v-for="cover in release.covers"
class="actor-link" :key="cover.id"
>{{ actor.name }}</router-link> :src="sfw ? `/img/${cover.sfw.thumbnail}` : `/media/${cover.thumbnail}`"
</li> :style="{ 'background-image': sfw ? `/img/${cover.sfw.lazy}` : `/media/${cover.lazy}` }"
</ul> :alt="release.title"
class="thumbnail cover"
loading="lazy"
>
</span>
<div
v-else
:title="release.title"
class="thumbnail"
>No thumbnail available</div>
</a>
</span> </span>
<div class="labels"> <div class="info">
<router-link <Details
v-if="release.shootId && release.studio" :release="release"
:to="{ name: 'studio', params: { entitySlug: release.studio.slug } }" class="details-wide"
:title="release.studio && release.studio.name" />
class="shoot nolink"
>{{ release.shootId }}</router-link>
<span <a
v-else-if="release.shootId" :href="`/scene/${release.id}/${release.slug || ''}`"
:title="release.studio && release.studio.name" target="_blank"
class="shoot nolink" rel="noopener noreferrer"
>{{ release.shootId }}</span> class="row link"
<ul
v-if="release.tags.length > 0"
:title="release.tags.map(tag => tag.name).join(', ')"
class="tags nolist"
> >
<li <h3
v-for="tag in release.tags" v-if="release.title"
:key="`tag-${tag.slug}`" v-tooltip.bottom="release.title"
class="tag" :title="release.title"
class="title"
>{{ release.title }}</h3>
<h3
v-else-if="release.actors.length > 0"
class="title title-composed"
>{{ release.actors[0].name }} for {{ release.entity.name }}</h3>
<h3
v-else
class="title title-empty"
>{{ release.entity.name }}</h3>
</a>
<span class="row">
<ul
class="actors nolist"
:title="release.actors.map(actor => actor.name).join(', ')"
> >
<router-link <li
:to="`/tag/${tag.slug}`" v-for="actor in release.actors"
class="tag-link" :key="actor.id"
>{{ tag.name }}</router-link> class="actor"
</li> >
</ul> <router-link
:to="{ name: 'actor', params: { actorId: actor.id, actorSlug: actor.slug } }"
class="actor-link"
>{{ actor.name }}</router-link>
</li>
</ul>
</span>
<div class="labels">
<router-link
v-if="release.shootId && release.studio"
:to="{ name: 'studio', params: { entitySlug: release.studio.slug } }"
:title="release.studio && release.studio.name"
class="shoot nolink"
>{{ release.shootId }}</router-link>
<span
v-else-if="release.shootId"
:title="release.studio && release.studio.name"
class="shoot nolink"
>{{ release.shootId }}</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> </div>
</div> </div>
<Details
:release="release"
class="details-compact"
/>
</div> </div>
</template> </template>
@ -147,7 +157,7 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import 'theme'; @import 'breakpoints';
.tile { .tile {
background: var(--background); background: var(--background);
@ -172,9 +182,13 @@ export default {
} }
} }
.tile-body {
display: flex;
flex-direction: column;
}
.poster { .poster {
position: relative; position: relative;
margin: 0 0 .6rem 0;
} }
.covers { .covers {
@ -213,6 +227,7 @@ export default {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-grow: 1; flex-grow: 1;
overflow: hidden;
} }
.link { .link {
@ -298,4 +313,53 @@ export default {
color: var(--primary); color: var(--primary);
} }
} }
.details-wide {
margin: 0 0 .5rem 0;
}
.details-compact {
display: none;
}
@media(max-width: $breakpoint-kilo) {
.tile-body {
flex-direction: row;
}
.poster {
margin: 0;
}
.thumbnail {
width: 9rem;
height: 100%;
}
.info {
padding: .5rem .25rem 0 .25rem;
}
.row {
margin: 0 0 .15rem 0;
}
.title,
.actor-link {
font-size: .9rem;
}
.details-wide {
display: none;
}
.details-compact {
display: flex;
border-top: solid 1px var(--shadow-hint);
}
.shoot {
display: none;
}
}
</style> </style>

View File

@ -12,10 +12,17 @@
:title="`Part of ${release.entity.parent.name}`" :title="`Part of ${release.entity.parent.name}`"
:to="`/${release.entity.parent.type}/${release.entity.parent.slug}`" :to="`/${release.entity.parent.type}/${release.entity.parent.slug}`"
class="site-link" class="site-link"
><img >
:src="`/img/logos/${release.entity.parent.slug}/favicon.png`" <img
class="favicon" :src="`/img/logos/${release.entity.parent.slug}/favicon_light.png`"
></router-link> class="favicon favicon-light"
>
<img
:src="`/img/logos/${release.entity.parent.slug}/favicon_dark.png`"
class="favicon favicon-dark"
>
</router-link>
<router-link <router-link
v-tooltip.bottom="`More from ${release.entity.name}`" v-tooltip.bottom="`More from ${release.entity.name}`"
@ -29,10 +36,17 @@
v-else v-else
:to="`/${release.entity.type}/${release.entity.slug}`" :to="`/${release.entity.type}/${release.entity.slug}`"
class="site site-link" class="site site-link"
><img >
:src="`/img/logos/${release.entity.slug}/favicon.png`" <img
class="favicon" :src="`/img/logos/${release.entity.slug}/favicon_light.png`"
>{{ release.entity.name }}</router-link> class="favicon favicon-light"
>
<img
:src="`/img/logos/${release.entity.slug}/favicon_dark.png`"
class="favicon favicon-dark"
>{{ release.entity.name }}
</router-link>
<a <a
v-if="release.date" v-if="release.date"
@ -68,6 +82,8 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
@import 'breakpoints';
.details { .details {
width: 100%; width: 100%;
display: flex; display: flex;
@ -79,8 +95,9 @@ export default {
box-shadow: 0 0 3px var(--darken); box-shadow: 0 0 3px var(--darken);
.favicon { .favicon {
width: 1rem; height: 2rem;
margin: 0 .25rem 0 0; box-sizing: border-box;
padding: .5rem;
} }
/* /*
@ -115,9 +132,43 @@ export default {
} }
} }
.site {
padding: 0 .5rem 0 0;
}
.site-link { .site-link {
display: flex; display: flex;
color: var(--text-light); color: var(--text-light);
text-decoration: none; text-decoration: none;
} }
.favicon-dark {
display: none;
}
@media(max-width: $breakpoint-kilo) {
/* light details bar
.details {
background: var(--background);
box-shadow: none;
.favicon-dark {
display: inline-block;
}
.favicon-light {
display: none;
}
}
.site-link,
.date {
color: var(--text);
}
*/
.site {
padding: 0 .5rem 0 0;
}
}
</style> </style>

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 832 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1018 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 923 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1006 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1012 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 931 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Some files were not shown because too many files have changed in this diff Show More