Added actors page. Added site logos with overview on network page.

This commit is contained in:
2019-11-10 04:20:22 +01:00
parent 76618cee83
commit a9b91ff76c
44 changed files with 1065 additions and 13 deletions

View File

@@ -1,5 +1,126 @@
<template>
<div>
<h2>Actor</h2>
<div
v-if="actor"
class="content actor"
>
<div class="header">
<h2 class="title">{{ actor.name }}</h2>
</div>
<span class="description">{{ actor.description }}</span>
<div class="content-inner">
<h3 class="heading">Biography</h3>
<ul class="bio">
<li v-if="actor.aliases.length">
<dfn class="bio-heading">Also known as</dfn>
<span>{{ actor.aliases.join(', ') }}</span>
</li>
<li>
<dfn class="bio-heading">Born in</dfn>
<span v-if="actor.city">{{ actor.city }}</span>
<span>{{ actor.country || 'Unknown' }}</span>
</li>
<li>
<dfn class="bio-heading">Date of birth</dfn>
<span>{{ actor.birthdate || 'Unknown' }}</span>
</li>
<li>
<dfn class="bio-heading">Ethnicity</dfn>
<span>{{ actor.ethnicity || 'Unknown' }}</span>
</li>
<li>
<dfn class="bio-heading">Height</dfn>
<span>{{ actor.height || 'Unknown' }}</span>
</li>
<li>
<dfn class="bio-heading">Boobs</dfn>
<span>Size: {{ actor.boobSize || 'Unknown' }}</span>
<span v-if="actor.boobsNatural !== null">{{ actor.boobsNatural ? 'Natural' : 'Enhanced' }}</span>
</li>
</ul>
<h3 class="heading">Latest releases</h3>
<ul class="nolist scenes">
<li
v-for="release in releases"
:key="`release-${release.id}`"
>
<ReleaseTile :release="release" />
</li>
</ul>
</div>
</div>
</template>
<script>
import ReleaseTile from '../tile/release.vue';
async function mounted() {
[this.actor] = await this.$store.dispatch('fetchActors', this.$route.params.actorSlug);
this.releases = await this.$store.dispatch('fetchActorReleases', this.$route.params.actorSlug);
this.pageTitle = this.actor.name;
}
export default {
components: {
ReleaseTile,
},
data() {
return {
actor: null,
releases: null,
pageTitle: null,
};
},
mounted,
};
</script>
<style lang="scss" scoped>
@import 'theme';
.header {
display: flex;
justify-content: space-between;
padding: 1rem;
}
.title {
display: inline-block;
margin: 0 .5rem 0 0;
}
.heading {
padding: 0;
margin: 0 0 1rem 0;
}
.bio-heading {
display: inline-block;
font-weight: bold;
margin: .5rem 0 0 0;
&::after {
content: ':';
}
}
.scenes {
display: grid;
grid-gap: 1rem;
margin: 0 0 1rem 0;
}
.scenes {
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}
</style>

View File

@@ -0,0 +1,34 @@
<template>
<div class="errorpage">
<h1 class="error">404 - Not Found</h1>
<a
href="/"
class="home"
>Take me home</a>
</div>
</template>
<style lang="scss" scoped>
@import 'theme';
.errorpage {
background: $background;
color: $primary;
height: 100%;
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
font-size: 2rem;
}
.error {
margin: 0;
}
.home {
color: $shadow;
margin: 3rem 0;
}
</style>

View File

@@ -0,0 +1,127 @@
<template>
<div
v-if="network"
class="content network"
>
<div class="header">
<span class="intro">
<h2 class="title">
{{ network.name }}
<a
:href="network.url"
target="_blank"
rel="noopener noreferrer"
>
<Icon
icon="new-tab"
class="icon-href"
/>
</a>
</h2>
<span class="description">{{ network.description }}</span>
</span>
<a
:href="network.url"
target="_blank"
rel="noopener noreferrer"
>
<img
:src="`/img/networks/${network.slug}.png`"
class="logo"
>
</a>
</div>
<div class="content-inner">
<h3 class="heading">Sites</h3>
<ul class="nolist sites">
<li
v-for="site in network.sites"
:key="`site-${site.id}`"
>
<SiteTile :site="site" />
</li>
</ul>
<h3 class="heading">Latest releases</h3>
<ul class="nolist scenes">
<li
v-for="release in releases"
:key="`release-${release.id}`"
>
<ReleaseTile :release="release" />
</li>
</ul>
</div>
</div>
</template>
<script>
import ReleaseTile from '../tile/release.vue';
import SiteTile from '../tile/site.vue';
async function mounted() {
[this.network] = await this.$store.dispatch('fetchNetworks', this.$route.params.networkSlug);
this.releases = await this.$store.dispatch('fetchNetworkReleases', this.$route.params.networkSlug);
this.pageTitle = this.network.name;
}
export default {
components: {
ReleaseTile,
SiteTile,
},
data() {
return {
network: null,
releases: null,
pageTitle: null,
};
},
mounted,
};
</script>
<style lang="scss" scoped>
@import 'theme';
.header {
display: flex;
justify-content: space-between;
padding: 1rem;
}
.title {
display: inline-block;
margin: 0 .5rem 0 0;
}
.heading {
padding: 0;
margin: 0 0 1rem 0;
}
.logo {
height: 3rem;
}
.sites,
.scenes {
display: grid;
grid-gap: 1rem;
margin: 0 0 1rem 0;
}
.scenes {
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}
.sites {
grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
}
</style>

