Sakuna commited on
Commit
01926e2
·
verified ·
1 Parent(s): 19fc8bb

This doesn't work

Browse files
Files changed (7) hide show
  1. README.md +8 -5
  2. components/footer.js +47 -0
  3. components/navbar.js +101 -0
  4. components/project-card.js +57 -0
  5. index.html +181 -19
  6. script.js +44 -0
  7. style.css +53 -18
README.md CHANGED
@@ -1,10 +1,13 @@
1
  ---
2
- title: Codecanvas Creations
3
- emoji: 🏃
4
- colorFrom: green
5
- colorTo: purple
6
  sdk: static
7
  pinned: false
 
 
8
  ---
9
 
10
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
1
  ---
2
+ title: CodeCanvas Creations 🎨
3
+ colorFrom: red
4
+ colorTo: green
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,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomFooter extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .social-icon {
7
+ transition: transform 0.3s ease, background-color 0.3s ease;
8
+ }
9
+ .social-icon:hover {
10
+ transform: translateY(-3px);
11
+ background-color: #e0e7ff;
12
+ }
13
+ .dark .social-icon:hover {
14
+ background-color: #3730a3;
15
+ }
16
+ </style>
17
+ <footer class="bg-gray-100 dark:bg-gray-800 py-8">
18
+ <div class="container mx-auto px-4">
19
+ <div class="flex flex-col md:flex-row justify-between items-center">
20
+ <div class="mb-4 md:mb-0">
21
+ <p class="text-gray-600 dark:text-gray-400">&copy; ${new Date().getFullYear()} PixelPerfect Portfolio. All rights reserved.</p>
22
+ </div>
23
+ <div class="flex space-x-4">
24
+ <a href="#" class="social-icon p-2 rounded-full bg-gray-200 dark:bg-gray-700 text-indigo-600 dark:text-indigo-400">
25
+ <i data-feather="twitter"></i>
26
+ </a>
27
+ <a href="#" class="social-icon p-2 rounded-full bg-gray-200 dark:bg-gray-700 text-indigo-600 dark:text-indigo-400">
28
+ <i data-feather="linkedin"></i>
29
+ </a>
30
+ <a href="#" class="social-icon p-2 rounded-full bg-gray-200 dark:bg-gray-700 text-indigo-600 dark:text-indigo-400">
31
+ <i data-feather="dribbble"></i>
32
+ </a>
33
+ <a href="#" class="social-icon p-2 rounded-full bg-gray-200 dark:bg-gray-700 text-indigo-600 dark:text-indigo-400">
34
+ <i data-feather="github"></i>
35
+ </a>
36
+ </div>
37
+ </div>
38
+ </div>
39
+ </footer>
40
+ `;
41
+ // Initialize feather icons after content is loaded
42
+ document.addEventListener('DOMContentLoaded', () => {
43
+ feather.replace();
44
+ });
45
+ }
46
+ }
47
+ customElements.define('custom-footer', CustomFooter);
components/navbar.js ADDED
@@ -0,0 +1,101 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomNavbar extends HTMLElement {
2
+ connectedCallback() {
3
+ this.attachShadow({ mode: 'open' });
4
+ this.shadowRoot.innerHTML = `
5
+ <style>
6
+ .nav-link {
7
+ position: relative;
8
+ }
9
+ .nav-link::after {
10
+ content: '';
11
+ position: absolute;
12
+ width: 0;
13
+ height: 2px;
14
+ bottom: -2px;
15
+ left: 0;
16
+ background-color: #6366f1;
17
+ transition: width 0.3s ease;
18
+ }
19
+ .nav-link:hover::after {
20
+ width: 100%;
21
+ }
22
+ .dark .nav-link:hover::after {
23
+ background-color: #818cf8;
24
+ }
25
+ </style>
26
+ <nav class="fixed w-full bg-white/80 dark:bg-gray-900/80 backdrop-blur-md z-50 border-b border-gray-200 dark:border-gray-800">
27
+ <div class="container mx-auto px-4 py-4 flex justify-between items-center">
28
+ <a href="#home" class="text-xl font-bold text-indigo-600 dark:text-indigo-400">PixelPerfect</a>
29
+ <div class="hidden md:flex items-center space-x-8">
30
+ <a href="#home" class="nav-link">Home</a>
31
+ <a href="#about" class="nav-link">About</a>
32
+ <a href="#work" class="nav-link">Work</a>
33
+ <a href="#contact" class="nav-link">Contact</a>
34
+ <button id="darkModeToggle" class="p-2 rounded-full hover:bg-gray-200 dark:hover:bg-gray-700 transition">
35
+ <i data-feather="moon" class="hidden dark:block"></i>
36
+ <i data-feather="sun" class="dark:hidden"></i>
37
+ </button>
38
+ </div>
39
+ <button class="md:hidden p-2" id="mobileMenuButton">
40
+ <i data-feather="menu"></i>
41
+ </button>
42
+ </div>
43
+ <div id="mobileMenu" class="hidden md:hidden bg-white dark:bg-gray-900 px-4 py-2 border-t border-gray-200 dark:border-gray-800">
44
+ <div class="flex flex-col space-y-3 py-2">
45
+ <a href="#home" class="nav-link">Home</a>
46
+ <a href="#about" class="nav-link">About</a>
47
+ <a href="#work" class="nav-link">Work</a>
48
+ <a href="#contact" class="nav-link">Contact</a>
49
+ <button id="darkModeToggleMobile" class="flex items-center nav-link">
50
+ <span class="mr-2">Toggle Theme</span>
51
+ <i data-feather="moon" class="hidden dark:block w-4 h-4"></i>
52
+ <i data-feather="sun" class="dark:hidden w-4 h-4"></i>
53
+ </button>
54
+ </div>
55
+ </div>
56
+ </nav>
57
+ `;
58
+
59
+ // Mobile menu toggle
60
+ const mobileMenuButton = this.shadowRoot.getElementById('mobileMenuButton');
61
+ const mobileMenu = this.shadowRoot.getElementById('mobileMenu');
62
+
63
+ if (mobileMenuButton && mobileMenu) {
64
+ mobileMenuButton.addEventListener('click', () => {
65
+ mobileMenu.classList.toggle('hidden');
66
+ const icon = mobileMenuButton.querySelector('i');
67
+ if (mobileMenu.classList.contains('hidden')) {
68
+ icon.setAttribute('data-feather', 'menu');
69
+ } else {
70
+ icon.setAttribute('data-feather', 'x');
71
+ }
72
+ feather.replace();
73
+ });
74
+ }
75
+
76
+ // Dark mode toggle for mobile
77
+ const darkModeToggleMobile = this.shadowRoot.getElementById('darkModeToggleMobile');
78
+ if (darkModeToggleMobile) {
79
+ darkModeToggleMobile.addEventListener('click', () => {
80
+ document.documentElement.classList.toggle('dark');
81
+ localStorage.setItem('darkMode', document.documentElement.classList.contains('dark'));
82
+ feather.replace();
83
+ });
84
+ }
85
+
86
+ // Dark mode toggle for desktop
87
+ const darkModeToggle = this.shadowRoot.getElementById('darkModeToggle');
88
+ if (darkModeToggle) {
89
+ darkModeToggle.addEventListener('click', () => {
90
+ document.documentElement.classList.toggle('dark');
91
+ localStorage.setItem('darkMode', document.documentElement.classList.contains('dark'));
92
+ feather.replace();
93
+ });
94
+ }
95
+ // Initialize feather icons after content is loaded
96
+ document.addEventListener('DOMContentLoaded', () => {
97
+ feather.replace();
98
+ });
99
+ }
100
+ }
101
+ customElements.define('custom-navbar', CustomNavbar);
components/project-card.js ADDED
@@ -0,0 +1,57 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ class CustomProjectCard extends HTMLElement {
2
+ static get observedAttributes() {
3
+ return ['title', 'description', 'tags', 'image'];
4
+ }
5
+
6
+ attributeChangedCallback(name, oldValue, newValue) {
7
+ if (this.shadowRoot) {
8
+ this.render();
9
+ }
10
+ }
11
+
12
+ connectedCallback() {
13
+ this.attachShadow({ mode: 'open' });
14
+ this.render();
15
+ }
16
+
17
+ render() {
18
+ const title = this.getAttribute('title') || 'Project Title';
19
+ const description = this.getAttribute('description') || 'Project description goes here';
20
+ const tags = this.getAttribute('tags') || 'Design, Development';
21
+ const image = this.getAttribute('image') || 'http://static.photos/technology/640x360/1';
22
+
23
+ this.shadowRoot.innerHTML = `
24
+ <style>
25
+ .card {
26
+ transition: transform 0.3s ease, box-shadow 0.3s ease;
27
+ }
28
+ .tag {
29
+ transition: background-color 0.3s ease;
30
+ }
31
+ </style>
32
+ <div class="card bg-white dark:bg-gray-800 rounded-xl overflow-hidden shadow-md border border-gray-200 dark:border-gray-700">
33
+ <div class="h-48 overflow-hidden">
34
+ <img src="${image}" alt="${title}" class="w-full h-full object-cover transition-transform duration-500 hover:scale-105">
35
+ </div>
36
+ <div class="p-6">
37
+ <h3 class="text-xl font-bold mb-2">${title}</h3>
38
+ <p class="text-gray-600 dark:text-gray-400 mb-4">${description}</p>
39
+ <div class="flex flex-wrap gap-2">
40
+ ${tags.split(',').map(tag => `
41
+ <span class="tag px-3 py-1 bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 rounded-full text-sm">${tag.trim()}</span>
42
+ `).join('')}
43
+ </div>
44
+ <a href="#" class="mt-4 inline-flex items-center text-indigo-600 dark:text-indigo-400 hover:text-indigo-800 dark:hover:text-indigo-300 transition">
45
+ View Project
46
+ <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
47
+ </a>
48
+ </div>
49
+ </div>
50
+ `;
51
+ // Initialize feather icons after content is loaded
52
+ document.addEventListener('DOMContentLoaded', () => {
53
+ feather.replace();
54
+ });
55
+ }
56
+ }
57
+ customElements.define('custom-project-card', CustomProjectCard);
index.html CHANGED
@@ -1,19 +1,181 @@
1
- <!doctype html>
2
- <html>
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width" />
6
- <title>My static Space</title>
7
- <link rel="stylesheet" href="style.css" />
8
- </head>
9
- <body>
10
- <div class="card">
11
- <h1>Welcome to your static Space!</h1>
12
- <p>You can modify this app directly by editing <i>index.html</i> in the Files and versions tab.</p>
13
- <p>
14
- Also don't forget to check the
15
- <a href="https://huggingface.co/docs/hub/spaces" target="_blank">Spaces documentation</a>.
16
- </p>
17
- </div>
18
- </body>
19
- </html>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <!DOCTYPE html>
2
+ <html lang="en" class="scroll-smooth">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
6
+ <title>PixelPerfect Portfolio | Creative Showcase</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
+ <script src="components/navbar.js"></script>
12
+ <script src="components/footer.js"></script>
13
+ <script src="components/project-card.js"></script>
14
+ </head>
15
+ <body class="bg-gray-50 dark:bg-gray-900 text-gray-800 dark:text-gray-200 transition-colors duration-300">
16
+ <custom-navbar></custom-navbar>
17
+
18
+ <main class="container mx-auto px-4 py-8 md:py-12">
19
+ <!-- Hero Section -->
20
+ <section id="home" class="min-h-[80vh] flex flex-col justify-center items-center text-center py-12">
21
+ <div class="w-32 h-32 md:w-40 md:h-40 rounded-full overflow-hidden border-4 border-indigo-500 mb-6">
22
+ <img src="http://static.photos/people/320x240/42" alt="Profile" class="w-full h-full object-cover">
23
+ </div>
24
+ <h1 class="text-4xl md:text-5xl font-bold mb-4">Hi, I'm <span class="text-indigo-600 dark:text-indigo-400">Alex</span></h1>
25
+ <h2 class="text-xl md:text-2xl text-gray-600 dark:text-gray-400 mb-6">UI/UX Designer & Frontend Developer</h2>
26
+ <div class="flex gap-4">
27
+ <a href="#work" class="px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition">View My Work</a>
28
+ <a href="#contact" class="px-6 py-3 border border-indigo-600 text-indigo-600 dark:text-indigo-400 rounded-lg hover:bg-indigo-50 dark:hover:bg-gray-800 transition">Contact Me</a>
29
+ </div>
30
+ </section>
31
+
32
+ <!-- About Section -->
33
+ <section id="about" class="py-12 md:py-20">
34
+ <div class="max-w-4xl mx-auto">
35
+ <h2 class="text-3xl font-bold mb-8 text-center">About Me</h2>
36
+ <div class="grid md:grid-cols-2 gap-8 items-center">
37
+ <div>
38
+ <p class="mb-4 text-lg">I'm a passionate designer and developer with 5+ years of experience creating beautiful, functional digital experiences.</p>
39
+ <p class="mb-6">My approach combines aesthetic sensibility with technical expertise to deliver solutions that users love. I specialize in responsive design, accessibility, and performance optimization.</p>
40
+ <div class="flex flex-wrap gap-2">
41
+ <span class="px-3 py-1 bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 rounded-full text-sm">UI Design</span>
42
+ <span class="px-3 py-1 bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 rounded-full text-sm">UX Research</span>
43
+ <span class="px-3 py-1 bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 rounded-full text-sm">HTML/CSS</span>
44
+ <span class="px-3 py-1 bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 rounded-full text-sm">JavaScript</span>
45
+ <span class="px-3 py-1 bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 rounded-full text-sm">React</span>
46
+ <span class="px-3 py-1 bg-indigo-100 dark:bg-indigo-900 text-indigo-800 dark:text-indigo-200 rounded-full text-sm">Figma</span>
47
+ </div>
48
+ </div>
49
+ <div class="relative">
50
+ <div class="bg-indigo-500 w-full h-80 rounded-xl overflow-hidden">
51
+ <img src="http://static.photos/workspace/640x360/12" alt="Working" class="w-full h-full object-cover">
52
+ </div>
53
+ <div class="absolute -bottom-4 -right-4 bg-white dark:bg-gray-800 p-4 rounded-lg shadow-lg w-3/4">
54
+ <h3 class="font-bold mb-2">Currently working at</h3>
55
+ <p class="text-indigo-600 dark:text-indigo-400">Digital Creative Agency</p>
56
+ </div>
57
+ </div>
58
+ </div>
59
+ </div>
60
+ </section>
61
+
62
+ <!-- Work Section -->
63
+ <section id="work" class="py-12 md:py-20 bg-gray-100 dark:bg-gray-800 rounded-xl">
64
+ <div class="max-w-6xl mx-auto px-4">
65
+ <h2 class="text-3xl font-bold mb-8 text-center">Featured Projects</h2>
66
+ <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6">
67
+ <custom-project-card
68
+ title="E-commerce Redesign"
69
+ description="Complete UI/UX overhaul for fashion retailer"
70
+ tags="UI Design, UX Research, React"
71
+ image="http://static.photos/retail/640x360/1">
72
+ </custom-project-card>
73
+ <custom-project-card
74
+ title="Health App"
75
+ description="Mobile application for fitness tracking"
76
+ tags="Mobile Design, Prototyping"
77
+ image="http://static.photos/wellness/640x360/2">
78
+ </custom-project-card>
79
+ <custom-project-card
80
+ title="Corporate Website"
81
+ description="Responsive website for tech startup"
82
+ tags="Web Design, Development"
83
+ image="http://static.photos/technology/640x360/3">
84
+ </custom-project-card>
85
+ </div>
86
+ <div class="text-center mt-10">
87
+ <a href="#" class="inline-flex items-center px-6 py-3 border border-gray-300 dark:border-gray-600 rounded-lg hover:bg-gray-200 dark:hover:bg-gray-700 transition">
88
+ View All Projects
89
+ <i data-feather="arrow-right" class="ml-2 w-4 h-4"></i>
90
+ </a>
91
+ </div>
92
+ </div>
93
+ </section>
94
+
95
+ <!-- Contact Section -->
96
+ <section id="contact" class="py-12 md:py-20">
97
+ <div class="max-w-4xl mx-auto">
98
+ <h2 class="text-3xl font-bold mb-8 text-center">Get In Touch</h2>
99
+ <div class="grid md:grid-cols-2 gap-8">
100
+ <div>
101
+ <h3 class="text-xl font-semibold mb-4">Contact Information</h3>
102
+ <div class="space-y-4">
103
+ <div class="flex items-center">
104
+ <i data-feather="mail" class="mr-4 text-indigo-600 dark:text-indigo-400"></i>
105
+ <span>hello@example.com</span>
106
+ </div>
107
+ <div class="flex items-center">
108
+ <i data-feather="phone" class="mr-4 text-indigo-600 dark:text-indigo-400"></i>
109
+ <span>+1 (555) 123-4567</span>
110
+ </div>
111
+ <div class="flex items-center">
112
+ <i data-feather="map-pin" class="mr-4 text-indigo-600 dark:text-indigo-400"></i>
113
+ <span>San Francisco, CA</span>
114
+ </div>
115
+ </div>
116
+ <div class="mt-8">
117
+ <h3 class="text-xl font-semibold mb-4">Follow Me</h3>
118
+ <div class="flex gap-4">
119
+ <a href="#" class="p-2 bg-gray-200 dark:bg-gray-700 rounded-full hover:bg-indigo-100 dark:hover:bg-indigo-900 transition">
120
+ <i data-feather="twitter" class="text-indigo-600 dark:text-indigo-400"></i>
121
+ </a>
122
+ <a href="#" class="p-2 bg-gray-200 dark:bg-gray-700 rounded-full hover:bg-indigo-100 dark:hover:bg-indigo-900 transition">
123
+ <i data-feather="linkedin" class="text-indigo-600 dark:text-indigo-400"></i>
124
+ </a>
125
+ <a href="#" class="p-2 bg-gray-200 dark:bg-gray-700 rounded-full hover:bg-indigo-100 dark:hover:bg-indigo-900 transition">
126
+ <i data-feather="dribbble" class="text-indigo-600 dark:text-indigo-400"></i>
127
+ </a>
128
+ <a href="#" class="p-2 bg-gray-200 dark:bg-gray-700 rounded-full hover:bg-indigo-100 dark:hover:bg-indigo-900 transition">
129
+ <i data-feather="github" class="text-indigo-600 dark:text-indigo-400"></i>
130
+ </a>
131
+ </div>
132
+ </div>
133
+ </div>
134
+ <div>
135
+ <form class="space-y-4">
136
+ <div>
137
+ <label for="name" class="block mb-1">Name</label>
138
+ <input type="text" id="name" class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
139
+ </div>
140
+ <div>
141
+ <label for="email" class="block mb-1">Email</label>
142
+ <input type="email" id="email" class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500">
143
+ </div>
144
+ <div>
145
+ <label for="message" class="block mb-1">Message</label>
146
+ <textarea id="message" rows="4" class="w-full px-4 py-2 border border-gray-300 dark:border-gray-600 rounded-lg bg-white dark:bg-gray-800 focus:ring-2 focus:ring-indigo-500 focus:border-indigo-500"></textarea>
147
+ </div>
148
+ <button type="submit" class="px-6 py-3 bg-indigo-600 text-white rounded-lg hover:bg-indigo-700 transition w-full">Send Message</button>
149
+ </form>
150
+ </div>
151
+ </div>
152
+ </div>
153
+ </section>
154
+ </main>
155
+
156
+ <custom-footer></custom-footer>
157
+ <script>
158
+ document.addEventListener('DOMContentLoaded', () => {
159
+ feather.replace();
160
+
161
+ // Dark mode toggle
162
+ const darkModeToggle = document.getElementById('darkModeToggle');
163
+ if (darkModeToggle) {
164
+ darkModeToggle.addEventListener('click', () => {
165
+ document.documentElement.classList.toggle('dark');
166
+ localStorage.setItem('darkMode', document.documentElement.classList.contains('dark'));
167
+ });
168
+ }
169
+
170
+ // Check for saved dark mode preference
171
+ if (localStorage.getItem('darkMode') === 'true') {
172
+ document.documentElement.classList.add('dark');
173
+ // Check for saved dark mode preference
174
+ if (localStorage.getItem('darkMode') === 'true') {
175
+ document.documentElement.classList.add('dark');
176
+ }
177
+ });
178
+ </script>
179
+ <script src="https://huggingface.co/deepsite/deepsite-badge.js"></script>
180
+ </body>
181
+ </html>
script.js ADDED
@@ -0,0 +1,44 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ // Intersection Observer for section animations
3
+ const observer = new IntersectionObserver((entries) => {
4
+ entries.forEach(entry => {
5
+ if (entry.isIntersecting) {
6
+ entry.target.classList.add('visible');
7
+ }
8
+ });
9
+ }, {
10
+ threshold: 0.1
11
+ });
12
+ document.querySelectorAll('section').forEach(section => {
13
+ observer.observe(section);
14
+ });
15
+
16
+ // Smooth scroll for anchor links
17
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
18
+ anchor.addEventListener('click', function(e) {
19
+ e.preventDefault();
20
+ const targetId = this.getAttribute('href');
21
+ const targetElement = document.querySelector(targetId);
22
+ if (targetElement) {
23
+ targetElement.scrollIntoView({
24
+ behavior: 'smooth'
25
+ });
26
+ }
27
+ });
28
+ });
29
+
30
+ // Close mobile menu when clicking a link
31
+ document.addEventListener('click', function(e) {
32
+ if (e.target.matches('a[href^="#"]')) {
33
+ const mobileMenu = document.querySelector('custom-navbar').shadowRoot.getElementById('mobileMenu');
34
+ if (mobileMenu && !mobileMenu.classList.contains('hidden')) {
35
+ mobileMenu.classList.add('hidden');
36
+ const menuButton = document.querySelector('custom-navbar').shadowRoot.getElementById('mobileMenuButton');
37
+ if (menuButton) {
38
+ const icon = menuButton.querySelector('i');
39
+ icon.setAttribute('data-feather', 'menu');
40
+ feather.replace();
41
+ }
42
+ }
43
+ }
44
+ });
style.css CHANGED
@@ -1,28 +1,63 @@
 
 
1
  body {
2
- padding: 2rem;
3
- font-family: -apple-system, BlinkMacSystemFont, "Arial", sans-serif;
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  }
5
 
6
- h1 {
7
- font-size: 16px;
8
- margin-top: 0;
9
  }
10
 
11
- p {
12
- color: rgb(107, 114, 128);
13
- font-size: 15px;
14
- margin-bottom: 10px;
15
- margin-top: 5px;
16
  }
17
 
18
- .card {
19
- max-width: 620px;
20
- margin: 0 auto;
21
- padding: 16px;
22
- border: 1px solid lightgray;
23
- border-radius: 16px;
24
  }
25
 
26
- .card p:last-child {
27
- margin-bottom: 0;
 
 
28
  }
 
 
 
 
 
1
+ @import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');
2
+
3
  body {
4
+ font-family: 'Inter', sans-serif;
5
+ line-height: 1.6;
6
+ }
7
+
8
+ /* Smooth scrolling for anchor links */
9
+ html {
10
+ scroll-behavior: smooth;
11
+ }
12
+
13
+ /* Custom scrollbar */
14
+ ::-webkit-scrollbar {
15
+ width: 8px;
16
+ }
17
+
18
+ ::-webkit-scrollbar-track {
19
+ background: #f1f1f1;
20
+ }
21
+
22
+ ::-webkit-scrollbar-thumb {
23
+ background: #888;
24
+ border-radius: 4px;
25
+ }
26
+
27
+ ::-webkit-scrollbar-thumb:hover {
28
+ background: #555;
29
+ }
30
+
31
+ .dark ::-webkit-scrollbar-track {
32
+ background: #1a1a1a;
33
+ }
34
+
35
+ .dark ::-webkit-scrollbar-thumb {
36
+ background: #444;
37
  }
38
 
39
+ .dark ::-webkit-scrollbar-thumb:hover {
40
+ background: #666;
 
41
  }
42
 
43
+ /* Animation for sections */
44
+ section {
45
+ opacity: 0;
46
+ transform: translateY(20px);
47
+ transition: opacity 0.6s ease-out, transform 0.6s ease-out;
48
  }
49
 
50
+ section.visible {
51
+ opacity: 1;
52
+ transform: translateY(0);
 
 
 
53
  }
54
 
55
+ /* Project card hover effect */
56
+ .custom-project-card:hover {
57
+ transform: translateY(-5px);
58
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
59
  }
60
+
61
+ .dark .custom-project-card:hover {
62
+ box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3);
63
+ }