Spaces:
Running
Running
divine animated magic psychedelic hallucination visual optical illusion website
Browse files- README.md +8 -5
- components/footer.js +113 -0
- components/navbar.js +134 -0
- index.html +67 -19
- script.js +191 -0
- style.css +135 -18
README.md
CHANGED
|
@@ -1,10 +1,13 @@
|
|
| 1 |
---
|
| 2 |
-
title: Psychedelic Visionarium
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
|
|
|
|
|
|
| 8 |
---
|
| 9 |
|
| 10 |
-
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
title: Psychedelic Visionarium ✨
|
| 3 |
+
colorFrom: blue
|
| 4 |
+
colorTo: gray
|
| 5 |
+
emoji: 🐳
|
| 6 |
sdk: static
|
| 7 |
pinned: false
|
| 8 |
+
tags:
|
| 9 |
+
- deepsite-v3
|
| 10 |
---
|
| 11 |
|
| 12 |
+
# Welcome to your new DeepSite project!
|
| 13 |
+
This project was created with [DeepSite](https://huggingface.co/deepsite).
|
components/footer.js
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class PsychedelicFooter extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
footer {
|
| 7 |
+
background: rgba(0, 0, 0, 0.9);
|
| 8 |
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
| 9 |
+
padding: 3rem 2rem;
|
| 10 |
+
margin-top: 4rem;
|
| 11 |
+
}
|
| 12 |
+
|
| 13 |
+
.footer-content {
|
| 14 |
+
max-width: 7xl;
|
| 15 |
+
margin: 0 auto;
|
| 16 |
+
display: grid;
|
| 17 |
+
grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
|
| 18 |
+
gap: 3rem;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.footer-section h3 {
|
| 22 |
+
font-family: 'Orbitron', monospace;
|
| 23 |
+
font-weight: 700;
|
| 24 |
+
margin-bottom: 1rem;
|
| 25 |
+
background: linear-gradient(45deg, #ff00ff, #00ffff);
|
| 26 |
+
-webkit-background-clip: text;
|
| 27 |
+
-webkit-text-fill-color: transparent;
|
| 28 |
+
background-clip: text;
|
| 29 |
+
}
|
| 30 |
+
|
| 31 |
+
.footer-links {
|
| 32 |
+
display: flex;
|
| 33 |
+
flex-direction: column;
|
| 34 |
+
gap: 0.5rem;
|
| 35 |
+
}
|
| 36 |
+
|
| 37 |
+
.footer-link {
|
| 38 |
+
color: rgba(255, 255, 255, 0.7);
|
| 39 |
+
text-decoration: none;
|
| 40 |
+
transition: color 0.3s ease;
|
| 41 |
+
}
|
| 42 |
+
|
| 43 |
+
.footer-link:hover {
|
| 44 |
+
color: #ff00ff;
|
| 45 |
+
}
|
| 46 |
+
|
| 47 |
+
.social-links {
|
| 48 |
+
display: flex;
|
| 49 |
+
gap: 1rem;
|
| 50 |
+
margin-top: 1rem;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.social-link {
|
| 54 |
+
color: rgba(255, 255, 255, 0.7);
|
| 55 |
+
transition: color 0.3s ease;
|
| 56 |
+
}
|
| 57 |
+
|
| 58 |
+
.social-link:hover {
|
| 59 |
+
color: #ff00ff;
|
| 60 |
+
}
|
| 61 |
+
|
| 62 |
+
.footer-bottom {
|
| 63 |
+
max-width: 7xl;
|
| 64 |
+
margin: 2rem auto 0;
|
| 65 |
+
padding-top: 2rem;
|
| 66 |
+
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
| 67 |
+
text-align: center;
|
| 68 |
+
color: rgba(255, 255, 255, 0.5);
|
| 69 |
+
}
|
| 70 |
+
|
| 71 |
+
@media (max-width: 768px) {
|
| 72 |
+
footer {
|
| 73 |
+
padding: 2rem 1rem;
|
| 74 |
+
}
|
| 75 |
+
}
|
| 76 |
+
</style>
|
| 77 |
+
<footer>
|
| 78 |
+
<div class="footer-content">
|
| 79 |
+
<div class="footer-section">
|
| 80 |
+
<h3>Psychedelic Visionarium</h3>
|
| 81 |
+
<p class="text-white/70">Exploring the boundaries of perception through divine animated magic and optical illusions.</p>
|
| 82 |
+
</div>
|
| 83 |
+
|
| 84 |
+
<div class="footer-section">
|
| 85 |
+
<h3>Quick Links</h3>
|
| 86 |
+
<div class="footer-links">
|
| 87 |
+
<a href="index.html" class="footer-link">Home</a>
|
| 88 |
+
<a href="gallery.html" class="footer-link">Gallery</a>
|
| 89 |
+
<a href="create.html" class="footer-link">Create</a>
|
| 90 |
+
<a href="about.html" class="footer-link">About</a>
|
| 91 |
+
</div>
|
| 92 |
+
</div>
|
| 93 |
+
|
| 94 |
+
<div class="footer-section">
|
| 95 |
+
<h3>Connect</h3>
|
| 96 |
+
<div class="social-links">
|
| 97 |
+
<a href="#" class="social-link"><i data-feather="instagram"></i></a>
|
| 98 |
+
<a href="#" class="social-link"><i data-feather="twitter"></i></a>
|
| 99 |
+
<a href="#" class="social-link"><i data-feather="github"></i></a>
|
| 100 |
+
<a href="#" class="social-link"><i data-feather="youtube"></i></a>
|
| 101 |
+
</div>
|
| 102 |
+
</div>
|
| 103 |
+
</div>
|
| 104 |
+
|
| 105 |
+
<div class="footer-bottom">
|
| 106 |
+
<p>© 2024 Psychedelic Visionarium. All realities reserved. ✨</p>
|
| 107 |
+
</div>
|
| 108 |
+
</footer>
|
| 109 |
+
`;
|
| 110 |
+
}
|
| 111 |
+
}
|
| 112 |
+
|
| 113 |
+
customElements.define('psychedelic-footer', PsychedelicFooter);
|
components/navbar.js
ADDED
|
@@ -0,0 +1,134 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
class PsychedelicNavbar extends HTMLElement {
|
| 2 |
+
connectedCallback() {
|
| 3 |
+
this.attachShadow({ mode: 'open' });
|
| 4 |
+
this.shadowRoot.innerHTML = `
|
| 5 |
+
<style>
|
| 6 |
+
:host {
|
| 7 |
+
display: block;
|
| 8 |
+
position: fixed;
|
| 9 |
+
top: 0;
|
| 10 |
+
width: 100%;
|
| 11 |
+
z-index: 1000;
|
| 12 |
+
}
|
| 13 |
+
|
| 14 |
+
nav {
|
| 15 |
+
background: rgba(0, 0, 0, 0.8);
|
| 16 |
+
backdrop-filter: blur(20px);
|
| 17 |
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
| 18 |
+
padding: 1rem 2rem;
|
| 19 |
+
}
|
| 20 |
+
|
| 21 |
+
.nav-content {
|
| 22 |
+
max-width: 7xl;
|
| 23 |
+
margin: 0 auto;
|
| 24 |
+
display: flex;
|
| 25 |
+
justify-content: space-between;
|
| 26 |
+
align-items: center;
|
| 27 |
+
}
|
| 28 |
+
|
| 29 |
+
.logo {
|
| 30 |
+
font-family: 'Orbitron', monospace;
|
| 31 |
+
font-weight: 900;
|
| 32 |
+
font-size: 1.5rem;
|
| 33 |
+
background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00);
|
| 34 |
+
-webkit-background-clip: text;
|
| 35 |
+
-webkit-text-fill-color: transparent;
|
| 36 |
+
background-clip: text;
|
| 37 |
+
}
|
| 38 |
+
|
| 39 |
+
.nav-links {
|
| 40 |
+
display: flex;
|
| 41 |
+
gap: 2rem;
|
| 42 |
+
align-items: center;
|
| 43 |
+
}
|
| 44 |
+
|
| 45 |
+
.nav-link {
|
| 46 |
+
color: white;
|
| 47 |
+
text-decoration: none;
|
| 48 |
+
font-weight: 500;
|
| 49 |
+
position: relative;
|
| 50 |
+
transition: all 0.3s ease;
|
| 51 |
+
}
|
| 52 |
+
|
| 53 |
+
.nav-link:hover {
|
| 54 |
+
color: #ff00ff;
|
| 55 |
+
}
|
| 56 |
+
|
| 57 |
+
.nav-link::after {
|
| 58 |
+
content: '';
|
| 59 |
+
position: absolute;
|
| 60 |
+
bottom: -5px;
|
| 61 |
+
left: 0;
|
| 62 |
+
width: 0;
|
| 63 |
+
height: 2px;
|
| 64 |
+
background: linear-gradient(45deg, #ff00ff, #00ffff);
|
| 65 |
+
transition: width 0.3s ease;
|
| 66 |
+
}
|
| 67 |
+
|
| 68 |
+
.nav-link:hover::after {
|
| 69 |
+
width: 100%;
|
| 70 |
+
}
|
| 71 |
+
|
| 72 |
+
.mobile-menu-btn {
|
| 73 |
+
display: none;
|
| 74 |
+
background: none;
|
| 75 |
+
border: none;
|
| 76 |
+
color: white;
|
| 77 |
+
cursor: pointer;
|
| 78 |
+
}
|
| 79 |
+
|
| 80 |
+
@media (max-width: 768px) {
|
| 81 |
+
nav {
|
| 82 |
+
padding: 1rem;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.mobile-menu-btn {
|
| 86 |
+
display: block;
|
| 87 |
+
}
|
| 88 |
+
|
| 89 |
+
.nav-links {
|
| 90 |
+
display: none;
|
| 91 |
+
position: absolute;
|
| 92 |
+
top: 100%;
|
| 93 |
+
left: 0;
|
| 94 |
+
width: 100%;
|
| 95 |
+
background: rgba(0, 0, 0, 0.9);
|
| 96 |
+
flex-direction: column;
|
| 97 |
+
padding: 1rem;
|
| 98 |
+
border-bottom: 1px solid rgba(255, 255, 255, 0.1);
|
| 99 |
+
}
|
| 100 |
+
|
| 101 |
+
.nav-links.active {
|
| 102 |
+
display: flex;
|
| 103 |
+
}
|
| 104 |
+
}
|
| 105 |
+
</style>
|
| 106 |
+
<nav>
|
| 107 |
+
<div class="nav-content">
|
| 108 |
+
<a href="index.html" class="logo">PSYCHEDELIC ✨</a>
|
| 109 |
+
|
| 110 |
+
<button class="mobile-menu-btn">
|
| 111 |
+
<i data-feather="menu"></i>
|
| 112 |
+
</button>
|
| 113 |
+
|
| 114 |
+
<div class="nav-links">
|
| 115 |
+
<a href="index.html" class="nav-link">Home</a>
|
| 116 |
+
<a href="gallery.html" class="nav-link">Gallery</a>
|
| 117 |
+
<a href="create.html" class="nav-link">Create</a>
|
| 118 |
+
<a href="about.html" class="nav-link">About</a>
|
| 119 |
+
</div>
|
| 120 |
+
</div>
|
| 121 |
+
</nav>
|
| 122 |
+
`;
|
| 123 |
+
|
| 124 |
+
// Add mobile menu functionality
|
| 125 |
+
const menuBtn = this.shadowRoot.querySelector('.mobile-menu-btn');
|
| 126 |
+
const navLinks = this.shadowRoot.querySelector('.nav-links');
|
| 127 |
+
|
| 128 |
+
menuBtn.addEventListener('click', () => {
|
| 129 |
+
navLinks.classList.toggle('active');
|
| 130 |
+
});
|
| 131 |
+
}
|
| 132 |
+
}
|
| 133 |
+
|
| 134 |
+
customElements.define('psychedelic-navbar', PsychedelicNavbar);
|
index.html
CHANGED
|
@@ -1,19 +1,67 @@
|
|
| 1 |
-
<!
|
| 2 |
-
<html>
|
| 3 |
-
|
| 4 |
-
|
| 5 |
-
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
|
| 9 |
-
|
| 10 |
-
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
<
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
<!DOCTYPE html>
|
| 2 |
+
<html lang="en">
|
| 3 |
+
<head>
|
| 4 |
+
<meta charset="UTF-8">
|
| 5 |
+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
+
<title>Psychedelic Visionarium ✨</title>
|
| 7 |
+
<link rel="stylesheet" href="style.css">
|
| 8 |
+
<script src="https://cdn.tailwindcss.com"></script>
|
| 9 |
+
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 10 |
+
<script src="https://unpkg.com/feather-icons"></script>
|
| 11 |
+
</head>
|
| 12 |
+
<body class="bg-black overflow-x-hidden">
|
| 13 |
+
<psychedelic-navbar></psychedelic-navbar>
|
| 14 |
+
|
| 15 |
+
<main>
|
| 16 |
+
<!-- Hero Section -->
|
| 17 |
+
<section class="relative min-h-screen flex items-center justify-center overflow-hidden">
|
| 18 |
+
<div class="absolute inset-0 psychedelic-bg"></div>
|
| 19 |
+
<div class="relative z-10 text-center px-4">
|
| 20 |
+
<h1 class="text-6xl md:text-8xl font-bold mb-6 psychedelic-text animate-pulse">
|
| 21 |
+
PSYCHEDELIC<br>VISIONARIUM
|
| 22 |
+
</h1>
|
| 23 |
+
<p class="text-xl md:text-2xl mb-8 text-white/80 font-light">
|
| 24 |
+
Where reality melts into divine animated magic
|
| 25 |
+
</p>
|
| 26 |
+
<button class="psychedelic-btn px-8 py-4 text-lg font-semibold rounded-full transform hover:scale-105 transition-all duration-300">
|
| 27 |
+
Enter the Portal
|
| 28 |
+
</button>
|
| 29 |
+
</div>
|
| 30 |
+
</section>
|
| 31 |
+
|
| 32 |
+
<!-- Optical Illusions Gallery -->
|
| 33 |
+
<section class="py-20 px-4">
|
| 34 |
+
<div class="max-w-7xl mx-auto">
|
| 35 |
+
<h2 class="text-4xl md:text-6xl font-bold text-center mb-16 psychedelic-text">Optical Wonders</h2>
|
| 36 |
+
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-8" id="illusions-grid">
|
| 37 |
+
<!-- Illusions will be loaded dynamically -->
|
| 38 |
+
</div>
|
| 39 |
+
</div>
|
| 40 |
+
</section>
|
| 41 |
+
|
| 42 |
+
<!-- Interactive Canvas -->
|
| 43 |
+
<section class="py-20 px-4 bg-gradient-to-b from-black to-purple-900/20">
|
| 44 |
+
<div class="max-w-6xl mx-auto text-center">
|
| 45 |
+
<h2 class="text-4xl md:text-6xl font-bold mb-8 psychedelic-text">Create Your Vision</h2>
|
| 46 |
+
<div class="bg-black/50 rounded-2xl p-8 border border-purple-500/30">
|
| 47 |
+
<canvas id="psychedelic-canvas" class="w-full h-96 rounded-xl cursor-crosshair"></canvas>
|
| 48 |
+
<div class="flex justify-center gap-4 mt-6">
|
| 49 |
+
<button onclick="clearCanvas()" class="psychedelic-btn px-6 py-3 rounded-full">Clear</button>
|
| 50 |
+
<button onclick="toggleAnimation()" class="psychedelic-btn px-6 py-3 rounded-full">Animate</button>
|
| 51 |
+
</div>
|
| 52 |
+
</div>
|
| 53 |
+
</div>
|
| 54 |
+
</section>
|
| 55 |
+
</main>
|
| 56 |
+
|
| 57 |
+
<psychedelic-footer></psychedelic-footer>
|
| 58 |
+
|
| 59 |
+
<script src="components/navbar.js"></script>
|
| 60 |
+
<script src="components/footer.js"></script>
|
| 61 |
+
<script src="script.js"></script>
|
| 62 |
+
<script>
|
| 63 |
+
feather.replace();
|
| 64 |
+
</script>
|
| 65 |
+
<script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
|
| 66 |
+
</body>
|
| 67 |
+
</html>
|
script.js
ADDED
|
@@ -0,0 +1,191 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
// Optical Illusions Data
|
| 2 |
+
const illusions = [
|
| 3 |
+
{
|
| 4 |
+
title: "Spinning Vortex",
|
| 5 |
+
description: "A mesmerizing spiral that appears to spin infinitely",
|
| 6 |
+
type: "spiral",
|
| 7 |
+
colors: ["#ff00ff", "#00ffff", "#ffff00"]
|
| 8 |
+
},
|
| 9 |
+
{
|
| 10 |
+
title: "Floating Grid",
|
| 11 |
+
description: "Grid patterns that seem to float and transform",
|
| 12 |
+
type: "grid",
|
| 13 |
+
colors: ["#ff0066", "#6600ff", "#00ff99"]
|
| 14 |
+
},
|
| 15 |
+
{
|
| 16 |
+
title: "Morphing Circles",
|
| 17 |
+
description: "Circles that continuously change shape and size",
|
| 18 |
+
type: "circles",
|
| 19 |
+
colors: ["#ff5500", "#55ff00", "#0055ff"]
|
| 20 |
+
},
|
| 21 |
+
{
|
| 22 |
+
title: "Pulsating Waves",
|
| 23 |
+
description: "Waves that create a breathing, living pattern",
|
| 24 |
+
type: "waves",
|
| 25 |
+
colors: ["#ff00aa", "#aa00ff", "#00aaff"]
|
| 26 |
+
},
|
| 27 |
+
{
|
| 28 |
+
title: "Kaleidoscope",
|
| 29 |
+
description: "Symmetrical patterns that shift and transform",
|
| 30 |
+
type: "kaleidoscope",
|
| 31 |
+
colors: ["#ffff00", "#ff00ff", "#00ffff"]
|
| 32 |
+
},
|
| 33 |
+
{
|
| 34 |
+
title: "Infinity Tunnel",
|
| 35 |
+
description: "A tunnel that appears to extend into infinity",
|
| 36 |
+
type: "tunnel",
|
| 37 |
+
colors: ["#ff0000", "#00ff00", "#0000ff"]
|
| 38 |
+
}
|
| 39 |
+
];
|
| 40 |
+
|
| 41 |
+
// Canvas Variables
|
| 42 |
+
let canvas, ctx;
|
| 43 |
+
let isAnimating = false;
|
| 44 |
+
let animationId;
|
| 45 |
+
|
| 46 |
+
// Initialize when DOM is loaded
|
| 47 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 48 |
+
initializeIllusions();
|
| 49 |
+
initializeCanvas();
|
| 50 |
+
startBackgroundAnimations();
|
| 51 |
+
});
|
| 52 |
+
|
| 53 |
+
// Initialize Optical Illusions Gallery
|
| 54 |
+
function initializeIllusions() {
|
| 55 |
+
const grid = document.getElementById('illusions-grid');
|
| 56 |
+
|
| 57 |
+
illusions.forEach((illusion, index) => {
|
| 58 |
+
const card = document.createElement('div');
|
| 59 |
+
card.className = 'illusion-card p-6';
|
| 60 |
+
card.innerHTML = `
|
| 61 |
+
<div class="w-full h-48 mb-4 rounded-lg ${illusion.type} ${index % 2 === 0 ? 'floating' : 'breathing'}"
|
| 62 |
+
style="background: conic-gradient(from 0deg, ${illusion.colors.join(', ')});"></div>
|
| 63 |
+
<h3 class="text-xl font-bold mb-2 psychedelic-text">${illusion.title}</h3>
|
| 64 |
+
<p class="text-white/70">${illusion.description}</p>
|
| 65 |
+
`;
|
| 66 |
+
grid.appendChild(card);
|
| 67 |
+
});
|
| 68 |
+
}
|
| 69 |
+
|
| 70 |
+
// Initialize Interactive Canvas
|
| 71 |
+
function initializeCanvas() {
|
| 72 |
+
canvas = document.getElementById('psychedelic-canvas');
|
| 73 |
+
ctx = canvas.getContext('2d');
|
| 74 |
+
|
| 75 |
+
// Set canvas size
|
| 76 |
+
canvas.width = canvas.offsetWidth;
|
| 77 |
+
canvas.height = canvas.offsetHeight;
|
| 78 |
+
|
| 79 |
+
// Add drawing functionality
|
| 80 |
+
let isDrawing = false;
|
| 81 |
+
let lastX = 0;
|
| 82 |
+
let lastY = 0;
|
| 83 |
+
let hue = 0;
|
| 84 |
+
|
| 85 |
+
canvas.addEventListener('mousedown', startDrawing);
|
| 86 |
+
canvas.addEventListener('mousemove', draw);
|
| 87 |
+
canvas.addEventListener('mouseup', stopDrawing);
|
| 88 |
+
canvas.addEventListener('mouseout', stopDrawing);
|
| 89 |
+
|
| 90 |
+
function startDrawing(e) {
|
| 91 |
+
isDrawing = true;
|
| 92 |
+
[lastX, lastY] = [e.offsetX, e.offsetY];
|
| 93 |
+
}
|
| 94 |
+
|
| 95 |
+
function draw(e) {
|
| 96 |
+
if (!isDrawing) return;
|
| 97 |
+
|
| 98 |
+
ctx.strokeStyle = `hsl(${hue}, 100%, 50%)`;
|
| 99 |
+
ctx.lineWidth = 3;
|
| 100 |
+
ctx.lineJoin = 'round';
|
| 101 |
+
ctx.lineCap = 'round';
|
| 102 |
+
|
| 103 |
+
ctx.beginPath();
|
| 104 |
+
ctx.moveTo(lastX, lastY);
|
| 105 |
+
ctx.lineTo(e.offsetX, e.offsetY);
|
| 106 |
+
ctx.stroke();
|
| 107 |
+
|
| 108 |
+
[lastX, lastY] = [e.offsetX, e.offsetY];
|
| 109 |
+
hue = (hue + 1) % 360;
|
| 110 |
+
}
|
| 111 |
+
|
| 112 |
+
function stopDrawing() {
|
| 113 |
+
isDrawing = false;
|
| 114 |
+
}
|
| 115 |
+
}
|
| 116 |
+
|
| 117 |
+
// Canvas Functions
|
| 118 |
+
function clearCanvas() {
|
| 119 |
+
ctx.fillStyle = 'rgba(0, 0, 0, 0.1)';
|
| 120 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 121 |
+
}
|
| 122 |
+
|
| 123 |
+
function toggleAnimation() {
|
| 124 |
+
isAnimating = !isAnimating;
|
| 125 |
+
|
| 126 |
+
if (isAnimating) {
|
| 127 |
+
animateCanvas();
|
| 128 |
+
} else {
|
| 129 |
+
cancelAnimationFrame(animationId);
|
| 130 |
+
}
|
| 131 |
+
}
|
| 132 |
+
|
| 133 |
+
function animateCanvas() {
|
| 134 |
+
if (!isAnimating) return;
|
| 135 |
+
|
| 136 |
+
// Create psychedelic animation
|
| 137 |
+
ctx.fillStyle = 'rgba(0, 0, 0, 0.05)';
|
| 138 |
+
ctx.fillRect(0, 0, canvas.width, canvas.height);
|
| 139 |
+
|
| 140 |
+
const time = Date.now() * 0.001;
|
| 141 |
+
|
| 142 |
+
for (let i = 0; i < 5; i++) {
|
| 143 |
+
const x = Math.sin(time * 0.5 + i) * canvas.width * 0.3 + canvas.width * 0.5;
|
| 144 |
+
const y = Math.cos(time * 0.7 + i) * canvas.height * 0.3 + canvas.height * 0.5;
|
| 145 |
+
const radius = Math.sin(time + i) * 50 + 70;
|
| 146 |
+
|
| 147 |
+
ctx.beginPath();
|
| 148 |
+
ctx.arc(x, y, radius, 0, Math.PI * 2);
|
| 149 |
+
ctx.strokeStyle = `hsl(${(time * 50 + i * 72) % 360}, 100%, 50%)`;
|
| 150 |
+
ctx.lineWidth = 3;
|
| 151 |
+
ctx.stroke();
|
| 152 |
+
}
|
| 153 |
+
|
| 154 |
+
animationId = requestAnimationFrame(animateCanvas);
|
| 155 |
+
}
|
| 156 |
+
|
| 157 |
+
// Background Animations
|
| 158 |
+
function startBackgroundAnimations() {
|
| 159 |
+
// Add floating particles
|
| 160 |
+
createFloatingParticles();
|
| 161 |
+
|
| 162 |
+
// Add occasional color shifts
|
| 163 |
+
setInterval(() => {
|
| 164 |
+
document.documentElement.style.setProperty('--hue-rotate', `${Math.random() * 360}deg`);
|
| 165 |
+
}, 3000);
|
| 166 |
+
}
|
| 167 |
+
|
| 168 |
+
function createFloatingParticles() {
|
| 169 |
+
const particlesContainer = document.createElement('div');
|
| 170 |
+
particlesContainer.className = 'fixed inset-0 pointer-events-none';
|
| 171 |
+
document.body.appendChild(particlesContainer);
|
| 172 |
+
|
| 173 |
+
for (let i = 0; i < 20; i++) {
|
| 174 |
+
const particle = document.createElement('div');
|
| 175 |
+
particle.className = 'absolute w-2 h-2 rounded-full';
|
| 176 |
+
particle.style.background = `hsl(${Math.random() * 360}, 100%, 50%)`;
|
| 177 |
+
particle.style.left = `${Math.random() * 100}%`;
|
| 178 |
+
particle.style.top = `${Math.random() * 100}%`;
|
| 179 |
+
particle.style.animation = `floating ${6 + Math.random() * 4}s ease-in-out infinite`;
|
| 180 |
+
particle.style.animationDelay = `${Math.random() * 5}s`;
|
| 181 |
+
particlesContainer.appendChild(particle);
|
| 182 |
+
}
|
| 183 |
+
}
|
| 184 |
+
|
| 185 |
+
// Handle window resize
|
| 186 |
+
window.addEventListener('resize', function() {
|
| 187 |
+
if (canvas) {
|
| 188 |
+
canvas.width = canvas.offsetWidth;
|
| 189 |
+
canvas.height = canvas.offsetHeight;
|
| 190 |
+
}
|
| 191 |
+
});
|
style.css
CHANGED
|
@@ -1,28 +1,145 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
body {
|
| 2 |
-
|
| 3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
}
|
| 5 |
|
| 6 |
-
|
| 7 |
-
|
| 8 |
-
margin-top: 0;
|
| 9 |
}
|
| 10 |
|
| 11 |
-
|
| 12 |
-
|
| 13 |
-
|
| 14 |
-
margin-bottom: 10px;
|
| 15 |
-
margin-top: 5px;
|
| 16 |
}
|
| 17 |
|
| 18 |
-
.
|
| 19 |
-
|
| 20 |
-
margin: 0 auto;
|
| 21 |
-
padding: 16px;
|
| 22 |
-
border: 1px solid lightgray;
|
| 23 |
-
border-radius: 16px;
|
| 24 |
}
|
| 25 |
|
| 26 |
-
.
|
| 27 |
-
|
| 28 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
@import url('https://fonts.googleapis.com/css2?family=Orbitron:wght@400;700;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');
|
| 2 |
+
|
| 3 |
+
* {
|
| 4 |
+
margin: 0;
|
| 5 |
+
padding: 0;
|
| 6 |
+
box-sizing: border-box;
|
| 7 |
+
}
|
| 8 |
+
|
| 9 |
body {
|
| 10 |
+
font-family: 'Space Grotesk', sans-serif;
|
| 11 |
+
background: #000;
|
| 12 |
+
color: white;
|
| 13 |
+
overflow-x: hidden;
|
| 14 |
+
}
|
| 15 |
+
|
| 16 |
+
.psychedelic-bg {
|
| 17 |
+
background:
|
| 18 |
+
radial-gradient(circle at 20% 80%, rgba(120, 119, 198, 0.3) 0%, transparent 50%),
|
| 19 |
+
radial-gradient(circle at 80% 20%, rgba(255, 119, 198, 0.3) 0%, transparent 50%),
|
| 20 |
+
radial-gradient(circle at 40% 40%, rgba(120, 219, 255, 0.2) 0%, transparent 50%);
|
| 21 |
+
animation: bgPulse 8s ease-in-out infinite alternate;
|
| 22 |
+
}
|
| 23 |
+
|
| 24 |
+
@keyframes bgPulse {
|
| 25 |
+
0% {
|
| 26 |
+
filter: hue-rotate(0deg);
|
| 27 |
+
transform: scale(1);
|
| 28 |
+
}
|
| 29 |
+
100% {
|
| 30 |
+
filter: hue-rotate(360deg);
|
| 31 |
+
transform: scale(1.1);
|
| 32 |
+
}
|
| 33 |
+
}
|
| 34 |
+
|
| 35 |
+
.psychedelic-text {
|
| 36 |
+
background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
|
| 37 |
+
background-size: 400% 400%;
|
| 38 |
+
-webkit-background-clip: text;
|
| 39 |
+
-webkit-text-fill-color: transparent;
|
| 40 |
+
background-clip: text;
|
| 41 |
+
animation: gradientShift 3s ease infinite;
|
| 42 |
+
}
|
| 43 |
+
|
| 44 |
+
@keyframes gradientShift {
|
| 45 |
+
0% { background-position: 0% 50%; }
|
| 46 |
+
50% { background-position: 100% 50%; }
|
| 47 |
+
100% { background-position: 0% 50%; }
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.psychedelic-btn {
|
| 51 |
+
background: linear-gradient(45deg, #ff00ff, #00ffff);
|
| 52 |
+
border: 2px solid transparent;
|
| 53 |
+
background-clip: padding-box;
|
| 54 |
+
position: relative;
|
| 55 |
+
color: white;
|
| 56 |
+
font-weight: bold;
|
| 57 |
+
text-transform: uppercase;
|
| 58 |
+
letter-spacing: 2px;
|
| 59 |
+
}
|
| 60 |
+
|
| 61 |
+
.psychedelic-btn::before {
|
| 62 |
+
content: '';
|
| 63 |
+
position: absolute;
|
| 64 |
+
top: -2px;
|
| 65 |
+
left: -2px;
|
| 66 |
+
right: -2px;
|
| 67 |
+
bottom: -2px;
|
| 68 |
+
background: linear-gradient(45deg, #ff00ff, #00ffff, #ffff00, #ff00ff);
|
| 69 |
+
background-size: 400% 400%;
|
| 70 |
+
border-radius: inherit;
|
| 71 |
+
z-index: -1;
|
| 72 |
+
animation: gradientShift 3s ease infinite;
|
| 73 |
+
}
|
| 74 |
+
|
| 75 |
+
.illusion-card {
|
| 76 |
+
background: rgba(255, 255, 255, 0.05);
|
| 77 |
+
backdrop-filter: blur(10px);
|
| 78 |
+
border: 1px solid rgba(255, 255, 255, 0.1);
|
| 79 |
+
border-radius: 20px;
|
| 80 |
+
overflow: hidden;
|
| 81 |
+
transition: all 0.3s ease;
|
| 82 |
+
position: relative;
|
| 83 |
+
}
|
| 84 |
+
|
| 85 |
+
.illusion-card:hover {
|
| 86 |
+
transform: translateY(-10px) scale(1.02);
|
| 87 |
+
border-color: rgba(255, 255, 255, 0.3);
|
| 88 |
+
box-shadow: 0 20px 40px rgba(255, 0, 255, 0.3);
|
| 89 |
+
}
|
| 90 |
+
|
| 91 |
+
.illusion-card::before {
|
| 92 |
+
content: '';
|
| 93 |
+
position: absolute;
|
| 94 |
+
top: 0;
|
| 95 |
+
left: -100%;
|
| 96 |
+
width: 100%;
|
| 97 |
+
height: 100%;
|
| 98 |
+
background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.1), transparent);
|
| 99 |
+
transition: left 0.5s ease;
|
| 100 |
+
}
|
| 101 |
+
|
| 102 |
+
.illusion-card:hover::before {
|
| 103 |
+
left: 100%;
|
| 104 |
+
}
|
| 105 |
+
|
| 106 |
+
.floating {
|
| 107 |
+
animation: floating 6s ease-in-out infinite;
|
| 108 |
+
}
|
| 109 |
+
|
| 110 |
+
@keyframes floating {
|
| 111 |
+
0%, 100% { transform: translateY(0px) rotate(0deg); }
|
| 112 |
+
50% { transform: translateY(-20px) rotate(180deg); }
|
| 113 |
+
}
|
| 114 |
+
|
| 115 |
+
.spiral {
|
| 116 |
+
animation: spiral 4s linear infinite;
|
| 117 |
+
}
|
| 118 |
+
|
| 119 |
+
@keyframes spiral {
|
| 120 |
+
0% { transform: rotate(0deg) scale(1); }
|
| 121 |
+
50% { transform: rotate(180deg) scale(1.2); }
|
| 122 |
+
100% { transform: rotate(360deg) scale(1); }
|
| 123 |
}
|
| 124 |
|
| 125 |
+
.morphing-grid {
|
| 126 |
+
animation: morph 8s ease-in-out infinite;
|
|
|
|
| 127 |
}
|
| 128 |
|
| 129 |
+
@keyframes morph {
|
| 130 |
+
0%, 100% { border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%; }
|
| 131 |
+
50% { border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%; }
|
|
|
|
|
|
|
| 132 |
}
|
| 133 |
|
| 134 |
+
.glow {
|
| 135 |
+
filter: drop-shadow(0 0 20px rgba(255, 0, 255, 0.7));
|
|
|
|
|
|
|
|
|
|
|
|
|
| 136 |
}
|
| 137 |
|
| 138 |
+
.breathing {
|
| 139 |
+
animation: breathing 4s ease-in-out infinite;
|
| 140 |
}
|
| 141 |
+
|
| 142 |
+
@keyframes breathing {
|
| 143 |
+
0%, 100% { transform: scale(1); opacity: 1; }
|
| 144 |
+
50% { transform: scale(1.1); opacity: 0.8; }
|
| 145 |
+
}
|