Setsunapux commited on
Commit
20c8c40
·
verified ·
1 Parent(s): edf1d3e

perbaiki sidebar di mobile - Follow Up Deployment

Browse files
Files changed (1) hide show
  1. index.html +167 -24
index.html CHANGED
@@ -99,33 +99,26 @@
99
  }
100
  }
101
 
102
- /* Wave animation */
103
- .wave {
104
- position: absolute;
105
- bottom: 0;
106
- left: 0;
107
- width: 100%;
108
- height: 100px;
109
- background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1200 120" xmlns="http://www.w3.org/2000/svg" preserveAspectRatio="none"><path d="M0,0V46.29c47.79,22.2,103.59,32.17,158,28,70.36-5.37,136.33-33.31,206.8-37.5C438.64,32.43,512.34,53.67,583,72.05c69.27,18,138.3,24.88,209.4,13.08,36.15-6,69.85-17.84,104.45-29.34C989.49,25,1113-14.29,1200,52.47V0Z" fill="%236366f1" opacity=".25"/><path d="M0,0V15.81C13,36.92,27.64,56.86,47.69,72.05,99.41,111.27,165,111,224.58,91.58c31.15-10.15,60.09-26.07,89.67-39.8,40.92-19,84.73-46,130.83-49.67,36.26-2.85,70.9,9.42,98.6,31.56,31.77,25.39,62.32,62,103.63,73,40.44,10.79,81.35-6.69,119.13-24.28s75.16-39,116.92-43.05c59.73-5.85,113.28,22.88,168.9,38.84,30.2,8.66,59,6.17,87.09-7.5,22.43-10.89,48-26.93,60.65-49.24V0Z" fill="%238b5cf6" opacity=".5"/><path d="M0,0V5.63C149.93,59,314.09,71.32,475.83,42.57c43-7.64,84.23-20.12,127.61-26.46,59-8.63,112.48,12.24,165.56,35.4C827.93,77.22,886,95.24,951.2,90c86.53-7,172.46-45.71,236.83-84.81V0Z" fill="%23e2e8f0"/></svg>');
110
- background-size: cover;
111
- background-repeat: no-repeat;
112
- animation: wave 10s linear infinite;
113
- }
114
-
115
- @keyframes wave {
116
- 0% {
117
- background-position-x: 0;
118
- }
119
- 100% {
120
- background-position-x: 1000px;
121
- }
122
- }
123
  * {
124
  margin: 0;
125
  padding: 0;
126
  box-sizing: border-box;
127
  font-family: 'Poppins', sans-serif;
128
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
  header {
130
  transition: all 0.3s ease;
131
  background: rgba(15, 23, 42, 0.8);
@@ -270,9 +263,24 @@
270
  <a href="#svg" class="hover:text-primary transition-colors">SVG</a>
271
  <a href="#micro" class="hover:text-primary transition-colors">Micro</a>
272
  </div>
273
- <button class="md:hidden text-xl">
274
  <i class="fas fa-bars"></i>
275
  </button>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
276
  </nav>
277
  </header>
278
 
@@ -317,6 +325,42 @@
317
  </div>
318
  </section>
319
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
320
  <!-- Scroll Animations -->
321
  <section id="scroll" class="py-20">
322
  <div class="container mx-auto px-6">
@@ -569,6 +613,42 @@
569
  </div>
570
  </section>
571
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
572
  <!-- Advanced Animations -->
573
  <section class="py-20 bg-gradient-to-b from-slate-900 to-slate-800">
574
  <div class="container mx-auto px-6">
@@ -619,9 +699,39 @@
619
  </div>
620
  </section>
621
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
622
  <!-- Footer -->
623
- <footer class="py-12 border-t border-slate-800 bg-gradient-to-b from-slate-900/50 to-slate-900 relative overflow-hidden">
624
- <div class="wave"></div>
625
  <div class="absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/50 to-transparent"></div>
626
  <div class="container mx-auto px-6 text-center">
627
  <div class="text-3xl font-bold mb-6">
@@ -651,6 +761,39 @@
651
  </footer>
652
 
653
  <script>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
654
  // Enhanced animations
655
  // Typing animation
656
  const typingText = document.getElementById('typing-text');
 
99
  }
100
  }
101
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  * {
103
  margin: 0;
104
  padding: 0;
105
  box-sizing: border-box;
106
  font-family: 'Poppins', sans-serif;
107
  }
