Added studios to filters and scene page.

This commit is contained in:
2024-09-03 05:56:14 +02:00
parent c3362e614e
commit 60c7e2a876
12 changed files with 108 additions and 19 deletions

View File

@@ -76,6 +76,19 @@
/>
<div class="children-container">
<div
v-show="expanded"
class="expand-container expand-top"
>
<button
class="expand"
@click="expanded = !expanded"
>
<span class="expand-text">Collapse channels</span>
<Icon icon="arrow-up3" />
</button>
</div>
<ul
v-if="entity.children.length > 0"
ref="children"
@@ -252,7 +265,7 @@ const entityUrl = (() => {
align-items: center;
padding: .5rem;
border: none;
background: var(--grey-dark-50);
background: var(--grey-dark-40);
color: var(--highlight-strong-30);
font-size: .9rem;
font-weight: bold;
@@ -274,6 +287,17 @@ const entityUrl = (() => {
}
}
.expand-top {
height: 0;
top: 3.5rem;
bottom: auto;
position: sticky;
.expand {
height: 2rem;
}
}
.domains-bar {
display: none;
}

View File

@@ -1,6 +1,7 @@
import { render } from 'vike/abort'; /* eslint-disable-line import/extensions */
import { fetchEntitiesById } from '#/src/entities.js';
import entityPrefixes from '#/src/entities-prefixes.js';
import { fetchScenes } from '#/src/scenes.js';
import { fetchMovies } from '#/src/movies.js';
import { curateScenesQuery } from '#/src/web/scenes.js';
@@ -35,7 +36,8 @@ async function fetchReleases(pageContext, entityId) {
}
export async function onBeforeRender(pageContext) {
const entityId = await redis.hGet('traxxx:entities:id_by_slug', pageContext.routeParams.entityType === 'network' ? `_${pageContext.routeParams.entitySlug}` : pageContext.routeParams.entitySlug);
// const entityId = await redis.hGet('traxxx:entities:id_by_slug', pageContext.routeParams.entityType === 'network' ? `_${pageContext.routeParams.entitySlug}` : pageContext.routeParams.entitySlug);
const entityId = await redis.hGet('traxxx:entities:id_by_slug', `${entityPrefixes[pageContext.routeParams.entityType]}${pageContext.routeParams.entitySlug}`);
if (!entityId) {
throw render(404, `Cannot find ${pageContext.routeParams.entityType} '${pageContext.routeParams.entitySlug}'.`);

View File

@@ -1,7 +1,7 @@
import { match } from 'path-to-regexp';
// import { resolveRoute } from 'vike/routing'; // eslint-disable-line import/extensions
const path = '/:entityType(channel|network)/:entitySlug/:domain(scenes|movies|series)?/:scope?/:page?';
const path = '/:entityType(channel|network|studio)/:entitySlug/:domain(scenes|movies|series)?/:scope?/:page?';
const urlMatch = match(path, { decode: decodeURIComponent });
export default (pageContext) => {

View File

@@ -205,6 +205,18 @@
{{ scene.shootId }}
</div>
<div
v-if="scene.studio"
class="detail"
>
<h3 class="heading">Studio</h3>
<a
:href="`/studio/${scene.studio.slug}`"
class="link"
>{{ scene.studio.name }}</a>
</div>
<div
v-if="scene.qualities.length > 0"
class="detail"