Separated actor expand buttons. Refactored Brazzers scraper. Fixed actor releases not included in shallow scrape. Added number query and data-src default to qu img. Updated README. Removed post-install migrate and seed.

This commit is contained in:
2020-07-09 02:00:54 +02:00
parent 17d46e804e
commit 44a8ced30c
10 changed files with 289 additions and 326 deletions

View File

@@ -32,7 +32,7 @@
<div class="actor-inner">
<div
class="profile"
:class="{ expanded, 'with-avatar': !!actor.avatar }"
:class="{ expanded: bioExpanded, 'with-avatar': !!actor.avatar }"
>
<a
v-if="actor.avatar"
@@ -48,11 +48,12 @@
>
</a>
<span
v-show="expanded"
class="expand collapse-header noselect"
@click="expanded = false"
><Icon icon="arrow-up3" /></span>
<Expand
v-if="bioExpanded"
:expanded="bioExpanded"
class="expand expand-dark"
@expand="(state) => bioExpanded = state"
/>
<ul class="bio nolist">
<li
@@ -96,10 +97,10 @@
<span>
<span
v-if="actor.origin.city"
class="city hideable"
class="city"
>{{ actor.origin.city }}</span><span
v-if="actor.origin.state && (!actor.origin.city || (actor.origin.country && actor.origin.country.alpha2 === 'US'))"
class="state hideable"
class="state"
>{{ actor.origin.city ? `, ${actor.origin.state}` : actor.origin.state }}</span>
<span
@@ -116,17 +117,17 @@
<li
v-if="actor.residence"
class="bio-item residence"
class="bio-item residence hideable"
>
<dfn class="bio-label"><Icon icon="location" />Lives in</dfn>
<span>
<span
v-if="actor.residence.city"
class="city hideable"
class="city"
>{{ actor.residence.city }}</span><span
v-if="actor.residence.state && actor.residence.country && actor.residence.country.alpha2 === 'US'"
class="state hideable"
class="state"
>{{ actor.residence.city ? `, ${actor.residence.state}` : actor.residence.state }}</span>
<span
@@ -235,12 +236,6 @@
<li class="bio-item scraped hideable">Updated {{ formatDate(actor.updatedAt, 'YYYY-MM-DD HH:mm') }}, ID: {{ actor.id }}</li>
</ul>
<span
v-show="!expanded"
class="expand expand-header collapse-header noselect"
@click="expanded = true"
><Icon icon="arrow-down3" /></span>
<div class="descriptions-container">
<div
v-if="actor.descriptions && actor.descriptions.length > 0"
@@ -275,23 +270,23 @@
class="profile-social"
/>
<span
v-show="expanded"
class="expand expand-header collapse-header noselect"
@click="expanded = false"
><Icon icon="arrow-up3" /></span>
<Expand
:expanded="bioExpanded"
class="expand expand-dark"
@expand="(state) => bioExpanded = state"
/>
</div>
<div class="actor-content">
<Scroll
v-if="actor.avatar || (actor.photos && actor.photos.length > 0)"
:expanded="expanded"
:expanded="photosExpanded"
class="scroll-light"
@expand="(state) => expanded = state"
@expand="(state) => photosExpanded = state"
>
<Photos
:actor="actor"
:class="{ expanded }"
:class="{ expanded: photosExpanded }"
/>
</Scroll>
@@ -319,6 +314,7 @@ import Pagination from '../pagination/pagination.vue';
import FilterBar from '../header/filter-bar.vue';
import Releases from '../releases/releases.vue';
import Photos from './photos.vue';
import Expand from '../expand/expand.vue';
import Scroll from '../scroll/scroll.vue';
import Gender from './gender.vue';
import Social from './social.vue';
@@ -358,6 +354,7 @@ export default {
Pagination,
Photos,
Scroll,
Expand,
Releases,
Gender,
Social,
@@ -369,7 +366,8 @@ export default {
totalCount: 0,
limit: 10,
pageTitle: null,
expanded: false,
bioExpanded: false,
photosExpanded: false,
};
},
computed: {
@@ -640,57 +638,7 @@ export default {
}
.expand {
display: none;
justify-content: center;
align-items: center;
padding: .5rem .25rem;
font-weight: bold;
font-size: .9rem;
cursor: pointer;
.icon {
fill: var(--shadow);
}
&:hover {
background: var(--shadow-hint);
.icon {
fill: var(--shadow-strong);
}
}
}
.expand-sidebar:hover {
background: var(--shadow-hint);
}
.expand-header {
display: none;
&:hover {
background: var(--shadow-hint);
}
}
.collapse-header {
display: none;
width: 100%;
justify-content: center;
align-items: center;
padding: 0;
background: var(--profile);
.icon {
width: 100%;
fill: var(--highlight);
padding: .5rem 0;
}
&:hover .icon {
background: var(--highlight-hint);
fill: var(--text-contrast);
}
}
.scroll {
@@ -718,7 +666,6 @@ export default {
height: auto;
max-height: none;
flex-direction: column;
padding: 0 0 .5rem 0;
&.with-avatar {
height: auto;
@@ -742,30 +689,13 @@ export default {
margin: 0;
}
.expand,
.expand-header {
display: flex;
.expanded .bio-value {
white-space: normal;
}
/*
.expanded .descriptions-container {
display: block;
max-width: 100%;
max-height: 30rem;
margin: 0;
padding: 0 1rem;
}
*/
.expanded {
.collapse-header {
display: block;
}
.bio-value {
white-space: normal;
}
}
.expand {
display: block;
}
}
@media(max-width: $breakpoint0) {