Aleksandr Sashka commited on
Commit
f5b6191
·
verified ·
1 Parent(s): 4b761e8

создай современную шапку сайта с эффектами анимацией и с иконками

Browse files
Files changed (1) hide show
  1. index.html +123 -29
index.html CHANGED
@@ -7,7 +7,7 @@
7
  <script src="https://cdn.tailwindcss.com"></script>
8
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
9
  <script src="https://unpkg.com/feather-icons"></script>
10
- <style>
11
  @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700;900&display=swap');
12
  :root {
13
  --primary-gold: #FFD700;
@@ -219,14 +219,93 @@ max-width: 1000px;
219
  0% { transform: translateY(0); }
220
  100% { transform: translateY(-240px); }
221
  }
222
- /* .nav-link styles removed */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
223
  </style>
224
  </head>
225
  <body class="text-white bg-black">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
226
  <div class="site-wrapper w-full max-w-[1200px] mx-auto px-4">
227
- <!-- Header removed -->
228
  <!-- Hero Section -->
229
- <section class="pt-12 pb-16 relative overflow-hidden">
230
  <div class="absolute inset-0 bg-cover bg-center opacity-30 bg-[length:70%]" style="background-image: url('https://testsite.casino-ya.ru/azino/images/59.jpg');"></div>
231
  <div class="absolute inset-0 overflow-hidden">
232
  </div>
@@ -781,40 +860,55 @@ feather.replace();
781
  this.textContent = 'КРУТИТЬ';
782
  }, 2000);
783
  });
784
- // Add scroll effect to header
785
  window.addEventListener('scroll', function() {
786
- const header = document.querySelector('header');
787
- if (window.scrollY > 50) {
788
- header.classList.add('bg-black/95');
 
789
  } else {
790
- header.classList.remove('bg-black/95');
 
791
  }
792
  });
793
- // Mobile menu functionality
794
- const mobileMenuButton = document.querySelector('.mobile-menu-btn');
795
- const mobileMenu = document.querySelector('.mobile-menu');
796
-
797
- mobileMenuButton.addEventListener('click', function() {
798
- mobileMenu.classList.toggle('active');
 
 
 
 
 
 
 
 
 
799
  feather.replace();
800
  });
801
-
802
- // Close mobile menu when clicking outside
803
- document.addEventListener('click', function(event) {
804
- if (!event.target.closest('.mobile-menu') &&
805
- !event.target.closest('.mobile-menu-btn') &&
806
- mobileMenu.classList.contains('active')) {
807
- mobileMenu.classList.remove('active');
808
- }
 
809
  });
810
-
811
- // Close mobile menu when clicking on links
812
- document.querySelectorAll('.mobile-menu a').forEach(link => {
813
- link.addEventListener('click', function() {
814
- mobileMenu.classList.remove('active');
 
 
 
815
  });
816
  });
817
- // Responsive viewport handling
818
  function handleViewport() {
819
  document.body.style.minHeight = '100vh';
820
  document.querySelector('.site-wrapper').style.minHeight = 'calc(100vh - 70px)'; // Account for header
 
7
  <script src="https://cdn.tailwindcss.com"></script>
8
  <script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
9
  <script src="https://unpkg.com/feather-icons"></script>
10
+ <style>
11
  @import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700;900&display=swap');
12
  :root {
13
  --primary-gold: #FFD700;
 
219
  0% { transform: translateY(0); }
220
  100% { transform: translateY(-240px); }
221
  }
222
+
223
+ /* Header styles */
224
+ .nav-link {
225
+ position: relative;
226
+ font-weight: 500;
227
+ transition: color 0.3s ease;
228
+ }
229
+ .nav-link::after {
230
+ content: '';
231
+ position: absolute;
232
+ left: 0;
233
+ bottom: -4px;
234
+ width: 0;
235
+ height: 2px;
236
+ background: var(--primary-gold);
237
+ transition: width 0.3s ease;
238
+ }
239
+ .nav-link:hover::after {
240
+ width: 100%;
241
+ }
242
+ .nav-link-mobile {
243
+ display: block;
244
+ padding: 0.75rem 0;
245
+ font-weight: 500;
246
+ transition: color 0.3s ease;
247
+ }
248
+ .nav-link-mobile:hover {
249
+ color: var(--primary-gold);
250
+ }
251
+ #mobile-menu {
252
+ transition: max-height 0.5s ease-in-out;
253
+ }
254
  </style>
255
  </head>
256
  <body class="text-white bg-black">
