Spaces:
Running
Running
Download index.html from DEADS1KE/GASIFHFSProject: direct link, hf CLI and curl.
- Browser
- Download file 29.2 kB
-
https://huggingface.co/spaces/DEADS1KE/GASIFHFSProject/resolve/main/index.html
- Command line
-
hf download hf://spaces/DEADS1KE/GASIFHFSProject/index.html
-
curl -L -o index.html https://huggingface.co/spaces/DEADS1KE/GASIFHFSProject/resolve/main/index.html
29.2 kB
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <meta name="description" content="GASIFHFS: An open-source project for interacting with Google AI models via a Streamlit-based GUI."> | |
| <title>GASIFHFS Project</title> | |
| <script src="https://cdn.tailwindcss.com"></script> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <script> | |
| tailwind.config = { | |
| theme: { | |
| extend: { | |
| colors: { | |
| primary: { | |
| 50: '#f0f9ff', | |
| 100: '#e0f2fe', | |
| 200: '#bae6fd', | |
| 300: '#7dd3fc', | |
| 400: '#38bdf8', | |
| 500: '#0ea5e9', | |
| 600: '#0284c7', | |
| 700: '#0369a1', | |
| 800: '#075985', | |
| 900: '#0c4a6e', | |
| } | |
| } | |
| } | |
| } | |
| } | |
| </script> | |
| <style> | |
| .gradient-text { | |
| background-clip: text; | |
| -webkit-background-clip: text; | |
| color: transparent; | |
| background-image: linear-gradient(90deg, #3b82f6, #10b981); | |
| } | |
| .card-hover { | |
| transition: all 0.3s ease; | |
| } | |
| .card-hover:hover { | |
| transform: translateY(-5px); | |
| box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04); | |
| } | |
| .demo-btn { | |
| transition: all 0.3s ease; | |
| } | |
| .demo-btn:hover { | |
| transform: translateY(-2px); | |
| box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1); | |
| } | |
| .nav-link { | |
| position: relative; | |
| } | |
| .nav-link::after { | |
| content: ''; | |
| position: absolute; | |
| width: 0; | |
| height: 2px; | |
| bottom: 0; | |
| left: 0; | |
| background-color: #3b82f6; | |
| transition: width 0.3s ease; | |
| } | |
| .nav-link:hover::after { | |
| width: 100%; | |
| } | |
| .animate-float { | |
| animation: float 6s ease-in-out infinite; | |
| } | |
| @keyframes float { | |
| 0% { transform: translateY(0px); } | |
| 50% { transform: translateY(-20px); } | |
| 100% { transform: translateY(0px); } | |
| } | |
| </style> | |
| </head> | |
| <body class="bg-gray-50 min-h-screen flex flex-col"> | |
| <!-- Navigation --> | |
| <nav class="bg-white shadow-sm sticky top-0 z-50"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <div class="flex justify-between h-16 items-center"> | |
| <div class="flex items-center"> | |
| <div class="flex-shrink-0 flex items-center"> | |
| <i class="fas fa-robot text-2xl text-primary-600 mr-2"></i> | |
| <span class="text-xl font-bold text-gray-900">GASIFHFS</span> | |
| </div> | |
| </div> | |
| <div class="hidden md:block"> | |
| <div class="ml-10 flex items-baseline space-x-8"> | |
| <a href="#about" class="nav-link text-gray-700 hover:text-primary-600 px-3 py-2 rounded-md text-sm font-medium">About</a> | |
| <a href="#demos" class="nav-link text-gray-700 hover:text-primary-600 px-3 py-2 rounded-md text-sm font-medium">Demos</a> | |
| <a href="#features" class="nav-link text-gray-700 hover:text-primary-600 px-3 py-2 rounded-md text-sm font-medium">Features</a> | |
| <a href="#instructions" class="nav-link text-gray-700 hover:text-primary-600 px-3 py-2 rounded-md text-sm font-medium">Get Started</a> | |
| <a href="#info" class="nav-link text-gray-700 hover:text-primary-600 px-3 py-2 rounded-md text-sm font-medium">Info</a> | |
| </div> | |
| </div> | |
| <div class="md:hidden"> | |
| <button id="mobile-menu-button" class="inline-flex items-center justify-center p-2 rounded-md text-gray-700 hover:text-primary-600 focus:outline-none"> | |
| <i class="fas fa-bars"></i> | |
| </button> | |
| </div> | |
| </div> | |
| </div> | |
| <!-- Mobile menu --> | |
| <div id="mobile-menu" class="hidden md:hidden bg-white border-t border-gray-200"> | |
| <div class="px-2 pt-2 pb-3 space-y-1 sm:px-3"> | |
| <a href="#about" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50">About</a> | |
| <a href="#demos" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50">Demos</a> | |
| <a href="#features" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50">Features</a> | |
| <a href="#instructions" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50">Get Started</a> | |
| <a href="#info" class="block px-3 py-2 rounded-md text-base font-medium text-gray-700 hover:text-primary-600 hover:bg-gray-50">Info</a> | |
| </div> | |
| </div> | |
| </nav> | |
| <!-- Hero Section --> | |
| <header class="bg-gradient-to-r from-primary-50 to-blue-50 py-20"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 flex flex-col md:flex-row items-center"> | |
| <div class="md:w-1/2 mb-10 md:mb-0"> | |
| <h1 class="text-4xl md:text-5xl font-bold text-gray-900 mb-4"> | |
| <span class="gradient-text">GASIFHFS</span> Project | |
| </h1> | |
| <p class="text-xl text-gray-600 mb-6">A powerful Streamlit-based GUI for seamless interaction with Google AI models</p> | |
| <div class="flex space-x-4"> | |
| <a href="#demos" class="bg-primary-600 hover:bg-primary-700 text-white px-6 py-3 rounded-lg font-medium transition duration-300 shadow-md"> | |
| Try Demo <i class="fas fa-arrow-right ml-2"></i> | |
| </a> | |
| <a href="#instructions" class="border border-primary-600 text-primary-600 hover:bg-primary-50 px-6 py-3 rounded-lg font-medium transition duration-300"> | |
| Get Started <i class="fas fa-code ml-2"></i> | |
| </a> | |
| </div> | |
| </div> | |
| <div class="md:w-1/2 flex justify-center"> | |
| <div class="relative w-64 h-64 md:w-80 md:h-80"> | |
| <div class="absolute inset-0 bg-primary-100 rounded-full opacity-20 animate-pulse"></div> | |
| <div class="absolute inset-4 bg-gradient-to-br from-primary-400 to-blue-400 rounded-full flex items-center justify-center animate-float"> | |
| <i class="fas fa-brain text-white text-6xl md:text-7xl"></i> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </header> | |
| <main class="flex-grow max-w-7xl mx-auto px-4 sm:px-6 lg:px-8 py-12"> | |
| <!-- About Section --> | |
| <section id="about" class="mb-16"> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover"> | |
| <div class="p-8"> | |
| <div class="flex items-center mb-6"> | |
| <div class="bg-primary-100 p-3 rounded-full mr-4"> | |
| <i class="fas fa-info-circle text-primary-600 text-xl"></i> | |
| </div> | |
| <h2 class="text-2xl font-bold text-gray-800">About the Project</h2> | |
| </div> | |
| <div class="space-y-4 text-gray-600"> | |
| <p>GASIFHFS is an innovative open-source project designed to create an intuitive graphical interface based on Streamlit for interacting with Google AI models via API. The platform provides a seamless experience for users to leverage cutting-edge AI capabilities.</p> | |
| <p>Our solution offers token streaming, supports the latest models, allows for custom system prompts, image uploads, and provides fine-tuning options for generation parameters. It also features robust support for rendering mathematical formulas using KaTeX.</p> | |
| <div class="bg-blue-50 border-l-4 border-primary-500 p-4 mt-6"> | |
| <div class="flex"> | |
| <div class="flex-shrink-0"> | |
| <i class="fas fa-exclamation-circle text-primary-500"></i> | |
| </div> | |
| <div class="ml-3"> | |
| <p class="text-sm text-blue-700"> | |
| <strong>Note:</strong> This website serves as an informational page for the project. To directly interact with the AI, please visit our Hugging Face spaces (see Demos below). | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Demos Section --> | |
| <section id="demos" class="mb-16"> | |
| <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">Explore Our Demos</h2> | |
| <div class="grid md:grid-cols-2 gap-8"> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover"> | |
| <div class="p-8"> | |
| <div class="flex items-center mb-6"> | |
| <div class="bg-green-100 p-3 rounded-full mr-4"> | |
| <i class="fas fa-laptop-code text-green-600 text-xl"></i> | |
| </div> | |
| <h3 class="text-xl font-bold text-gray-800">GASIFHFS</h3> | |
| </div> | |
| <p class="text-gray-600 mb-6">The general-purpose version of GASIFHFS allows you to interact with various Gemini models, upload images, and customize settings including temperature, max tokens, and system prompts.</p> | |
| <div class="flex flex-wrap gap-4"> | |
| <a href="https://huggingface.co/spaces/DEADS1KE/GASIFHFS" target="_blank" class="demo-btn bg-green-600 hover:bg-green-700 text-white px-6 py-2 rounded-lg font-medium transition duration-300 shadow-md flex items-center"> | |
| Try Demo <i class="fas fa-external-link-alt ml-2"></i> | |
| </a> | |
| <button onclick="toggleDetails('demo1')" class="demo-btn border border-gray-300 hover:bg-gray-50 text-gray-700 px-6 py-2 rounded-lg font-medium transition duration-300 flex items-center"> | |
| More Info <i class="fas fa-chevron-down ml-2"></i> | |
| </button> | |
| </div> | |
| <div id="demo1-details" class="hidden mt-6 bg-gray-50 p-4 rounded-lg"> | |
| <h4 class="font-medium text-gray-800 mb-2">Key Features:</h4> | |
| <ul class="list-disc pl-5 space-y-1 text-gray-600"> | |
| <li>Supports multiple Gemini models</li> | |
| <li>Image upload and analysis capabilities</li> | |
| <li>Customizable generation parameters</li> | |
| <li>Token streaming for real-time responses</li> | |
| <li>Session history and context management</li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover"> | |
| <div class="p-8"> | |
| <div class="flex items-center mb-6"> | |
| <div class="bg-purple-100 p-3 rounded-full mr-4"> | |
| <i class="fas fa-square-root-alt text-purple-600 text-xl"></i> | |
| </div> | |
| <h3 class="text-xl font-bold text-gray-800">GASIFHFS-MATH</h3> | |
| </div> | |
| <p class="text-gray-600 mb-6">This specialized version is optimized for mathematical problem-solving with pre-configured system prompts to encourage LaTeX-formatted solutions and multi-language responses.</p> | |
| <div class="flex flex-wrap gap-4"> | |
| <a href="https://huggingface.co/spaces/DEADS1KE/GASIFHFS-MATH" target="_blank" class="demo-btn bg-purple-600 hover:bg-purple-700 text-white px-6 py-2 rounded-lg font-medium transition duration-300 shadow-md flex items-center"> | |
| Try Demo <i class="fas fa-external-link-alt ml-2"></i> | |
| </a> | |
| <button onclick="toggleDetails('demo2')" class="demo-btn border border-gray-300 hover:bg-gray-50 text-gray-700 px-6 py-2 rounded-lg font-medium transition duration-300 flex items-center"> | |
| More Info <i class="fas fa-chevron-down ml-2"></i> | |
| </button> | |
| </div> | |
| <div id="demo2-details" class="hidden mt-6 bg-gray-50 p-4 rounded-lg"> | |
| <h4 class="font-medium text-gray-800 mb-2">Key Features:</h4> | |
| <ul class="list-disc pl-5 space-y-1 text-gray-600"> | |
| <li>Optimized for mathematical problem-solving</li> | |
| <li>Automatic LaTeX formatting for equations</li> | |
| <li>Multi-language response support</li> | |
| <li>Step-by-step solution breakdowns</li> | |
| <li>Visualization of mathematical concepts</li> | |
| </ul> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Features Section --> | |
| <section id="features" class="mb-16"> | |
| <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">Powerful Features</h2> | |
| <div class="grid md:grid-cols-2 lg:grid-cols-3 gap-6"> | |
| <div class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition duration-300 border border-gray-100"> | |
| <div class="bg-blue-100 w-12 h-12 rounded-full flex items-center justify-center mb-4"> | |
| <i class="fas fa-bolt text-blue-600 text-xl"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-2">Token Streaming</h3> | |
| <p class="text-gray-600">Experience real-time responses with our efficient token streaming implementation.</p> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition duration-300 border border-gray-100"> | |
| <div class="bg-green-100 w-12 h-12 rounded-full flex items-center justify-center mb-4"> | |
| <i class="fas fa-sync-alt text-green-600 text-xl"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-2">Up-to-date Models</h3> | |
| <p class="text-gray-600">Access the latest Google AI models as soon as they become available.</p> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition duration-300 border border-gray-100"> | |
| <div class="bg-purple-100 w-12 h-12 rounded-full flex items-center justify-center mb-4"> | |
| <i class="fas fa-sliders-h text-purple-600 text-xl"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-2">Custom System Prompts</h3> | |
| <p class="text-gray-600">Tailor the AI's behavior with your own custom system prompts.</p> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition duration-300 border border-gray-100"> | |
| <div class="bg-yellow-100 w-12 h-12 rounded-full flex items-center justify-center mb-4"> | |
| <i class="fas fa-image text-yellow-600 text-xl"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-2">Image Upload</h3> | |
| <p class="text-gray-600">Upload and analyze images with multimodal AI capabilities.</p> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition duration-300 border border-gray-100"> | |
| <div class="bg-red-100 w-12 h-12 rounded-full flex items-center justify-center mb-4"> | |
| <i class="fas fa-thermometer-half text-red-600 text-xl"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-2">Temperature Control</h3> | |
| <p class="text-gray-600">Adjust the creativity vs. determinism of the AI's responses.</p> | |
| </div> | |
| <div class="bg-white p-6 rounded-xl shadow-sm hover:shadow-md transition duration-300 border border-gray-100"> | |
| <div class="bg-indigo-100 w-12 h-12 rounded-full flex items-center justify-center mb-4"> | |
| <i class="fas fa-square-root-alt text-indigo-600 text-xl"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800 mb-2">KaTeX Support</h3> | |
| <p class="text-gray-600">Beautiful rendering of mathematical formulas with LaTeX support.</p> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Instructions Section --> | |
| <section id="instructions" class="mb-16"> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover"> | |
| <div class="p-8"> | |
| <div class="flex items-center mb-6"> | |
| <div class="bg-orange-100 p-3 rounded-full mr-4"> | |
| <i class="fas fa-rocket text-orange-600 text-xl"></i> | |
| </div> | |
| <h2 class="text-2xl font-bold text-gray-800">Get Started</h2> | |
| </div> | |
| <div class="space-y-6"> | |
| <p class="text-gray-600">Follow these simple steps to set up GASIFHFS on your local machine:</p> | |
| <div class="bg-gray-50 rounded-lg p-6"> | |
| <div class="flex items-start mb-4"> | |
| <div class="bg-primary-100 text-primary-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-1 flex-shrink-0"> | |
| <span class="text-xs font-bold">1</span> | |
| </div> | |
| <div> | |
| <h3 class="font-medium text-gray-800">Clone the repository</h3> | |
| <div class="mt-2 bg-gray-800 rounded-md p-3 overflow-x-auto"> | |
| <code class="text-white text-sm">git clone https://github.com/SparkleSavvy/GASIFHFS.git</code> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="flex items-start mb-4"> | |
| <div class="bg-primary-100 text-primary-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-1 flex-shrink-0"> | |
| <span class="text-xs font-bold">2</span> | |
| </div> | |
| <div> | |
| <h3 class="font-medium text-gray-800">Navigate to the project directory</h3> | |
| <div class="mt-2 bg-gray-800 rounded-md p-3 overflow-x-auto"> | |
| <code class="text-white text-sm">cd GASIFHFS</code> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="flex items-start mb-4"> | |
| <div class="bg-primary-100 text-primary-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-1 flex-shrink-0"> | |
| <span class="text-xs font-bold">3</span> | |
| </div> | |
| <div> | |
| <h3 class="font-medium text-gray-800">Install dependencies</h3> | |
| <div class="mt-2 bg-gray-800 rounded-md p-3 overflow-x-auto"> | |
| <code class="text-white text-sm">pip install -r requirements.txt</code> | |
| </div> | |
| </div> | |
| </div> | |
| <div class="flex items-start"> | |
| <div class="bg-primary-100 text-primary-800 rounded-full w-6 h-6 flex items-center justify-center mr-3 mt-1 flex-shrink-0"> | |
| <span class="text-xs font-bold">4</span> | |
| </div> | |
| <div> | |
| <h3 class="font-medium text-gray-800">Run the application</h3> | |
| <div class="mt-2 bg-gray-800 rounded-md p-3 overflow-x-auto"> | |
| <code class="text-white text-sm">streamlit run app.py</code> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <p class="text-gray-600">For a detailed description of all features and settings, please refer to the <a href="https://github.com/SparkleSavvy/GASIFHFS/blob/main/README.md" target="_blank" class="text-primary-600 hover:underline">README</a> in the GitHub repository.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| <!-- Info Section --> | |
| <section id="info" class="mb-16"> | |
| <h2 class="text-3xl font-bold text-gray-800 mb-8 text-center">Project Information</h2> | |
| <div class="bg-white rounded-xl shadow-md overflow-hidden card-hover"> | |
| <div class="p-8"> | |
| <div class="grid md:grid-cols-3 gap-8"> | |
| <div class="bg-blue-50 p-6 rounded-lg"> | |
| <div class="flex items-center mb-4"> | |
| <div class="bg-blue-100 p-2 rounded-full mr-3"> | |
| <i class="fas fa-user-tie text-blue-600"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800">Developer</h3> | |
| </div> | |
| <p class="text-gray-600 mb-4">The project is developed by SparkleSavvy, an innovative developer creating cutting-edge AI tools.</p> | |
| <a href="https://github.com/SparkleSavvy" target="_blank" class="inline-flex items-center text-primary-600 hover:underline"> | |
| <i class="fab fa-github mr-2"></i> GitHub Profile | |
| </a> | |
| </div> | |
| <div class="bg-green-50 p-6 rounded-lg"> | |
| <div class="flex items-center mb-4"> | |
| <div class="bg-green-100 p-2 rounded-full mr-3"> | |
| <i class="fas fa-link text-green-600"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800">Links</h3> | |
| </div> | |
| <ul class="space-y-3"> | |
| <li> | |
| <a href="https://github.com/SparkleSavvy/GASIFHFS" target="_blank" class="flex items-center text-gray-700 hover:text-primary-600"> | |
| <i class="fab fa-github mr-2"></i> GitHub Repository | |
| </a> | |
| </li> | |
| <li> | |
| <a href="https://huggingface.co/spaces/DEADS1KE/GASIFHFS" target="_blank" class="flex items-center text-gray-700 hover:text-primary-600"> | |
| <i class="fas fa-external-link-alt mr-2"></i> Hugging Face Space | |
| </a> | |
| </li> | |
| </ul> | |
| </div> | |
| <div class="bg-purple-50 p-6 rounded-lg"> | |
| <div class="flex items-center mb-4"> | |
| <div class="bg-purple-100 p-2 rounded-full mr-3"> | |
| <i class="fas fa-envelope text-purple-600"></i> | |
| </div> | |
| <h3 class="text-lg font-semibold text-gray-800">Contacts</h3> | |
| </div> | |
| <div class="space-y-3"> | |
| <p class="flex items-center text-gray-700"> | |
| <i class="fab fa-discord mr-2"></i> Discord: deads1ke | |
| </p> | |
| <p class="text-sm text-gray-500 mt-4">For inquiries, collaborations, or support, please reach out via Discord.</p> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </section> | |
| </main> | |
| <!-- Footer --> | |
| <footer class="bg-gray-800 text-white py-8"> | |
| <div class="max-w-7xl mx-auto px-4 sm:px-6 lg:px-8"> | |
| <div class="md:flex md:items-center md:justify-between"> | |
| <div class="flex justify-center md:order-2 space-x-6"> | |
| <a href="https://github.com/SparkleSavvy/GASIFHFS" target="_blank" class="text-gray-400 hover:text-white"> | |
| <i class="fab fa-github text-xl"></i> | |
| </a> | |
| <a href="https://huggingface.co/spaces/DEADS1KE/GASIFHFS" target="_blank" class="text-gray-400 hover:text-white"> | |
| <i class="fas fa-external-link-alt text-xl"></i> | |
| </a> | |
| </div> | |
| <div class="mt-8 md:mt-0 md:order-1"> | |
| <p class="text-center text-base text-gray-400"> | |
| © 2025 SparkleSavvy. GASIFHFS Project. All rights reserved. | |
| </p> | |
| </div> | |
| </div> | |
| </div> | |
| </footer> | |
| <script> | |
| // Mobile menu toggle | |
| document.getElementById('mobile-menu-button').addEventListener('click', function() { | |
| const menu = document.getElementById('mobile-menu'); | |
| menu.classList.toggle('hidden'); | |
| }); | |
| // Demo details toggle | |
| function toggleDetails(demoId) { | |
| const details = document.getElementById(demoId + '-details'); | |
| details.classList.toggle('hidden'); | |
| const button = event.currentTarget; | |
| const icon = button.querySelector('i'); | |
| if (details.classList.contains('hidden')) { | |
| icon.classList.remove('fa-chevron-up'); | |
| icon.classList.add('fa-chevron-down'); | |
| } else { | |
| icon.classList.remove('fa-chevron-down'); | |
| icon.classList.add('fa-chevron-up'); | |
| } | |
| } | |
| // Smooth scrolling for anchor links | |
| document.querySelectorAll('a[href^="#"]').forEach(anchor => { | |
| anchor.addEventListener('click', function (e) { | |
| e.preventDefault(); | |
| // Close mobile menu if open | |
| document.getElementById('mobile-menu').classList.add('hidden'); | |
| document.querySelector(this.getAttribute('href')).scrollIntoView({ | |
| behavior: 'smooth' | |
| }); | |
| }); | |
| }); | |
| // Add shadow to navbar on scroll | |
| window.addEventListener('scroll', function() { | |
| const nav = document.querySelector('nav'); | |
| if (window.scrollY > 10) { | |
| nav.classList.add('shadow-lg'); | |
| } else { | |
| nav.classList.remove('shadow-lg'); | |
| } | |
| }); | |
| </script> | |
| </body> | |
| </html> |