View File

@@ -0,0 +1,5 @@
<template>
<div>
<h1>Site</h1>
</div>
</template>

View File

@@ -0,0 +1,257 @@
<template>
<div class="tile">
<span class="banner">
<span class="details">
<a
:href="`/site/${release.site.slug}`"
:title="release.network.name"
target="_blank"
rel="noopener noreferrer"
class="site site-link"
>{{ release.site.name }}</a>
<a
v-if="release.date"
:href="release.url"
target="_blank"
rel="noopener noreferrer"
class="date"
>{{ formatDate(release.date, 'MMM D, YYYY') }}</a>
<a
v-else
:href="release.url"
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="`/scene/${release.id}`"
class="link"
>
<img
v-if="release.poster"
:src="`/media/${release.poster.path}`"
:alt="release.title"
class="thumbnail"
>
<img
v-else-if="release.photos.length > 0"
:src="`/media/${release.photos[0].path}`"
:alt="release.title"
class="thumbnail"
>
<div
v-else
:title="release.title"
class="thumbnail"
>No thumbnail available</div>
</a>
</span>
<div class="info">
<a
:href="`/scene/${release.id}`"
class="row link"
>
<h3
:title="release.title"
class="title"
>{{ release.title }}</h3>
</a>
<span class="row">
<ul class="actors nolist">
<li
v-for="actor in release.actors"
:key="actor.id"
class="actor"
>
<a
:href="`/actor/${actor.slug}`"
class="actor-link"
>{{ actor.name }}</a>
</li>
</ul>
</span>
<span
:title="release.tags.map(tag => tag.name).join(', ')"
class="row"
>
<ul class="tags nolist">
<li
v-for="tag in release.tags"
:key="`tag-${tag.slug}`"
class="tag"
>
<a
:href="`/tag/${tag.slug}`"
target="_blank"
rel="noopener noreferrer"
class="tag-link"
>{{ tag.name }}</a>
</li>
</ul>
</span>
</div>
</div>
</template>
<script>
export default {
props: {
release: {
type: Object,
default: null,
},
},
};
</script>
<style lang="scss" scoped>
@import 'theme';
.tile {
display: flex;
flex-direction: column;
box-sizing: border-box;
padding: 0 0 .5rem 0;
border-radius: .25rem;
overflow: hidden;
box-shadow: 0 0 3px rgba(0, 0, 0, .25);
height: 100%;
}
.banner {
position: relative;
margin: 0 0 .5rem 0;
}
.thumbnail {
width: 100%;
height: 12rem;
display: flex;
justify-content: center;
align-items: center;
object-fit: cover;
background-position: center;
background-size: cover;
background-color: $shadow-hint;
color: $shadow;
text-shadow: 1px 1px 0 $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;
align-items: center;
justify-content: space-between;
position: absolute;
}
.site,
.date {
color: #fff;
background: rgba(0, 0, 0, .5);
font-size: .8rem;
padding: .25rem;
text-decoration: none;
}
.site {
border-radius: 0 0 .25rem 0;
font-weight: bold;
}
.date {
border-radius: 0 0 0 .25rem;
}
.info {
flex-grow: 1;
}
.link {
text-decoration: none;
}
.title {
color: $text;
margin: 0;
font-size: 1rem;
word-wrap: break-word;
overflow: hidden;
max-height: 3rem;
line-height: 1.5rem;
}
.network {
color: #555;
margin: 0 .25rem 0 0;
font-size: .8rem;
}
.actors {
word-wrap: break-word;
overflow: hidden;
max-height: 2.5rem;
line-height: 1.25rem;
}
.tags {
word-wrap: break-word;
overflow: hidden;
max-height: 2.5rem;
line-height: 1.25rem;
}
.actor,
.tag {
margin: 0 .25rem 0 0;
}
.actor {
font-size: .9rem;
}
.tag {
font-size: .75rem;
}
.actor:not(:last-of-type)::after,
.tag:not(:last-child):after {
content: ",";
}
.actor-link,
.tag-link {
text-decoration: none;
&:hover {
color: $primary;
}
}
.actor-link {
color: $link;
}
.tag-link {
color: $shadow-strong;
}
</style>

View File

@@ -0,0 +1,60 @@
<template>
<a
:href="`/site/${site.slug}`"
class="tile"
>
<h3 class="title">
<object
:data="`/img/sites/${site.slug}.png`"
type="image/png"
class="logo"
>{{ site.name }}</object>
</h3>
</a>
</template>
<script>
export default {
props: {
site: {
type: Object,
default: null,
},
},
};
</script>
<style lang="scss" scoped>
@import 'theme';
.tile {
display: flex;
flex-direction: column;
align-items: center;
box-sizing: border-box;
padding: 1rem;
border-radius: .25rem;
box-shadow: 0 0 3px rgba(0, 0, 0, .25);
height: 100%;
text-align: center;
}
.link {
text-decoration: none;
}
.logo {
width: 100%;
height: 4rem;
object-fit: contain;
}
.title {
color: $text;
height: 100%;
display: flex;
align-items: center;
margin: 0;
font-size: 1rem;
}
</style>