No erase of the page on menu selection
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
9bc0670474
commit
4395d3ed10
@ -50,14 +50,6 @@ $(window).on('load',function (){
|
|||||||
// bail out if we’re missing the basics:
|
// bail out if we’re missing the basics:
|
||||||
if (!titles.length || !sections.length) {
|
if (!titles.length || !sections.length) {
|
||||||
// scroll.js — right before your `if (!titles.length || !sections.length) {…}`
|
// scroll.js — right before your `if (!titles.length || !sections.length) {…}`
|
||||||
console.log(
|
|
||||||
'🔍 scroll.js finds:',
|
|
||||||
'titles=', titles.length,
|
|
||||||
'sections=', sections.length,
|
|
||||||
'projectBlocks=', projectBlocks.length,
|
|
||||||
'newsBlocks=', newsBlocks.length
|
|
||||||
);
|
|
||||||
|
|
||||||
console.warn("⚠️ Missing key elements, skipping scroll animations.");
|
console.warn("⚠️ Missing key elements, skipping scroll animations.");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -655,196 +647,13 @@ console.log(
|
|||||||
|
|
||||||
gsap.set(sections, {xPercent: 0});
|
gsap.set(sections, {xPercent: 0});
|
||||||
|
|
||||||
//menu navigation
|
// menu navigation
|
||||||
$(document).on('click', '.js-scroll-link', function () {
|
// super‑basic menu nav test
|
||||||
event.preventDefault();
|
|
||||||
if (!blockNavigation && !skipMode){
|
|
||||||
$('.header__menu').addClass('blocked');
|
|
||||||
gsap.fromTo('.home-page', {autoAlpha: 1}, {duration: 0.4,autoAlpha: 0},0);
|
|
||||||
skipMode = true;
|
|
||||||
let link = $(this).data('link'),
|
|
||||||
currentScroll = $('html').scrollTop();
|
|
||||||
setTimeout(function (){
|
|
||||||
st.scroll(parseInt(linkData[link]));
|
|
||||||
switch (link) {
|
|
||||||
case 0:
|
|
||||||
tlScrollLast.progress(0);
|
|
||||||
tlScroll.progress(0);
|
|
||||||
tl7.progress(0);
|
|
||||||
tl61.progress(0);
|
|
||||||
tl6.progress(0);
|
|
||||||
tl51.progress(0);
|
|
||||||
tl5.progress(0);
|
|
||||||
tl41.progress(0);
|
|
||||||
tl4.progress(0);
|
|
||||||
tl31.progress(0);
|
|
||||||
tl3.progress(0);
|
|
||||||
tl11.progress(0);
|
|
||||||
tl1.progress(0);
|
|
||||||
|
|
||||||
tlTitle7.progress(0).pause();
|
|
||||||
tlTitle6.progress(0).pause();
|
|
||||||
tlTitle5.progress(0).pause();
|
|
||||||
tlTitle4.progress(0).pause();
|
|
||||||
tlTitle3.progress(0).pause();
|
|
||||||
tlTitle2.progress(0).pause();
|
|
||||||
break;
|
|
||||||
case 1:
|
|
||||||
tlScrollLast.progress(0);
|
|
||||||
tlScroll.progress(0);
|
|
||||||
tl7.progress(0);
|
|
||||||
tl61.progress(0);
|
|
||||||
tl6.progress(0);
|
|
||||||
tl51.progress(0);
|
|
||||||
tl5.progress(0);
|
|
||||||
tl41.progress(0);
|
|
||||||
tl4.progress(0);
|
|
||||||
tl31.progress(0);
|
|
||||||
tl3.progress(0);
|
|
||||||
tl11.progress(0);
|
|
||||||
tl1.progress(1);
|
|
||||||
|
|
||||||
tlTitle7.progress(0).pause();
|
|
||||||
tlTitle6.progress(0).pause();
|
|
||||||
tlTitle5.progress(0).pause();
|
|
||||||
tlTitle4.progress(0).pause();
|
|
||||||
tlTitle3.progress(0).pause();
|
|
||||||
tlTitle2.progress(1).pause();
|
|
||||||
break;
|
|
||||||
case 2:
|
|
||||||
tlScrollLast.progress(0);
|
|
||||||
tlScroll.progress(0.25);
|
|
||||||
tl7.progress(0);
|
|
||||||
tl61.progress(0);
|
|
||||||
tl6.progress(0);
|
|
||||||
tl51.progress(0);
|
|
||||||
tl5.progress(0);
|
|
||||||
tl41.progress(0);
|
|
||||||
tl4.progress(0);
|
|
||||||
tl31.progress(1);
|
|
||||||
tl3.progress(1);
|
|
||||||
tl11.progress(1);
|
|
||||||
tl1.progress(1);
|
|
||||||
|
|
||||||
tlTitle7.progress(0).pause();
|
|
||||||
tlTitle6.progress(0).pause();
|
|
||||||
tlTitle5.progress(0).pause();
|
|
||||||
tlTitle4.progress(0).pause();
|
|
||||||
tlTitle3.progress(1).pause();
|
|
||||||
tlTitle2.progress(1).pause();
|
|
||||||
break;
|
|
||||||
case 3:
|
|
||||||
tlScrollLast.progress(0);
|
|
||||||
tlScroll.progress(0.5);
|
|
||||||
tl7.progress(0);
|
|
||||||
tl61.progress(0);
|
|
||||||
tl6.progress(0);
|
|
||||||
tl51.progress(0);
|
|
||||||
tl5.progress(0);
|
|
||||||
tl41.progress(1);
|
|
||||||
tl4.progress(1);
|
|
||||||
tl31.progress(1);
|
|
||||||
tl3.progress(1);
|
|
||||||
tl11.progress(1);
|
|
||||||
tl1.progress(1);
|
|
||||||
|
|
||||||
tlTitle7.progress(0).pause();
|
|
||||||
tlTitle6.progress(0).pause();
|
|
||||||
tlTitle5.progress(0).pause();
|
|
||||||
tlTitle4.progress(1).pause();
|
|
||||||
tlTitle3.progress(1).pause();
|
|
||||||
tlTitle2.progress(1).pause();
|
|
||||||
break;
|
|
||||||
case 4:
|
|
||||||
tlScrollLast.progress(0);
|
|
||||||
tlScroll.progress(0.75);
|
|
||||||
tl7.progress(0);
|
|
||||||
tl61.progress(0);
|
|
||||||
tl6.progress(0);
|
|
||||||
tl51.progress(1);
|
|
||||||
tl5.progress(1);
|
|
||||||
tl41.progress(1);
|
|
||||||
tl4.progress(1);
|
|
||||||
tl31.progress(1);
|
|
||||||
tl3.progress(1);
|
|
||||||
tl11.progress(1);
|
|
||||||
tl1.progress(1);
|
|
||||||
|
|
||||||
tlTitle7.progress(0).pause();
|
|
||||||
tlTitle6.progress(0).pause();
|
|
||||||
tlTitle5.progress(1).pause();
|
|
||||||
tlTitle4.progress(1).pause();
|
|
||||||
tlTitle3.progress(1).pause();
|
|
||||||
tlTitle2.progress(1).pause();
|
|
||||||
break;
|
|
||||||
case 5:
|
|
||||||
tlScrollLast.progress(0);
|
|
||||||
tlScroll.progress(1);
|
|
||||||
tl7.progress(0);
|
|
||||||
tl61.progress(0);
|
|
||||||
tl6.progress(1);
|
|
||||||
tl51.progress(1);
|
|
||||||
tl5.progress(1);
|
|
||||||
tl41.progress(1);
|
|
||||||
tl4.progress(1);
|
|
||||||
tl31.progress(1);
|
|
||||||
tl3.progress(1);
|
|
||||||
tl11.progress(1);
|
|
||||||
tl1.progress(1);
|
|
||||||
|
|
||||||
tlTitle7.progress(0).pause();
|
|
||||||
tlTitle6.progress(1).pause();
|
|
||||||
tlTitle5.progress(1).pause();
|
|
||||||
tlTitle4.progress(1).pause();
|
|
||||||
tlTitle3.progress(1).pause();
|
|
||||||
tlTitle2.progress(1).pause();
|
|
||||||
break;
|
|
||||||
case 6:
|
|
||||||
tlScrollLast.progress(1);
|
|
||||||
tlScroll.progress(1);
|
|
||||||
tl7.progress(1);
|
|
||||||
tl61.progress(1);
|
|
||||||
tl6.progress(1);
|
|
||||||
tl51.progress(1);
|
|
||||||
tl5.progress(1);
|
|
||||||
tl41.progress(1);
|
|
||||||
tl4.progress(1);
|
|
||||||
tl31.progress(1);
|
|
||||||
tl3.progress(1);
|
|
||||||
tl11.progress(1);
|
|
||||||
tl1.progress(1);
|
|
||||||
|
|
||||||
|
|
||||||
tlTitle7.progress(1).pause();
|
|
||||||
tlTitle6.progress(1).pause();
|
|
||||||
tlTitle5.progress(1).pause();
|
|
||||||
tlTitle4.progress(1).pause();
|
|
||||||
tlTitle3.progress(1).pause();
|
|
||||||
tlTitle2.progress(1).pause();
|
|
||||||
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
gsap.set(titles, {y: "100%"});
|
$(document).on('click', '.projects__menu a', function (event) {
|
||||||
gsap.set(titles[parseInt(link)], {y: "0"});
|
|
||||||
gsap.set(sections, {xPercent: -100 * parseInt(link), ease: "none"}, 0);
|
|
||||||
ScrollTrigger.refresh();
|
|
||||||
console.log('[✓] ScrollTrigger refreshed after menu click');
|
|
||||||
$('.header__menu li').removeClass('active');
|
|
||||||
$('.header__menu li').eq(parseInt(link)).addClass('active');
|
|
||||||
|
|
||||||
gsap.fromTo('.home-page', {autoAlpha: 0}, {duration: 0.5,autoAlpha: 1},0);
|
|
||||||
setTimeout(function (){
|
|
||||||
skipMode = false;
|
|
||||||
$('.header__menu').removeClass('blocked');
|
|
||||||
},500);
|
|
||||||
},500);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$(document).on('click', '.projects__menu a', function () {
|
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
let parent = $(this).parent(),
|
let parent = $(this).parent(),
|
||||||
progress = projectHeightsScroll[parent.index()] / (projectHeightsTotal - $('.projects__blocks').innerHeight()),
|
progress = projectHeightsScroll[parent.index()] / (projectHeightsTotal - $('.projects__blocks').innerHeight()),
|
||||||
@ -859,7 +668,7 @@ console.log(
|
|||||||
st.scroll(scrollTo);
|
st.scroll(scrollTo);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
$(document).on('click', '.js-scroll-link', function () {
|
$(document).on('click', '.js-scroll-link', function (event) {
|
||||||
event.preventDefault();
|
event.preventDefault();
|
||||||
let href = $(this).attr('href'),
|
let href = $(this).attr('href'),
|
||||||
topPos = $(href).offset(),
|
topPos = $(href).offset(),
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<div class="scroll">
|
<div class="scroll">
|
||||||
<div class="home-page">
|
<div class="home-page">
|
||||||
|
|
||||||
{{-- 1️⃣ Section titles (clean, text-based, no icons) --}}
|
{{-- 1️⃣ Section titles (text only) --}}
|
||||||
<div class="page-title show">
|
<div class="page-title show">
|
||||||
<ul>
|
<ul>
|
||||||
<li><div class="title">What is Polisplexity?</div><div class="number">1.0</div></li>
|
<li><div class="title">What is Polisplexity?</div><div class="number">1.0</div></li>
|
||||||
@ -23,27 +23,68 @@
|
|||||||
<canvas class="noise noise--inner" id="noise_menu"></canvas>
|
<canvas class="noise noise--inner" id="noise_menu"></canvas>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
{{-- 2️⃣ Section includes (scrollable containers) --}}
|
{{-- 2️⃣ Section containers with sticky-title + content --}}
|
||||||
<div class="scrollable">
|
<div class="scrollable">
|
||||||
@include('home.sections.home')
|
<section class="home">
|
||||||
|
<div class="sticky-title">
|
||||||
|
<ul><li><div>What is Polisplexitys?</div><div>1.0</div></li></ul>
|
||||||
|
</div>
|
||||||
|
@include('home.sections.home')
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="scrollable">
|
<div class="scrollable">
|
||||||
@include('home.sections.projects')
|
<section class="projects">
|
||||||
|
<div class="sticky-title">
|
||||||
|
<ul><li><div>Live Projects</div><div>2.0</div></li></ul>
|
||||||
|
</div>
|
||||||
|
@include('home.sections.projects')
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="scrollable">
|
<div class="scrollable">
|
||||||
@include('home.sections.awards')
|
<section class="awards">
|
||||||
|
<div class="sticky-title">
|
||||||
|
<ul><li><div>Recognitions</div><div>3.0</div></li></ul>
|
||||||
|
</div>
|
||||||
|
@include('home.sections.awards')
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="scrollable">
|
<div class="scrollable">
|
||||||
@include('home.sections.testimonials')
|
<section class="testimonials">
|
||||||
|
<div class="sticky-title">
|
||||||
|
<ul><li><div>What Partners Say</div><div>4.0</div></li></ul>
|
||||||
|
</div>
|
||||||
|
@include('home.sections.testimonials')
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="scrollable">
|
<div class="scrollable">
|
||||||
@include('home.sections.experience')
|
<section class="experience">
|
||||||
|
<div class="sticky-title">
|
||||||
|
<ul><li><div>Timeline</div><div>5.0</div></li></ul>
|
||||||
|
</div>
|
||||||
|
@include('home.sections.experience')
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="scrollable">
|
<div class="scrollable">
|
||||||
@include('home.sections.news')
|
<section class="news">
|
||||||
|
<div class="sticky-title">
|
||||||
|
<ul><li><div>Research & Insights</div><div>6.0</div></li></ul>
|
||||||
|
</div>
|
||||||
|
@include('home.sections.news')
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="scrollable">
|
<div class="scrollable">
|
||||||
@include('home.sections.contacts')
|
<section class="contacts">
|
||||||
|
<div class="sticky-title">
|
||||||
|
<ul><li><div>Let’s Collaborate</div><div>7.0</div></li></ul>
|
||||||
|
</div>
|
||||||
|
@include('home.sections.contacts')
|
||||||
|
</section>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
<section class="awards" id="recognitions">
|
|
||||||
<div class="sticky-title">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div>Recognitions</div>
|
|
||||||
<div>3.0</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="content__left">
|
<div class="content__left">
|
||||||
<div class="content__title">
|
<div class="content__title">
|
||||||
@ -79,4 +72,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
@ -1,12 +1,5 @@
|
|||||||
<section class="contacts" id="hireme">
|
|
||||||
<div class="sticky-title">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div>Contact</div>
|
|
||||||
<div>6.0</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="content__left">
|
<div class="content__left">
|
||||||
@ -81,4 +74,4 @@
|
|||||||
</form>
|
</form>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
@ -1,12 +1,3 @@
|
|||||||
<section class="experience">
|
|
||||||
<div class="sticky-title">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div>Milestones</div>
|
|
||||||
<div>5.0</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="content__bg"></div>
|
<div class="content__bg"></div>
|
||||||
@ -103,4 +94,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
<section class="home">
|
|
||||||
<div class="sticky-title">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div class="title">Polisplexity</div>
|
|
||||||
<div>1.0</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="content__left">
|
<div class="content__left">
|
||||||
<div class="content__title">
|
<div class="content__title">
|
||||||
@ -57,4 +49,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
@ -1,12 +1,3 @@
|
|||||||
<section class="news">
|
|
||||||
<div class="sticky-title">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div>team</div>
|
|
||||||
<div>8.0</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="content__left">
|
<div class="content__left">
|
||||||
@ -126,4 +117,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
@ -1,12 +1,4 @@
|
|||||||
<section class="projects">
|
|
||||||
<div class="sticky‑title">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div>City Intelligence</div>
|
|
||||||
<div>2.0</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="content__left">
|
<div class="content__left">
|
||||||
<div class="content__title">
|
<div class="content__title">
|
||||||
@ -92,4 +84,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
@ -1,12 +1,3 @@
|
|||||||
<section class="testimonials">
|
|
||||||
<div class="sticky-title">
|
|
||||||
<ul>
|
|
||||||
<li>
|
|
||||||
<div>Milestones</div>
|
|
||||||
<div>4.0</div>
|
|
||||||
</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="content" style="background-image: url('{{ asset('home/images/testmonials-bg.png') }}'); background-size: auto 100%; background-repeat: no-repeat; background-position: center center;">
|
<div class="content" style="background-image: url('{{ asset('home/images/testmonials-bg.png') }}'); background-size: auto 100%; background-repeat: no-repeat; background-position: center center;">
|
||||||
<div class="content__left">
|
<div class="content__left">
|
||||||
@ -102,4 +93,4 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user