send.php fix2
This commit is contained in:
@@ -524,7 +524,7 @@
|
||||
<script src="scripts/script.js" defer></script>
|
||||
<script src="scripts/tech-onepager.js" defer></script>
|
||||
<script src="scripts/cursor.js" defer></script>
|
||||
<script src="scripts/scroll-header.js" defer></script>
|
||||
<script src="scripts/scroll-header.min.js" defer></script>
|
||||
<script src="scripts/chat.js" defer></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
13
Profice WebSite/scripts/add/test.php
Normal file
13
Profice WebSite/scripts/add/test.php
Normal file
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
// Simple test file to verify PHP is working
|
||||
header('Content-Type: application/json');
|
||||
echo json_encode([
|
||||
'success' => true,
|
||||
'message' => 'PHP is working correctly',
|
||||
'timestamp' => date('c'),
|
||||
'server_info' => [
|
||||
'php_version' => phpversion(),
|
||||
'server_software' => $_SERVER['SERVER_SOFTWARE'] ?? 'Unknown'
|
||||
]
|
||||
]);
|
||||
?>
|
||||
2
Profice WebSite/scripts/scroll-header.min.js
vendored
2
Profice WebSite/scripts/scroll-header.min.js
vendored
@@ -1 +1 @@
|
||||
document.addEventListener("DOMContentLoaded", function(){const topBanner = document.querySelector('.top-banner');const slideMenu = document.querySelector('.slide-menu');if (!topBanner) return;// Configuration for ultra-smooth performance const scrollThreshold = 50;const rafDelay = 8;// 120fps for ultra-smooth const transitionDuration = 400;// Slightly longer for smoother feel // State tracking with performance optimization let isScrolled = false;let lastScrollY = 0;let scrollDirection = 'down';let rafId = null;let lastUpdateTime = 0;let scrollVelocity = 0;let lastScrollTime = 0;// Calculate scroll velocity for smoother transitions function calculateVelocity(currentScrollY, currentTime){if (lastScrollTime === 0){lastScrollTime = currentTime;return 0;}const timeDelta = currentTime - lastScrollTime;const scrollDelta = Math.abs(currentScrollY - lastScrollY);const velocity = scrollDelta / timeDelta;lastScrollTime = currentTime;return velocity;}// Ultra-smooth header state update with velocity-based easing function updateHeaderState(scrolled, velocity = 0){if (scrolled === isScrolled) return;// Add velocity-based class for different transition speeds if (velocity > 5){topBanner.classList.add('fast-scroll');}else{topBanner.classList.remove('fast-scroll');}// Use requestAnimationFrame for smooth DOM updates requestAnimationFrame(() =>{if (scrolled){topBanner.classList.add('scrolled');if (slideMenu){slideMenu.style.transition = 'top 0.3s cubic-bezier(0.4, 0, 0.2, 1)';slideMenu.style.top = '80px';}}else{topBanner.classList.remove('scrolled');if (slideMenu){slideMenu.style.transition = 'top 0.3s cubic-bezier(0.4, 0, 0.2, 1)';slideMenu.style.top = '110px';}}});isScrolled = scrolled;}// Advanced scroll handler with velocity detection function handleScroll(currentTime){// Ultra-high frequency throttling if (currentTime - lastUpdateTime < rafDelay){rafId = requestAnimationFrame(handleScroll);return;}const currentScrollY = window.pageYOffset || document.documentElement.scrollTop;const velocity = calculateVelocity(currentScrollY, currentTime);// Detect scroll direction with hysteresis for stability const scrollDelta = currentScrollY - lastScrollY;if (Math.abs(scrollDelta) > 1){scrollDirection = scrollDelta > 0 ? 'down' : 'up';}// Apply hysteresis to prevent flickering let shouldScroll;if (scrollDirection === 'down'){shouldScroll = currentScrollY > scrollThreshold + 10;}else{shouldScroll = currentScrollY > scrollThreshold - 10;}updateHeaderState(shouldScroll, velocity);lastScrollY = currentScrollY;lastUpdateTime = currentTime;rafId = null;}// Optimized scroll listener with passive event function onScroll(){if (!rafId){rafId = requestAnimationFrame(handleScroll);}}// Add scroll listener with maximum performance window.addEventListener('scroll', onScroll,{passive: true, capture: false});// Handle resize with debouncing let resizeTimeout;function onResize(){clearTimeout(resizeTimeout);resizeTimeout = setTimeout(() =>{lastScrollY = window.pageYOffset || document.documentElement.scrollTop;updateHeaderState(lastScrollY > scrollThreshold);}, 100);}window.addEventListener('resize', onResize,{passive: true});// Handle visibility change to pause/resume animations function onVisibilityChange(){if (document.hidden){if (rafId){cancelAnimationFrame(rafId);rafId = null;}}else{lastScrollY = window.pageYOffset || document.documentElement.scrollTop;updateHeaderState(lastScrollY > scrollThreshold);}}document.addEventListener('visibilitychange', onVisibilityChange);// Initialize with smooth transition requestAnimationFrame(() =>{updateHeaderState(window.pageYOffset > scrollThreshold);});// Add smooth scroll behavior to internal links document.querySelectorAll('a[href^="#"]').forEach(link =>{link.addEventListener('click', function(e){const targetId = this.getAttribute('href');if (targetId === '#') return;const targetElement = document.querySelector(targetId);if (targetElement){e.preventDefault();// Smooth scroll with header offset const headerHeight = topBanner.offsetHeight;const targetPosition = targetElement.offsetTop - headerHeight - 20;window.scrollTo({top: targetPosition, behavior: 'smooth'});}});});});
|
||||
document.addEventListener("DOMContentLoaded",function(){const topBanner=document.querySelector('.top-banner');const slideMenu=document.querySelector('.slide-menu');if(!topBanner)return;const scrollThreshold=50;let isScrolled=false;let lastScrollY=0;let rafId=null;function updateHeaderState(scrolled){if(scrolled===isScrolled)return;requestAnimationFrame(()=>{if(scrolled){topBanner.classList.add('scrolled');if(slideMenu){slideMenu.style.transition='top 0.3s cubic-bezier(0.4, 0, 0.2, 1)';slideMenu.style.top='80px';}}else{topBanner.classList.remove('scrolled');if(slideMenu){slideMenu.style.transition='top 0.3s cubic-bezier(0.4, 0, 0.2, 1)';slideMenu.style.top='110px';}}});isScrolled=scrolled;}function handleScroll(){const currentScrollY=window.pageYOffset||document.documentElement.scrollTop;const shouldScroll=currentScrollY>scrollThreshold;updateHeaderState(shouldScroll);lastScrollY=currentScrollY;rafId=null;}function onScroll(){if(!rafId){rafId=requestAnimationFrame(handleScroll);}}window.addEventListener('scroll',onScroll,{passive:true});updateHeaderState(window.pageYOffset>scrollThreshold);});
|
||||
|
||||
Reference in New Issue
Block a user