Spaces:
Running
Running
i need best graphics effect for website
Browse files- components/parallax.js +3 -0
- index.html +32 -1
- script.js +46 -1
- style.css +105 -0
components/parallax.js
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<parallax-element bg-image="url1.jpg" mg-image="url2.jpg" fg-image="url3.jpg">
|
| 2 |
+
<!-- Your content here -->
|
| 3 |
+
</parallax-element>
|
index.html
CHANGED
|
@@ -318,6 +318,37 @@
|
|
| 318 |
<script>
|
| 319 |
feather.replace();
|
| 320 |
</script>
|
| 321 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 322 |
</body>
|
| 323 |
</html>
|
|
|
|
| 318 |
<script>
|
| 319 |
feather.replace();
|
| 320 |
</script>
|
| 321 |
+
<!-- SVG Filter for Liquid Distortion -->
|
| 322 |
+
<svg style="position: absolute; width: 0; height: 0; overflow: hidden;" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
| 323 |
+
<defs>
|
| 324 |
+
<filter id="liquid" x="-20%" y="-20%" width="140%" height="140%">
|
| 325 |
+
<feTurbulence type="turbulence" baseFrequency="0.05" numOctaves="2" result="turbulence" seed="1"/>
|
| 326 |
+
<feDisplacementMap in2="turbulence" in="SourceGraphic" scale="15" xChannelSelector="R" yChannelSelector="G" result="displacement"/>
|
| 327 |
+
</filter>
|
| 328 |
+
</defs>
|
| 329 |
+
</svg>
|
| 330 |
+
|
| 331 |
+
<!-- Floating Particles -->
|
| 332 |
+
<div id="floating-particles"></div>
|
| 333 |
+
<script>
|
| 334 |
+
// Generate floating particles
|
| 335 |
+
document.addEventListener('DOMContentLoaded', () => {
|
| 336 |
+
const container = document.getElementById('floating-particles');
|
| 337 |
+
if (container) {
|
| 338 |
+
for (let i = 0; i < 30; i++) {
|
| 339 |
+
const particle = document.createElement('div');
|
| 340 |
+
particle.className = 'particle-float';
|
| 341 |
+
particle.style.width = `${Math.random() * 10 + 5}px`;
|
| 342 |
+
particle.style.height = particle.style.width;
|
| 343 |
+
particle.style.left = `${Math.random() * 100}%`;
|
| 344 |
+
particle.style.bottom = '0';
|
| 345 |
+
particle.style.animationDuration = `${Math.random() * 10 + 10}s`;
|
| 346 |
+
particle.style.animationDelay = `${Math.random() * 5}s`;
|
| 347 |
+
container.appendChild(particle);
|
| 348 |
+
}
|
| 349 |
+
}
|
| 350 |
+
});
|
| 351 |
+
</script>
|
| 352 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 353 |
</body>
|
| 354 |
</html>
|
script.js
CHANGED
|
@@ -1,5 +1,50 @@
|
|
|
|
|
| 1 |
document.addEventListener('DOMContentLoaded', function() {
|
| 2 |
-
//
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 4 |
anchor.addEventListener('click', function (e) {
|
| 5 |
e.preventDefault();
|
|
|
|
| 1 |
+
|
| 2 |
document.addEventListener('DOMContentLoaded', function() {
|
| 3 |
+
// Add cursor trail effect
|
| 4 |
+
const cursorTrail = document.createElement('div');
|
| 5 |
+
cursorTrail.style.position = 'fixed';
|
| 6 |
+
cursorTrail.style.width = '20px';
|
| 7 |
+
cursorTrail.style.height = '20px';
|
| 8 |
+
cursorTrail.style.background = 'radial-gradient(circle, rgba(124,58,237,0.8) 0%, rgba(14,165,233,0.4) 70%, transparent 100%)';
|
| 9 |
+
cursorTrail.style.borderRadius = '50%';
|
| 10 |
+
cursorTrail.style.pointerEvents = 'none';
|
| 11 |
+
cursorTrail.style.zIndex = '9999';
|
| 12 |
+
cursorTrail.style.transform = 'translate(-50%, -50%)';
|
| 13 |
+
cursorTrail.style.mixBlendMode = 'overlay';
|
| 14 |
+
document.body.appendChild(cursorTrail);
|
| 15 |
+
|
| 16 |
+
let posX = 0, posY = 0;
|
| 17 |
+
let mouseX = 0, mouseY = 0;
|
| 18 |
+
|
| 19 |
+
document.addEventListener('mousemove', (e) => {
|
| 20 |
+
mouseX = e.clientX;
|
| 21 |
+
mouseY = e.clientY;
|
| 22 |
+
});
|
| 23 |
+
|
| 24 |
+
const updateCursor = () => {
|
| 25 |
+
posX += (mouseX - posX) / 10;
|
| 26 |
+
posY += (mouseY - posY) / 10;
|
| 27 |
+
|
| 28 |
+
cursorTrail.style.left = `${posX}px`;
|
| 29 |
+
cursorTrail.style.top = `${posY}px`;
|
| 30 |
+
|
| 31 |
+
requestAnimationFrame(updateCursor);
|
| 32 |
+
};
|
| 33 |
+
updateCursor();
|
| 34 |
+
|
| 35 |
+
// Add hover effect to interactive elements
|
| 36 |
+
const interactiveElements = document.querySelectorAll('a, button, [data-interactive]');
|
| 37 |
+
interactiveElements.forEach(el => {
|
| 38 |
+
el.addEventListener('mouseenter', () => {
|
| 39 |
+
cursorTrail.style.transform = 'translate(-50%, -50%) scale(2)';
|
| 40 |
+
cursorTrail.style.background = 'radial-gradient(circle, rgba(255,255,255,0.8) 0%, rgba(124,58,237,0.6) 70%, transparent 100%)';
|
| 41 |
+
});
|
| 42 |
+
el.addEventListener('mouseleave', () => {
|
| 43 |
+
cursorTrail.style.transform = 'translate(-50%, -50%) scale(1)';
|
| 44 |
+
cursorTrail.style.background = 'radial-gradient(circle, rgba(124,58,237,0.8) 0%, rgba(14,165,233,0.4) 70%, transparent 100%)';
|
| 45 |
+
});
|
| 46 |
+
});
|
| 47 |
+
// Smooth scrolling for anchor links
|
| 48 |
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 49 |
anchor.addEventListener('click', function (e) {
|
| 50 |
e.preventDefault();
|
style.css
CHANGED
|
@@ -88,6 +88,111 @@
|
|
| 88 |
perspective: 1000px;
|
| 89 |
}
|
| 90 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 91 |
/* Text Reveal Effect */
|
| 92 |
.text-reveal {
|
| 93 |
overflow: hidden;
|
|
|
|
| 88 |
perspective: 1000px;
|
| 89 |
}
|
| 90 |
|
| 91 |
+
/* Glowing Effects */
|
| 92 |
+
.glow-effect {
|
| 93 |
+
position: relative;
|
| 94 |
+
z-index: 1;
|
| 95 |
+
}
|
| 96 |
+
|
| 97 |
+
.glow-effect::before {
|
| 98 |
+
content: '';
|
| 99 |
+
position: absolute;
|
| 100 |
+
inset: 0;
|
| 101 |
+
background: inherit;
|
| 102 |
+
filter: blur(20px);
|
| 103 |
+
z-index: -1;
|
| 104 |
+
opacity: 0.7;
|
| 105 |
+
transform: scale(0.9);
|
| 106 |
+
border-radius: inherit;
|
| 107 |
+
}
|
| 108 |
+
|
| 109 |
+
.glow-effect:hover::before {
|
| 110 |
+
opacity: 1;
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
/* Liquid Distortion Effect */
|
| 114 |
+
.liquid-distortion {
|
| 115 |
+
position: relative;
|
| 116 |
+
overflow: hidden;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
.liquid-distortion img {
|
| 120 |
+
transition: transform 0.5s ease, filter 0.5s ease;
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
.liquid-distortion:hover img {
|
| 124 |
+
transform: scale(1.05);
|
| 125 |
+
filter: url('#liquid');
|
| 126 |
+
}
|
| 127 |
+
|
| 128 |
+
/* Glass Morphism */
|
| 129 |
+
.glass-morphism {
|
| 130 |
+
background: rgba(255, 255, 255, 0.15);
|
| 131 |
+
backdrop-filter: blur(10px);
|
| 132 |
+
-webkit-backdrop-filter: blur(10px);
|
| 133 |
+
border: 1px solid rgba(255, 255, 255, 0.18);
|
| 134 |
+
box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
|
| 135 |
+
}
|
| 136 |
+
|
| 137 |
+
/* Neon Text Effect */
|
| 138 |
+
.neon-text {
|
| 139 |
+
text-shadow:
|
| 140 |
+
0 0 5px #fff,
|
| 141 |
+
0 0 10px #fff,
|
| 142 |
+
0 0 20px currentColor,
|
| 143 |
+
0 0 40px currentColor;
|
| 144 |
+
animation: neon-pulse 1.5s infinite alternate;
|
| 145 |
+
}
|
| 146 |
+
|
| 147 |
+
@keyframes neon-pulse {
|
| 148 |
+
from { opacity: 0.8; }
|
| 149 |
+
to { opacity: 1; text-shadow:
|
| 150 |
+
0 0 10px #fff,
|
| 151 |
+
0 0 20px #fff,
|
| 152 |
+
0 0 30px currentColor,
|
| 153 |
+
0 0 40px currentColor,
|
| 154 |
+
0 0 50px currentColor,
|
| 155 |
+
0 0 60px currentColor,
|
| 156 |
+
0 0 70px currentColor;
|
| 157 |
+
}
|
| 158 |
+
}
|
| 159 |
+
|
| 160 |
+
/* Floating Particles */
|
| 161 |
+
.particle-float {
|
| 162 |
+
position: absolute;
|
| 163 |
+
border-radius: 50%;
|
| 164 |
+
background: rgba(255, 255, 255, 0.8);
|
| 165 |
+
animation: float-up 15s linear infinite;
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
@keyframes float-up {
|
| 169 |
+
0% { transform: translateY(100vh) scale(0); opacity: 0; }
|
| 170 |
+
10% { opacity: 1; }
|
| 171 |
+
90% { opacity: 1; }
|
| 172 |
+
100% { transform: translateY(-20vh) scale(1.5); opacity: 0; }
|
| 173 |
+
}
|
| 174 |
+
|
| 175 |
+
/* Holographic Effect */
|
| 176 |
+
.holographic {
|
| 177 |
+
background: linear-gradient(
|
| 178 |
+
45deg,
|
| 179 |
+
rgba(255, 0, 0, 0.5),
|
| 180 |
+
rgba(255, 165, 0, 0.5),
|
| 181 |
+
rgba(255, 255, 0, 0.5),
|
| 182 |
+
rgba(0, 255, 0, 0.5),
|
| 183 |
+
rgba(0, 0, 255, 0.5),
|
| 184 |
+
rgba(75, 0, 130, 0.5),
|
| 185 |
+
rgba(238, 130, 238, 0.5)
|
| 186 |
+
);
|
| 187 |
+
background-size: 400% 400%;
|
| 188 |
+
animation: holographic 15s ease infinite;
|
| 189 |
+
}
|
| 190 |
+
|
| 191 |
+
@keyframes holographic {
|
| 192 |
+
0% { background-position: 0% 50%; }
|
| 193 |
+
50% { background-position: 100% 50%; }
|
| 194 |
+
100% { background-position: 0% 50%; }
|
| 195 |
+
}
|
| 196 |
/* Text Reveal Effect */
|
| 197 |
.text-reveal {
|
| 198 |
overflow: hidden;
|