108
+
109
+ /* Mobile menu transitions */
110
+ #mobileMenu {
111
+ transition: transform 0.3s ease-out;
112
+ }
113
+
114
+ #mobileMenuOverlay {
115
+ transition: opacity 0.3s ease;
116
+ }
117
+
118
+ /* Prevent scrolling when menu is open */
119
+ body.menu-open {
120
+ overflow: hidden;
121
+ }
122
  header {
123
  transition: all 0.3s ease;
124
  background: rgba(15, 23, 42, 0.8);
 
263
  <a href="#svg" class="hover:text-primary transition-colors">SVG</a>
264
  <a href="#micro" class="hover:text-primary transition-colors">Micro</a>
265
  </div>
266
+ <button class="md:hidden text-xl" id="mobileMenuButton">
267
  <i class="fas fa-bars"></i>
268
  </button>
269
+ <div class="md:hidden fixed inset-0 bg-black/50 z-40 hidden" id="mobileMenuOverlay"></div>
270
+ <div class="md:hidden fixed top-0 right-0 h-full w-64 bg-slate-800 shadow-lg z-50 transform translate-x-full transition-transform duration-300" id="mobileMenu">
271
+ <div class="flex justify-end p-4">
272
+ <button id="closeMenuButton" class="text-xl">
273
+ <i class="fas fa-times"></i>
274
+ </button>
275
+ </div>
276
+ <nav class="flex flex-col space-y-4 p-6">
277
+ <a href="#home" class="hover:text-primary transition-colors">Home</a>
278
+ <a href="#scroll" class="hover:text-primary transition-colors">Scroll</a>
279
+ <a href="#css" class="hover:text-primary transition-colors">CSS</a>
280
+ <a href="#svg" class="hover:text-primary transition-colors">SVG</a>
281
+ <a href="#micro" class="hover:text-primary transition-colors">Micro</a>
282
+ </nav>
283
+ </div>
284
  </nav>
285
  </header>
286
 
 
325
  </div>
326
  </section>
327
 
328
+ <!-- Text Animations -->
329
+ <section class="py-20 bg-slate-900/50">
330
+ <div class="container mx-auto px-6">
331
+ <h2 class="text-4xl font-bold text-center mb-4">Text Animations</h2>
332
+ <p class="text-center text-slate-300 max-w-2xl mx-auto mb-16">
333
+ Creative ways to animate text content
334
+ </p>
335
+
336
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
337
+ <!-- Gradient Text -->
338
+ <div class="card p-8 text-center">
339
+ <h3 class="text-2xl font-semibold mb-6">Gradient Text</h3>
340
+ <div class="text-4xl font-bold bg-gradient-to-r from-primary to-secondary bg-clip-text text-transparent">
341
+ Colorful Text
342
+ </div>
343
+ </div>
344
+
345
+ <!-- Typing Effect -->
346
+ <div class="card p-8 text-center">
347
+ <h3 class="text-2xl font-semibold mb-6">Typing Effect</h3>
348
+ <div class="text-3xl font-mono overflow-hidden whitespace-nowrap border-r-4 border-primary w-0 mx-auto animate-typing">
349
+ Hello World!
350
+ </div>
351
+ </div>
352
+
353
+ <!-- Floating Text -->
354
+ <div class="card p-8 text-center">
355
+ <h3 class="text-2xl font-semibold mb-6">Floating Text</h3>
356
+ <div class="text-4xl font-bold animate-float">
357
+ Float
358
+ </div>
359
+ </div>
360
+ </div>
361
+ </div>
362
+ </section>
363
+
364
  <!-- Scroll Animations -->
365
  <section id="scroll" class="py-20">
366
  <div class="container mx-auto px-6">
 
613
  </div>
614
  </section>
615
 
616
+ <!-- Advanced Animations -->
617
+ <section class="py-20 bg-gradient-to-b from-slate-900 to-slate-800">
618
+ <div class="container mx-auto px-6">
619
+ <h2 class="text-4xl font-bold text-center mb-4">3D Transformations</h2>
620
+ <p class="text-center text-slate-300 max-w-2xl mx-auto mb-16">
621
+ Adding depth and perspective to your elements
622
+ </p>
623
+
624
+ <div class="grid grid-cols-1 md:grid-cols-3 gap-8">
625
+ <div class="card p-8 text-center transform transition-all duration-500 hover:rotate-y-180">
626
+ <div class="text-5xl text-primary mb-6">
627
+ <i class="fas fa-cube"></i>
628
+ </div>
629
+ <h3 class="text-2xl font-semibold mb-4">Rotate</h3>
630
+ <p class="text-slate-300">3D rotation effects</p>
631
+ </div>
632
+
633
+ <div class="card p-8 text-center transform transition-all duration-500 hover:perspective-1000 hover:translate-z-50">
634
+ <div class="text-5xl text-primary mb-6">
635
+ <i class="fas fa-arrows-alt"></i>
636
+ </div>
637
+ <h3 class="text-2xl font-semibold mb-4">Perspective</h3>
638
+ <p class="text-slate-300">Depth perception</p>
639
+ </div>
640
+
641
+ <div class="card p-8 text-center transform transition-all duration-500 hover:skew-y-12 hover:scale-110">
642
+ <div class="text-5xl text-primary mb-6">
643
+ <i class="fas fa-vector-square"></i>
644
+ </div>
645
+ <h3 class="text-2xl font-semibold mb-4">Skew</h3>
646
+ <p class="text-slate-300">Distortion effects</p>
647
+ </div>
648
+ </div>
649
+ </div>
650
+ </section>
651
+
652
  <!-- Advanced Animations -->
653
  <section class="py-20 bg-gradient-to-b from-slate-900 to-slate-800">
654
  <div class="container mx-auto px-6">
 
699
  </div>
700
  </section>
701
 
702
+ <!-- Background Animations -->
703
+ <section class="py-20 relative overflow-hidden">
704
+ <div class="absolute inset-0 z-0">
705
+ <div class="absolute top-0 left-0 w-full h-full bg-gradient-to-br from-primary/10 to-secondary/10 animate-pulse-slow"></div>
706
+ <div class="absolute top-1/4 left-1/4 w-64 h-64 bg-primary/20 rounded-full filter blur-3xl animate-float"></div>
707
+ <div class="absolute bottom-1/4 right-1/4 w-64 h-64 bg-secondary/20 rounded-full filter blur-3xl animate-float delay-2000"></div>
708
+ </div>
709
+
710
+ <div class="container mx-auto px-6 relative z-10">
711
+ <h2 class="text-4xl font-bold text-center mb-4">Background Animations</h2>
712
+ <p class="text-center text-slate-300 max-w-2xl mx-auto mb-16">
713
+ Subtle animations that enhance the overall design
714
+ </p>
715
+
716
+ <div class="grid grid-cols-1 md:grid-cols-2 gap-8">
717
+ <div class="card p-8">
718
+ <h3 class="text-2xl font-semibold mb-6">Gradient Pulse</h3>
719
+ <div class="w-full h-48 rounded-xl bg-gradient-to-br from-primary/30 to-secondary/30 animate-pulse-slow"></div>
720
+ </div>
721
+
722
+ <div class="card p-8">
723
+ <h3 class="text-2xl font-semibold mb-6">Floating Elements</h3>
724
+ <div class="relative w-full h-48 rounded-xl overflow-hidden">
725
+ <div class="absolute top-8 left-8 w-16 h-16 bg-primary/50 rounded-full animate-float"></div>
726
+ <div class="absolute bottom-8 right-8 w-16 h-16 bg-secondary/50 rounded-full animate-float delay-1000"></div>
727
+ </div>
728
+ </div>
729
+ </div>
730
+ </div>
731
+ </section>
732
+
733
  <!-- Footer -->
734
+ <footer class="py-12 border-t border-slate-800 bg-gradient-to-b from-slate-900/50 to-slate-900 relative">
 
735
  <div class="absolute top-0 left-0 right-0 h-px bg-gradient-to-r from-transparent via-primary/50 to-transparent"></div>
736
  <div class="container mx-auto px-6 text-center">
737
  <div class="text-3xl font-bold mb-6">
 
761
  </footer>
762
 
763
  <script>
764
+ // Mobile menu functionality
765
+ const mobileMenuButton = document.getElementById('mobileMenuButton');
766
+ const closeMenuButton = document.getElementById('closeMenuButton');
767
+ const mobileMenu = document.getElementById('mobileMenu');
768
+ const mobileMenuOverlay = document.getElementById('mobileMenuOverlay');
769
+
770
+ mobileMenuButton.addEventListener('click', () => {
771
+ mobileMenu.classList.remove('translate-x-full');
772
+ mobileMenuOverlay.classList.remove('hidden');
773
+ document.body.style.overflow = 'hidden';
774
+ });
775
+
776
+ closeMenuButton.addEventListener('click', () => {
777
+ mobileMenu.classList.add('translate-x-full');
778
+ mobileMenuOverlay.classList.add('hidden');
779
+ document.body.style.overflow = '';
780
+ });
781
+
782
+ mobileMenuOverlay.addEventListener('click', () => {
783
+ mobileMenu.classList.add('translate-x-full');
784
+ mobileMenuOverlay.classList.add('hidden');
785
+ document.body.style.overflow = '';
786
+ });
787
+
788
+ // Close menu when clicking on nav links
789
+ document.querySelectorAll('#mobileMenu a').forEach(link => {
790
+ link.addEventListener('click', () => {
791
+ mobileMenu.classList.add('translate-x-full');
792
+ mobileMenuOverlay.classList.add('hidden');
793
+ document.body.style.overflow = '';
794
+ });
795
+ });
796
+
797
  // Enhanced animations
798
  // Typing animation
799
  const typingText = document.getElementById('typing-text');