سایت کاملا سه بعدی باشه
Browse files- index.html +8 -8
- script.js +23 -13
- style.css +53 -6
index.html
CHANGED
|
@@ -28,8 +28,8 @@
|
|
| 28 |
|
| 29 |
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
| 30 |
<!-- Hero Section -->
|
| 31 |
-
<section class="flex flex-col md:flex-row items-center gap-12 mb-24">
|
| 32 |
-
|
| 33 |
<h1 class="text-4xl md:text-5xl font-bold mb-6 text-primary">Hi, I'm <span class="text-secondary">Alex</span></h1>
|
| 34 |
<h2 class="text-2xl md:text-3xl font-semibold mb-6 text-gray-700">Frontend Developer & UI Designer</h2>
|
| 35 |
<p class="text-lg text-gray-600 mb-8 leading-relaxed">I create beautiful, functional digital experiences with a focus on user-centered design and clean code.</p>
|
|
@@ -40,8 +40,8 @@
|
|
| 40 |
</div>
|
| 41 |
<div class="md:w-1/2">
|
| 42 |
<div class="relative">
|
| 43 |
-
|
| 44 |
-
|
| 45 |
</div>
|
| 46 |
<div class="absolute -bottom-6 -right-6 bg-white p-4 rounded-xl shadow-lg">
|
| 47 |
<div class="flex items-center gap-2">
|
|
@@ -57,8 +57,8 @@
|
|
| 57 |
<section class="mb-24" id="skills">
|
| 58 |
<h2 class="text-3xl font-bold mb-12 text-center text-gray-800">My Skills</h2>
|
| 59 |
<div class="grid grid-cols-2 md:grid-cols-4 gap-6">
|
| 60 |
-
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition duration-300">
|
| 61 |
-
|
| 62 |
<i data-feather="code" class="text-primary w-6 h-6"></i>
|
| 63 |
</div>
|
| 64 |
<h3 class="font-bold text-lg mb-2">Frontend</h3>
|
|
@@ -92,8 +92,8 @@
|
|
| 92 |
<section class="mb-24" id="projects">
|
| 93 |
<h2 class="text-3xl font-bold mb-12 text-center text-gray-800">Featured Projects</h2>
|
| 94 |
<div class="grid md:grid-cols-2 gap-8">
|
| 95 |
-
<div class="bg-white rounded-xl overflow-hidden shadow-lg hover:shadow-xl transition duration-300">
|
| 96 |
-
|
| 97 |
<img src="http://static.photos/technology/1024x576/23" alt="Project 1" class="w-full h-full object-cover">
|
| 98 |
</div>
|
| 99 |
<div class="p-6">
|
|
|
|
| 28 |
|
| 29 |
<main class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12">
|
| 30 |
<!-- Hero Section -->
|
| 31 |
+
<section class="flex flex-col md:flex-row items-center gap-12 mb-24 floating-3d">
|
| 32 |
+
<div class="md:w-1/2">
|
| 33 |
<h1 class="text-4xl md:text-5xl font-bold mb-6 text-primary">Hi, I'm <span class="text-secondary">Alex</span></h1>
|
| 34 |
<h2 class="text-2xl md:text-3xl font-semibold mb-6 text-gray-700">Frontend Developer & UI Designer</h2>
|
| 35 |
<p class="text-lg text-gray-600 mb-8 leading-relaxed">I create beautiful, functional digital experiences with a focus on user-centered design and clean code.</p>
|
|
|
|
| 40 |
</div>
|
| 41 |
<div class="md:w-1/2">
|
| 42 |
<div class="relative">
|
| 43 |
+
<div class="w-full h-96 bg-gradient-to-r from-primary to-secondary rounded-2xl shadow-xl overflow-hidden parallax-bg">
|
| 44 |
+
<img src="http://static.photos/technology/640x360/42" alt="Profile" class="w-full h-full object-cover">
|
| 45 |
</div>
|
| 46 |
<div class="absolute -bottom-6 -right-6 bg-white p-4 rounded-xl shadow-lg">
|
| 47 |
<div class="flex items-center gap-2">
|
|
|
|
| 57 |
<section class="mb-24" id="skills">
|
| 58 |
<h2 class="text-3xl font-bold mb-12 text-center text-gray-800">My Skills</h2>
|
| 59 |
<div class="grid grid-cols-2 md:grid-cols-4 gap-6">
|
| 60 |
+
<div class="bg-white p-6 rounded-xl shadow-md hover:shadow-lg transition duration-300 skill-card project-card" data-depth="10">
|
| 61 |
+
<div class="w-14 h-14 bg-primary-50 rounded-full flex items-center justify-center mb-4">
|
| 62 |
<i data-feather="code" class="text-primary w-6 h-6"></i>
|
| 63 |
</div>
|
| 64 |
<h3 class="font-bold text-lg mb-2">Frontend</h3>
|
|
|
|
| 92 |
<section class="mb-24" id="projects">
|
| 93 |
<h2 class="text-3xl font-bold mb-12 text-center text-gray-800">Featured Projects</h2>
|
| 94 |
<div class="grid md:grid-cols-2 gap-8">
|
| 95 |
+
<div class="bg-white rounded-xl overflow-hidden shadow-lg hover:shadow-xl transition duration-300 project-card" data-depth="20">
|
| 96 |
+
<div class="h-48 bg-gradient-to-r from-primary to-secondary overflow-hidden">
|
| 97 |
<img src="http://static.photos/technology/1024x576/23" alt="Project 1" class="w-full h-full object-cover">
|
| 98 |
</div>
|
| 99 |
<div class="p-6">
|
script.js
CHANGED
|
@@ -16,22 +16,32 @@ document.addEventListener('DOMContentLoaded', function() {
|
|
| 16 |
}
|
| 17 |
});
|
| 18 |
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 19 |
|
| 20 |
-
|
| 21 |
-
|
| 22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
-
|
| 25 |
-
const
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
});
|
| 32 |
-
};
|
| 33 |
|
| 34 |
-
|
|
|
|
|
|
|
| 35 |
window.addEventListener('load', animateOnScroll);
|
| 36 |
window.addEventListener('scroll', animateOnScroll);
|
| 37 |
|
|
|
|
| 16 |
}
|
| 17 |
});
|
| 18 |
});
|
| 19 |
+
// 3D Mouse Movement Effect
|
| 20 |
+
const handleMouseMove = (e) => {
|
| 21 |
+
const xAxis = (window.innerWidth / 2 - e.pageX) / 25;
|
| 22 |
+
const yAxis = (window.innerHeight / 2 - e.pageY) / 25;
|
| 23 |
+
document.querySelector('main').style.transform = `rotateY(${xAxis}deg) rotateX(${yAxis}deg)`;
|
| 24 |
+
};
|
| 25 |
|
| 26 |
+
// Animation for elements when they come into view
|
| 27 |
+
const animateOnScroll = () => {
|
| 28 |
+
const elements = document.querySelectorAll('.animate-on-scroll');
|
| 29 |
+
|
| 30 |
+
elements.forEach(element => {
|
| 31 |
+
const elementPosition = element.getBoundingClientRect().top;
|
| 32 |
+
const windowHeight = window.innerHeight;
|
| 33 |
|
| 34 |
+
if (elementPosition < windowHeight - 100) {
|
| 35 |
+
const depth = element.dataset.depth || 0;
|
| 36 |
+
element.style.transform = `translateZ(${depth}px)`;
|
| 37 |
+
element.classList.add('animate-fadeInUp');
|
| 38 |
+
}
|
| 39 |
+
});
|
| 40 |
+
};
|
|
|
|
|
|
|
| 41 |
|
| 42 |
+
// Add mouse move event
|
| 43 |
+
document.addEventListener('mousemove', handleMouseMove);
|
| 44 |
+
// Initialize animation on load and scroll
|
| 45 |
window.addEventListener('load', animateOnScroll);
|
| 46 |
window.addEventListener('scroll', animateOnScroll);
|
| 47 |
|
style.css
CHANGED
|
@@ -1,10 +1,12 @@
|
|
| 1 |
/* Custom styles that extend Tailwind */
|
| 2 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
| 3 |
-
|
| 4 |
body {
|
| 5 |
font-family: 'Inter', sans-serif;
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
}
|
| 7 |
-
|
| 8 |
/* Smooth scrolling for anchor links */
|
| 9 |
html {
|
| 10 |
scroll-behavior: smooth;
|
|
@@ -17,13 +19,58 @@ html {
|
|
| 17 |
color: transparent;
|
| 18 |
background-image: linear-gradient(to right, #3B82F6, #10B981);
|
| 19 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
transition: all 0.3s ease;
|
| 25 |
}
|
| 26 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 27 |
/* Custom scrollbar */
|
| 28 |
::-webkit-scrollbar {
|
| 29 |
width: 8px;
|
|
|
|
| 1 |
/* Custom styles that extend Tailwind */
|
| 2 |
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
|
|
|
|
| 3 |
body {
|
| 4 |
font-family: 'Inter', sans-serif;
|
| 5 |
+
perspective: 1000px;
|
| 6 |
+
transform-style: preserve-3d;
|
| 7 |
+
min-height: 100vh;
|
| 8 |
+
overflow-x: hidden;
|
| 9 |
}
|
|
|
|
| 10 |
/* Smooth scrolling for anchor links */
|
| 11 |
html {
|
| 12 |
scroll-behavior: smooth;
|
|
|
|
| 19 |
color: transparent;
|
| 20 |
background-image: linear-gradient(to right, #3B82F6, #10B981);
|
| 21 |
}
|
| 22 |
+
/* 3D Transformations */
|
| 23 |
+
main {
|
| 24 |
+
transform-style: preserve-3d;
|
| 25 |
+
}
|
| 26 |
+
|
| 27 |
+
section {
|
| 28 |
+
transform-style: preserve-3d;
|
| 29 |
+
transition: transform 0.5s ease;
|
| 30 |
+
}
|
| 31 |
+
|
| 32 |
+
/* 3D Card Effects */
|
| 33 |
+
.skill-card, .project-card {
|
| 34 |
+
transform-style: preserve-3d;
|
| 35 |
+
transition: all 0.5s ease;
|
| 36 |
+
transform: translateZ(0);
|
| 37 |
+
}
|
| 38 |
|
| 39 |
+
.skill-card:hover, .project-card:hover {
|
| 40 |
+
transform: translateY(-5px) rotateX(5deg) rotateY(5deg) translateZ(20px);
|
| 41 |
+
box-shadow: 0 20px 40px rgba(0,0,0,0.2);
|
|
|
|
| 42 |
}
|
| 43 |
|
| 44 |
+
/* Parallax Effect */
|
| 45 |
+
.parallax-bg {
|
| 46 |
+
position: relative;
|
| 47 |
+
transform-style: preserve-3d;
|
| 48 |
+
}
|
| 49 |
+
|
| 50 |
+
.parallax-bg::before {
|
| 51 |
+
content: '';
|
| 52 |
+
position: absolute;
|
| 53 |
+
top: 0;
|
| 54 |
+
left: 0;
|
| 55 |
+
right: 0;
|
| 56 |
+
bottom: 0;
|
| 57 |
+
background-size: cover;
|
| 58 |
+
background-position: center;
|
| 59 |
+
transform: translateZ(-1px) scale(1.1);
|
| 60 |
+
z-index: -1;
|
| 61 |
+
}
|
| 62 |
+
|
| 63 |
+
/* 3D Floating Elements */
|
| 64 |
+
.floating-3d {
|
| 65 |
+
animation: float3d 6s ease-in-out infinite;
|
| 66 |
+
transform-style: preserve-3d;
|
| 67 |
+
}
|
| 68 |
+
|
| 69 |
+
@keyframes float3d {
|
| 70 |
+
0% { transform: translateY(0px) rotateX(0deg) rotateY(0deg); }
|
| 71 |
+
50% { transform: translateY(-20px) rotateX(5deg) rotateY(5deg); }
|
| 72 |
+
100% { transform: translateY(0px) rotateX(0deg) rotateY(0deg); }
|
| 73 |
+
}
|
| 74 |
/* Custom scrollbar */
|
| 75 |
::-webkit-scrollbar {
|
| 76 |
width: 8px;
|