Spaces:
Running
Running
Aleksandr Sashka commited on
проверь все скрипты чтобы все версии сайта работали
Browse files- index.html +98 -36
index.html
CHANGED
|
@@ -4,9 +4,37 @@
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Azino 777 – Официальный сайт казино</title>
|
| 7 |
-
<script src="https://cdn.tailwindcss.com">
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 9 |
-
<script
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
<style>
|
| 11 |
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700;900&display=swap');
|
| 12 |
:root {
|
|
@@ -821,10 +849,20 @@ transition: max-height 0.5s ease-in-out;
|
|
| 821 |
</div>
|
| 822 |
|
| 823 |
<script>
|
| 824 |
-
|
| 825 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 826 |
// Smooth scrolling for navigation links
|
| 827 |
-
|
| 828 |
anchor.addEventListener('click', function (e) {
|
| 829 |
e.preventDefault();
|
| 830 |
const target = document.querySelector(this.getAttribute('href'));
|
|
@@ -836,9 +874,11 @@ feather.replace();
|
|
| 836 |
}
|
| 837 |
});
|
| 838 |
});
|
| 839 |
-
// Interactive slot machine
|
| 840 |
-
document.querySelector('.slot-machine button')
|
| 841 |
-
|
|
|
|
|
|
|
| 842 |
const reelSymbols = ['🍒', '🍋', '🍊', '🍇', '💎', '7️⃣'];
|
| 843 |
|
| 844 |
this.disabled = true;
|
|
@@ -877,10 +917,11 @@ document.querySelector('.slot-machine button').addEventListener('click', functio
|
|
| 877 |
}
|
| 878 |
}, 3500);
|
| 879 |
});
|
| 880 |
-
// Header scroll effect
|
| 881 |
-
|
| 882 |
-
|
| 883 |
-
|
|
|
|
| 884 |
header.classList.add('bg-black/95', 'border-yellow-500/50');
|
| 885 |
header.classList.remove('bg-black/80');
|
| 886 |
} else {
|
|
@@ -888,12 +929,12 @@ window.addEventListener('scroll', function() {
|
|
| 888 |
header.classList.add('bg-black/80');
|
| 889 |
}
|
| 890 |
});
|
| 891 |
-
// Mobile menu toggle
|
| 892 |
-
const menuToggle = document.getElementById('menu-toggle');
|
| 893 |
const mobileMenu = document.getElementById('mobile-menu');
|
| 894 |
-
|
| 895 |
-
|
| 896 |
-
|
| 897 |
menuOpen = !menuOpen;
|
| 898 |
if (menuOpen) {
|
| 899 |
mobileMenu.style.maxHeight = mobileMenu.scrollHeight + 'px';
|
|
@@ -904,28 +945,39 @@ const menuToggle = document.getElementById('menu-toggle');
|
|
| 904 |
}
|
| 905 |
feather.replace();
|
| 906 |
});
|
| 907 |
-
// Close mobile menu on link click
|
| 908 |
-
document.querySelectorAll('.nav-link-mobile')
|
| 909 |
-
|
|
|
|
|
|
|
| 910 |
menuOpen = false;
|
| 911 |
mobileMenu.style.maxHeight = '0';
|
| 912 |
menuToggle.innerHTML = '<i data-feather="menu" class="w-6 h-6"></i>';
|
| 913 |
feather.replace();
|
| 914 |
});
|
| 915 |
});
|
| 916 |
-
// Nav-link hover animation
|
| 917 |
-
document.querySelectorAll('.nav-link')
|
| 918 |
-
|
|
|
|
|
|
|
| 919 |
link.classList.add('text-yellow-400');
|
| 920 |
});
|
| 921 |
link.addEventListener('mouseleave', () => {
|
| 922 |
link.classList.remove('text-yellow-400');
|
| 923 |
});
|
| 924 |
});
|
| 925 |
-
|
| 926 |
-
|
| 927 |
-
|
| 928 |
-
document.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 929 |
|
| 930 |
// Adjust table display on small screens
|
| 931 |
const paymentTable = document.querySelector('.card-gradient table');
|
|
@@ -937,14 +989,24 @@ function handleViewport() {
|
|
| 937 |
}
|
| 938 |
}
|
| 939 |
}
|
| 940 |
-
|
| 941 |
-
|
| 942 |
-
|
| 943 |
-
|
| 944 |
-
|
| 945 |
-
|
| 946 |
-
|
| 947 |
-
|
| 948 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 949 |
</script>
|
| 950 |
</body>
|
|
|
|
| 4 |
<meta charset="UTF-8">
|
| 5 |
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
| 6 |
<title>Azino 777 – Официальный сайт казино</title>
|
| 7 |
+
<script src="https://cdn.tailwindcss.com">
|
| 8 |
+
// Polyfill for older browsers
|
| 9 |
+
if (!Element.prototype.matches) {
|
| 10 |
+
Element.prototype.matches =
|
| 11 |
+
Element.prototype.msMatchesSelector ||
|
| 12 |
+
Element.prototype.webkitMatchesSelector;
|
| 13 |
+
}
|
| 14 |
+
|
| 15 |
+
if (!Element.prototype.closest) {
|
| 16 |
+
Element.prototype.closest = function(s) {
|
| 17 |
+
var el = this;
|
| 18 |
+
do {
|
| 19 |
+
if (el.matches(s)) return el;
|
| 20 |
+
el = el.parentElement || el.parentNode;
|
| 21 |
+
} while (el !== null && el.nodeType === 1);
|
| 22 |
+
return null;
|
| 23 |
+
};
|
| 24 |
+
}
|
| 25 |
+
</script>
|
| 26 |
+
<!-- Combined Feather Icons from both CDN and npm for maximum compatibility -->
|
| 27 |
<script src="https://cdn.jsdelivr.net/npm/feather-icons/dist/feather.min.js"></script>
|
| 28 |
+
<script>feather.replace()</script>
|
| 29 |
+
<script>
|
| 30 |
+
// Fallback if primary CDN fails
|
| 31 |
+
if(typeof feather === 'undefined') {
|
| 32 |
+
document.write('<script src="https://unpkg.com/feather-icons"><\/script>');
|
| 33 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 34 |
+
feather.replace();
|
| 35 |
+
});
|
| 36 |
+
}
|
| 37 |
+
</script>
|
| 38 |
<style>
|
| 39 |
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500;700;900&display=swap');
|
| 40 |
:root {
|
|
|
|
| 849 |
</div>
|
| 850 |
|
| 851 |
<script>
|
| 852 |
+
// Ensure Feather Icons are loaded
|
| 853 |
+
if(typeof feather !== 'undefined') {
|
| 854 |
+
feather.replace();
|
| 855 |
+
} else {
|
| 856 |
+
console.warn('Feather Icons not loaded - trying fallback');
|
| 857 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 858 |
+
if(typeof feather !== 'undefined') {
|
| 859 |
+
feather.replace();
|
| 860 |
+
}
|
| 861 |
+
});
|
| 862 |
+
}
|
| 863 |
+
|
| 864 |
// Smooth scrolling for navigation links
|
| 865 |
+
document.querySelectorAll('a[href^="#"]').forEach(anchor => {
|
| 866 |
anchor.addEventListener('click', function (e) {
|
| 867 |
e.preventDefault();
|
| 868 |
const target = document.querySelector(this.getAttribute('href'));
|
|
|
|
| 874 |
}
|
| 875 |
});
|
| 876 |
});
|
| 877 |
+
// Interactive slot machine with null checks
|
| 878 |
+
const slotButton = document.querySelector('.slot-machine button');
|
| 879 |
+
if(slotButton) {
|
| 880 |
+
slotButton.addEventListener('click', function() {
|
| 881 |
+
const reels = document.querySelectorAll('.reel-content');
|
| 882 |
const reelSymbols = ['🍒', '🍋', '🍊', '🍇', '💎', '7️⃣'];
|
| 883 |
|
| 884 |
this.disabled = true;
|
|
|
|
| 917 |
}
|
| 918 |
}, 3500);
|
| 919 |
});
|
| 920 |
+
// Header scroll effect with null check
|
| 921 |
+
const header = document.getElementById('main-header');
|
| 922 |
+
if(header) {
|
| 923 |
+
window.addEventListener('scroll', function() {
|
| 924 |
+
if (window.scrollY > 20) {
|
| 925 |
header.classList.add('bg-black/95', 'border-yellow-500/50');
|
| 926 |
header.classList.remove('bg-black/80');
|
| 927 |
} else {
|
|
|
|
| 929 |
header.classList.add('bg-black/80');
|
| 930 |
}
|
| 931 |
});
|
| 932 |
+
// Mobile menu toggle with null checks
|
| 933 |
+
const menuToggle = document.getElementById('menu-toggle');
|
| 934 |
const mobileMenu = document.getElementById('mobile-menu');
|
| 935 |
+
if(menuToggle && mobileMenu) {
|
| 936 |
+
let menuOpen = false;
|
| 937 |
+
menuToggle.addEventListener('click', () => {
|
| 938 |
menuOpen = !menuOpen;
|
| 939 |
if (menuOpen) {
|
| 940 |
mobileMenu.style.maxHeight = mobileMenu.scrollHeight + 'px';
|
|
|
|
| 945 |
}
|
| 946 |
feather.replace();
|
| 947 |
});
|
| 948 |
+
// Close mobile menu on link click with null check
|
| 949 |
+
const mobileLinks = document.querySelectorAll('.nav-link-mobile');
|
| 950 |
+
if(mobileLinks.length > 0) {
|
| 951 |
+
mobileLinks.forEach(link => {
|
| 952 |
+
link.addEventListener('click', () => {
|
| 953 |
menuOpen = false;
|
| 954 |
mobileMenu.style.maxHeight = '0';
|
| 955 |
menuToggle.innerHTML = '<i data-feather="menu" class="w-6 h-6"></i>';
|
| 956 |
feather.replace();
|
| 957 |
});
|
| 958 |
});
|
| 959 |
+
// Nav-link hover animation with null check
|
| 960 |
+
const navLinks = document.querySelectorAll('.nav-link');
|
| 961 |
+
if(navLinks.length > 0) {
|
| 962 |
+
navLinks.forEach(link => {
|
| 963 |
+
link.addEventListener('mouseenter', () => {
|
| 964 |
link.classList.add('text-yellow-400');
|
| 965 |
});
|
| 966 |
link.addEventListener('mouseleave', () => {
|
| 967 |
link.classList.remove('text-yellow-400');
|
| 968 |
});
|
| 969 |
});
|
| 970 |
+
}
|
| 971 |
+
// Responsive viewport handling with null checks
|
| 972 |
+
function handleViewport() {
|
| 973 |
+
if(document.body) {
|
| 974 |
+
document.body.style.minHeight = '100vh';
|
| 975 |
+
}
|
| 976 |
+
|
| 977 |
+
const siteWrapper = document.querySelector('.site-wrapper');
|
| 978 |
+
if(siteWrapper) {
|
| 979 |
+
siteWrapper.style.minHeight = 'calc(100vh - 70px)'; // Account for header
|
| 980 |
+
}
|
| 981 |
|
| 982 |
// Adjust table display on small screens
|
| 983 |
const paymentTable = document.querySelector('.card-gradient table');
|
|
|
|
| 989 |
}
|
| 990 |
}
|
| 991 |
}
|
| 992 |
+
|
| 993 |
+
// Initialize only when DOM is fully loaded
|
| 994 |
+
document.addEventListener('DOMContentLoaded', function() {
|
| 995 |
+
// Initial call
|
| 996 |
+
handleViewport();
|
| 997 |
+
|
| 998 |
+
// Update on resize with debounce
|
| 999 |
+
let resizeTimer;
|
| 1000 |
+
window.addEventListener('resize', function() {
|
| 1001 |
+
clearTimeout(resizeTimer);
|
| 1002 |
+
resizeTimer = setTimeout(handleViewport, 250);
|
| 1003 |
+
});
|
| 1004 |
+
|
| 1005 |
+
// Responsive table handling
|
| 1006 |
+
const paymentTable = document.querySelector('.card-gradient table');
|
| 1007 |
+
if (paymentTable && window.innerWidth < 768) {
|
| 1008 |
+
paymentTable.classList.add('payment-table');
|
| 1009 |
+
}
|
| 1010 |
+
});
|
| 1011 |
</script>
|
| 1012 |
</body>
|