257
+ <!-- Modern Header -->
258
+ <header id="main-header" class="fixed top-0 left-0 right-0 z-50 bg-black/80 backdrop-blur-lg border-b border-yellow-500/30 shadow-lg">
259
+ <div class="site-wrapper w-full max-w-[1200px] mx-auto px-4">
260
+ <div class="flex items-center justify-between h-20">
261
+ <!-- Logo -->
262
+ <a href="/" class="flex items-center space-x-3 group">
263
+ <img src="http://testsite.casino-ya.ru/azino/images/3.png" alt="Azino 777" class="h-10 w-auto transition-transform duration-300 group-hover:scale-110">
264
+ <span class="bebas text-2xl md:text-3xl gold-text tracking-wide">AZINO 777</span>
265
+ </a>
266
+
267
+ <!-- Desktop Nav -->
268
+ <nav class="hidden md:flex items-center space-x-8">
269
+ <a href="#games" class="nav-link">Игры</a>
270
+ <a href="#bonuses" class="nav-link">Бонусы</a>
271
+ <a href="#mobile" class="nav-link">Мобильная</a>
272
+ <a href="#support" class="nav-link">Поддержка</a>
273
+ </nav>
274
+
275
+ <!-- Right Side -->
276
+ <div class="flex items-center space-x-4">
277
+ <button class="hidden md:inline-flex items-center space-x-2 bg-yellow-500 hover:bg-yellow-400 text-black px-5 py-2 rounded-full font-bold transition-all duration-300 hover:scale-105">
278
+ <i data-feather="log-in" class="w-4 h-4"></i>
279
+ <span>Войти</span>
280
+ </button>
281
+ <button id="menu-toggle" class="md:hidden p-2 rounded-lg hover:bg-yellow-500/20 transition-colors">
282
+ <i data-feather="menu" class="w-6 h-6"></i>
283
+ </button>
284
+ </div>
285
+ </div>
286
+
287
+ <!-- Mobile Menu -->
288
+ <div id="mobile-menu" class="md:hidden overflow-hidden max-h-0 transition-all duration-500 ease-in-out">
289
+ <nav class="flex flex-col space-y-4 py-6">
290
+ <a href="#games" class="nav-link-mobile">Игры</a>
291
+ <a href="#bonuses" class="nav-link-mobile">Бонусы</a>
292
+ <a href="#mobile" class="nav-link-mobile">Мобильная</a>
293
+ <a href="#support" class="nav-link-mobile">Поддержка</a>
294
+ <button class="flex items-center justify-center space-x-2 bg-yellow-500 hover:bg-yellow-400 text-black px-5 py-3 rounded-full font-bold transition-all duration-300 hover:scale-105">
295
+ <i data-feather="log-in" class="w-4 h-4"></i>
296
+ <span>Войти</span>
297
+ </button>
298
+ </nav>
299
+ </div>
300
+ </div>
301
+ </header>
302
+
303
+ <!-- Hero offset -->
304
+ <div class="h-20"></div>
305
+
306
  <div class="site-wrapper w-full max-w-[1200px] mx-auto px-4">
 
307
  <!-- Hero Section -->
308
+ <section class="pt-12 pb-16 relative overflow-hidden">
309
  <div class="absolute inset-0 bg-cover bg-center opacity-30 bg-[length:70%]" style="background-image: url('https://testsite.casino-ya.ru/azino/images/59.jpg');"></div>
310
  <div class="absolute inset-0 overflow-hidden">
311
  </div>
 
860
  this.textContent = 'КРУТИТЬ';
861
  }, 2000);
862
  });
863
+ // Header scroll effect
864
  window.addEventListener('scroll', function() {
865
+ const header = document.getElementById('main-header');
866
+ if (window.scrollY > 20) {
867
+ header.classList.add('bg-black/95', 'border-yellow-500/50');
868
+ header.classList.remove('bg-black/80');
869
  } else {
870
+ header.classList.remove('bg-black/95', 'border-yellow-500/50');
871
+ header.classList.add('bg-black/80');
872
  }
873
  });
874
+
875
+ // Mobile menu toggle
876
+ const menuToggle = document.getElementById('menu-toggle');
877
+ const mobileMenu = document.getElementById('mobile-menu');
878
+ let menuOpen = false;
879
+
880
+ menuToggle.addEventListener('click', () => {
881
+ menuOpen = !menuOpen;
882
+ if (menuOpen) {
883
+ mobileMenu.style.maxHeight = mobileMenu.scrollHeight + 'px';
884
+ menuToggle.innerHTML = '<i data-feather="x" class="w-6 h-6"></i>';
885
+ } else {
886
+ mobileMenu.style.maxHeight = '0';
887
+ menuToggle.innerHTML = '<i data-feather="menu" class="w-6 h-6"></i>';
888
+ }
889
  feather.replace();
890
  });
891
+
892
+ // Close mobile menu on link click
893
+ document.querySelectorAll('.nav-link-mobile').forEach(link => {
894
+ link.addEventListener('click', () => {
895
+ menuOpen = false;
896
+ mobileMenu.style.maxHeight = '0';
897
+ menuToggle.innerHTML = '<i data-feather="menu" class="w-6 h-6"></i>';
898
+ feather.replace();
899
+ });
900
  });
901
+
902
+ // Nav-link hover animation
903
+ document.querySelectorAll('.nav-link').forEach(link => {
904
+ link.addEventListener('mouseenter', () => {
905
+ link.classList.add('text-yellow-400');
906
+ });
907
+ link.addEventListener('mouseleave', () => {
908
+ link.classList.remove('text-yellow-400');
909
  });
910
  });
911
+ // Responsive viewport handling
912
  function handleViewport() {
913
  document.body.style.minHeight = '100vh';
914
  document.querySelector('.site-wrapper').style.minHeight = 'calc(100vh - 70px)'; // Account for header