Fixed scroll to top.

This commit is contained in:
DebaucheryLibrarian 2021-01-17 21:24:20 +01:00
parent 8bc1fbf530
commit dd5284c55a
35 changed files with 52 additions and 34 deletions

View File

@ -408,7 +408,7 @@ export default {
actor: null,
releases: null,
totalCount: 0,
limit: 15,
limit: 20,
pageTitle: null,
bioExpanded: false,
photosExpanded: false,

View File

@ -59,6 +59,7 @@
</nav>
<Pagination
ref="pagination"
:items-total="totalCount"
:items-per-page="limit"
/>
@ -99,6 +100,8 @@ async function fetchActors() {
this.actors = actors;
this.totalCount = totalCount;
this.$refs.pagination.$el.scrollIntoView();
}
function letter() {
@ -130,7 +133,7 @@ export default {
actors: [],
pageTitle: null,
totalCount: 0,
limit: 30,
limit: 50,
letters: ['all'].concat(Array.from({ length: 26 }, (value, index) => String.fromCharCode(index + 97).toUpperCase())),
};
},

View File

@ -20,8 +20,11 @@
@show-filters="(state) => toggleFilters(state)"
/>
<div class="content">
<router-view />
<div
ref="content"
class="content"
>
<router-view @scroll="scrollToTop" />
</div>
<Filters
@ -68,6 +71,10 @@ function resize(event) {
this.events.emit('resize', event);
}
function scrollToTop() {
this.$refs.content.scrollTop = 0;
}
function mounted() {
document.addEventListener('click', this.blur);
window.addEventListener('resize', this.resize);
@ -100,6 +107,7 @@ export default {
setConsent,
blur,
resize,
scrollToTop,
},
};
</script>

View File

@ -75,10 +75,7 @@
</router-link>
</div>
<div
ref="content"
class="content-inner"
>
<div class="content-inner">
<Scroll
v-if="entity.children.length > 0"
v-slot="scroll"
@ -94,6 +91,7 @@
</Scroll>
<FilterBar
ref="filter"
:fetch-releases="fetchEntity"
:items-total="totalCount"
:items-per-page="limit"
@ -115,8 +113,6 @@
</template>
<script>
import { nextTick } from 'vue';
import FilterBar from '../filters/filter-bar.vue';
import Pagination from '../pagination/pagination.vue';
import Releases from '../releases/releases.vue';
@ -137,9 +133,7 @@ async function fetchEntity() {
this.pageTitle = entity.name;
nextTick(() => {
this.$refs.content.scrollTop = 0;
});
this.$refs.filter.$el.scrollIntoView();
}
async function mounted() {

View File

@ -1,10 +1,8 @@
<template>
<div class="home">
<div
ref="content"
class="content-inner"
>
<div class="content-inner">
<FilterBar
ref="filter"
:fetch-releases="fetchReleases"
:is-home="true"
:items-total="totalCount"
@ -41,7 +39,7 @@ async function fetchReleases() {
this.totalCount = totalCount;
this.releases = releases;
this.$refs.content.scrollTop = 0;
this.$refs.filter.$el.scrollIntoView();
}
async function mounted() {
@ -61,7 +59,7 @@ export default {
releases: [],
networks: [],
pageTitle: null,
limit: 20,
limit: 30,
totalCount: 0,
from: null,
};

View File

@ -170,6 +170,7 @@ export default {
grid-template-columns: repeat(auto-fill, minmax(25rem, 1fr));
grid-gap: 1rem;
justify-content: center;
padding: 1rem;
margin: 0 0 1rem 0;
}
}
@ -250,7 +251,7 @@ export default {
}
.trailer-container {
max-height: 18rem;
height: 18rem;
width: 32rem;
max-width: 100%;
}

View File

@ -210,17 +210,21 @@ export default {
padding: 1rem .5rem 1rem 2rem;
}
.scroll-light .expand-dark {
.scroll .expand-light {
display: none;
}
.scroll-light {
.expand-light {
display: block;
}
.expand-dark {
display: none;
}
}
.scroll-dark .expand-light {
display: none;
}
@media(max-width: $breakpoint) {
.scroll-button {
display: none;
}
}
</style>

View File

@ -31,7 +31,11 @@
/>
</Scroll>
<FilterBar :fetch-releases="fetchReleases" />
<FilterBar
ref="filter"
:fetch-releases="fetchReleases"
/>
<Releases :releases="releases" />
<Pagination
@ -73,6 +77,8 @@ async function fetchReleases() {
this.hasMedia = this.tag.poster || this.tag.photos.length > 0;
this.description = this.tag.description && converter.makeHtml(escapeHtml(this.tag.description));
this.$refs.filter.$el.scrollIntoView();
}
async function mounted() {
@ -94,7 +100,7 @@ export default {
description: null,
releases: null,
totalCount: 0,
limit: 15,
limit: 20,
pageTitle: null,
hasMedia: false,
expanded: false,

View File

@ -191,6 +191,9 @@ const routes = [
const router = createRouter({
history: createWebHistory(),
routes,
scrollBehavior(to, from, savedPosition) {
console.log(to, from, savedPosition);
},
});
export default router;

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.8 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 8.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.6 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 MiB

After

Width:  |  Height:  |  Size: 4.7 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 38 KiB

After

Width:  |  Height:  |  Size: 38 KiB

View File

@ -471,7 +471,7 @@ const tags = [
{
name: 'gangbang',
slug: 'gangbang',
description: 'A group of three or more guys fucking a woman, at least two at the same time, often but not necessarily involving a [blowbang](/tag/blowbang), [spitroast](/tag/mfm), [double penetration](/tag/dp) and [airtight](/tag/airtight). If she only gets fucked by one guy at a time, it might be considered a [trainbang](/tag/trainbang) instead. In a reverse gangbang, multiple women fuck one man.', /* eslint-disable-line max-len */
description: 'Getting fucked by three or more cocks, at least two at the same time, often but not necessarily involving a [blowbang](/tag/blowbang), [spitroast](/tag/mfm), [double penetration](/tag/dp) and [airtight](/tag/airtight). If you get fucked by one guy at a time, it might be considered a [trainbang](/tag/trainbang). In a reverse gangbang, multiple women fuck one man.', /* eslint-disable-line max-len */
priority: 9,
group: 'group',
},
@ -492,7 +492,7 @@ const tags = [
{
name: 'trainbang',
slug: 'trainbang',
description: 'A group of three or more guys fucking a woman as in a [gangbang](/tag/gangbang), but one after the other, and never at the same time.',
description: 'Getting fucked by a group of three or more guys taking turns in a [gangbang](/tag/gangbang), one cock after the other, and never more than one at a time.',
priority: 7,
group: 'group',
},

View File

@ -587,7 +587,7 @@ const sfw = Object.entries({
const tagPosters = [
['69', 1, 'Melody Petite for 21Sextury'],
['airtight', 7, 'Lana Rhoades in "Gangbang Me 3" for HardX'],
['airtight', 2, 'Dakota Skye in "Dakota Goes Nuts" for ArchAngel'],
['anal', 0, 'Adriana Chechik in "Manuel Creampies Their Asses 3" for Jules Jordan'],
['anal-fingering', 0, 'Marry Queen in "Queen of Assholes" for Asshole Fever'],
['anal-creampie', 4, 'Chloe Cherry in "Chloe\'s Big Anal" for DarkX'],
@ -682,13 +682,13 @@ const tagPhotos = [
['69', 0, 'Abby Lee Brazil and Ramon Nomar for Wicked'],
['69', 4, 'Abella Danger and Karma Rx in "Neon Dreaming" for Brazzers'],
['69', 2, 'Abigail Mac and Kissa Sins in "Lesbian Anal Workout" for HardX'],
['airtight', 7, 'Lana Rhoades in "Gangbang Me 3" for HardX'],
['airtight', 6, 'Remy Lacroix in "Ass Worship 14" for Jules Jordan'],
['airtight', 2, 'Dakota Skye in "Dakota Goes Nuts" for ArchAngel'],
['airtight', 8, 'Veronica Leal in LegalPorno SZ2520'],
['airtight', 5, 'Chloe Amour in "DP Masters 4" for Jules Jordan'],
['airtight', 3, 'Anita Bellini in "Triple Dick Gangbang" for Hands On Hardcore (DDF Network)'],
['airtight', 9, 'Cindy Shine in LegalPorno GP1658'],
['airtight', 1, 'Jynx Maze in "Pump My Ass Full of Cum 3" for Jules Jordan'],
['airtight', 5, 'Chloe Amour in "DP Masters 4" for Jules Jordan'],
['atm', 3, 'Natasha Teen in "Work That Ass!" for Her Limit'],
['atm', 0, 'Roxy Lips in "Under Her Coat" for 21 Naturals'],
['atm', 6, 'Jane Wilde in "Teen Anal" for Evil Angel'],
@ -830,6 +830,7 @@ const tagPhotos = [
['fingering', 2, 'Kylie Page and Hadley Viscara in "Busty Blonde Bombshells" for LesbianX'],
['fingering', 0, 'Ashly Anderson in "Rough Love" for Hookup Hotshot'],
['gangbang', 'poster', 'Kristen Scott in "Interracial Gangbang!" for Jules Jordan'],
['gangbang', 7, 'Alexa Flexy in LegalPorno GL376'],
['gangbang', 0, '"4 On 1 Gangbangs" for Doghouse Digital'],
['gangbang', 6, 'Silvia Soprano in GIO1580 for LegalPorno'],
['gangbang', 4, 'Marley Brinx in "The Gangbang of Marley Brinx" for Jules Jordan'],