Reinitialized commit. Update and actors overview with some filters.

This commit is contained in:
2023-12-30 06:29:53 +01:00
commit 3f099b5e95
1208 changed files with 134732 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
<template>
<div class="page">
<nav class="scopes">
<Link
href="/updates/latest"
class="scope nolink"
:active="scope === 'latest'"
>Latest</Link>
<Link
href="/updates/upcoming"
class="scope nolink"
:active="scope === 'upcoming'"
>Upcoming</Link>
<Link
href="/updates/new"
class="scope nolink"
:active="scope === 'new'"
>New</Link>
</nav>
<ul class="scenes nolist">
<li
v-for="scene in scenes"
:key="scene.id"
>
<Scene :scene="scene" />
</li>
</ul>
<Pagination />
</div>
</template>
<script setup>
import { defineProps, inject } from 'vue';
import Scene from './tile.vue';
import Pagination from '../pagination/pagination.vue';
const { routeParams } = inject('pageContext');
const { scope } = routeParams;
defineProps({
scenes: {
type: Array,
default: () => [],
},
});
</script>
<style scoped>
.page {
background: var(--background-base-10);
}
.scenes {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
gap: .75rem .5rem;
padding: 1rem;
}
.scopes {
margin-left: 1rem;
}
.scope {
box-sizing: border-box;
padding: 1rem;
color: var(--shadow);
font-size: .9rem;
font-weight: bold;
&.active {
color: var(--primary);
font-weight: bold;
}
}
</style>

188
components/scenes/tile.vue Normal file
View File

@@ -0,0 +1,188 @@
<template>
<div class="tile">
<Link
:href="`/scene/${scene.id}/${scene.slug}`"
target="_blank"
class="poster"
>
<img
v-if="scene.poster"
:src="scene.poster.isS3 ? `https://cdndev.traxxx.me/${scene.poster.thumbnail}` : `/media/${scene.poster.thumbnail}`"
:style="{ 'background-image': scene.poster.isS3 ? `url(https://cdndev.traxxx.me/${scene.poster.lazy})` : `url(/media/${scene.poster.lazy})` }"
loading="lazy"
class="thumbnail"
>
</Link>
<div class="meta">
<div class="channel">
<Link
:href="scene.channel.isIndependent || !scene.network ? `/${scene.channel.type}/${scene.channel.slug}` : `/${scene.network.type}/${scene.network.slug}`"
class="favicon-link"
>
<img
:src="scene.channel.isIndependent || !scene.network ? `/logos/${scene.channel.slug}/favicon.png` : `/logos/${scene.network.slug}/favicon.png`"
class="favicon"
>
</Link>
<Link
:href="`/${scene.channel.type}/${scene.channel.slug}`"
class="nolink channel-link"
>{{ scene.channel.name }}</Link>
</div>
<time
:datetime="scene.effectiveDate.toISOString()"
class="date"
>{{ format(scene.effectiveDate, 'MMM d, y') }}</time>
</div>
<Link
:href="`/scene/${scene.id}/${scene.slug}`"
:title="scene.title"
target="_blank"
class="row title nolink"
>{{ scene.title }}</Link>
<ul
class="row actors nolist"
:title="scene.actors.map((actor) => actor.name).join(', ')"
>
<li
v-for="actor in scene.actors"
:key="`actor-${scene.id}-${actor.id}`"
class="actor"
>
<Link
:href="`/actor/${actor.id}/${actor.slug}`"
class="nolink"
>{{ actor.name }}</Link>
</li>
</ul>
<ul
class="row tags nolist"
:title="scene.tags.map((tag) => tag.name).join(', ')"
>
<li
v-for="tag in scene.tags"
:key="`tag-${scene.id}-${tag.id}`"
class="tag"
>
<Link
:href="`/tag/${tag.slug}`"
class="nolink"
>{{ tag.name }}</Link>
</li>
</ul>
</div>
</template>
<script setup>
import { format } from 'date-fns';
defineProps({
scene: {
type: Object,
default: null,
},
});
</script>
<style scoped>
.tile {
width: 100%;
overflow: hidden;
background: var(--background-base);
border-radius: .25rem;
box-shadow: 0 0 3px var(--shadow-weak-30);
}
.poster {
display: block;
height: 14rem;
border-radius: .25rem .25rem 0 0;
overflow: hidden;
}
.thumbnail {
height: 100%;
width: 100%;
object-fit: cover;
background-size: cover;
background-position: center;
}
.meta {
display: flex;
justify-content: space-between;
align-items: center;
padding: .4rem .5rem;
border-radius: 0 0 .25rem .25rem;
margin-bottom: .5rem;
font-size: .8rem;
color: var(--text-light);
background: var(--shadow-strong-30);
box-shadow: 0 0 3px var(--shadow);
}
.channel {
display: inline-flex;
align-items: center;
font-weight: bold;
}
.favicon-link {
display: inline-flex;
}
.favicon {
width: 1rem;
height: 1rem;
margin-right: .5rem;
}
.row {
margin: 0 .5rem .25rem .5rem;
font-size: .9rem;
}
.title {
display: block;
margin-bottom: .4rem;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
font-weight: bold;
}
.actor:hover,
.tag:hover {
color: var(--primary);
}
.actors {
height: 1rem;
overflow: hidden;
white-space: pre-wrap;
}
.actor {
&:not(:last-child)::after {
content: ',\0020';
}
}
.tags {
height: 1.25rem;
overflow: hidden;
}
.tag {
margin: 0 .5rem .25rem 0;
padding: .1rem 0;
color: var(--shadow-strong-10);
font-size: .75rem;
}
</style>