Changed around line 1
+ document.addEventListener('DOMContentLoaded', () => {
+ // Domain search functionality
+ const searchBtn = document.getElementById('search-btn');
+ const searchInput = document.getElementById('domain-search');
+ const domainType = document.getElementById('domain-type');
+
+ searchBtn.addEventListener('click', () => {
+ const query = searchInput.value;
+ const type = domainType.value;
+ searchDomains(query, type);
+ });
+
+ // Connect wallet button
+ const connectWalletBtn = document.querySelector('.connect-wallet');
+ connectWalletBtn.addEventListener('click', () => {
+ // Implement wallet connection logic here
+ alert('Wallet connection feature coming soon!');
+ });
+
+ // Filter buttons
+ const filterBtns = document.querySelectorAll('.filter-btn');
+ filterBtns.forEach(btn => {
+ btn.addEventListener('click', () => {
+ filterBtns.forEach(b => b.classList.remove('active'));
+ btn.classList.add('active');
+ filterDomains(btn.textContent.toLowerCase());
+ });
+ });
+
+ // Sample domain data
+ const domains = [
+ { name: 'crypto.eth', price: '10 ETH', type: 'web3' },
+ { name: 'nft.sol', price: '500 SOL', type: 'web3' },
+ { name: 'metaverse.com', price: '$100,000', type: 'dns' },
+ // Add more sample domains
+ ];
+
+ function searchDomains(query, type) {
+ // Implement domain search logic here
+ console.log(`Searching for ${query} in ${type} domains`);
+ }
+
+ function filterDomains(filter) {
+ // Implement domain filtering logic here
+ console.log(`Filtering domains by ${filter}`);
+ }
+
+ // Smooth scroll for navigation links
+ document.querySelectorAll('a[href^="#"]').forEach(anchor => {
+ anchor.addEventListener('click', function (e) {
+ e.preventDefault();
+ document.querySelector(this.getAttribute('href')).scrollIntoView({
+ behavior: 'smooth'
+ });
+ });
+ });
+
+ // Animation on scroll
+ const observer = new IntersectionObserver((entries) => {
+ entries.forEach(entry => {
+ if (entry.isIntersecting) {
+ entry.target.classList.add('fade-in');
+ }
+ });
+ });
+
+ document.querySelectorAll('.domain-card').forEach((card) => {
+ observer.observe(card);
+ });
+ });