Spaces:
Runtime error
Runtime error
| <html lang="en"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
| <title>Nexus Launcher | Web App</title> | |
| <meta name="description" content="A modern web application launcher interface"> | |
| <!-- Importing FontAwesome for Icons --> | |
| <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css"> | |
| <style> | |
| :root { | |
| --primary-color: #6366f1; | |
| --primary-hover: #4f46e5; | |
| --bg-gradient: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%); | |
| --glass-bg: rgba(30, 41, 59, 0.7); | |
| --glass-border: rgba(255, 255, 255, 0.1); | |
| --text-main: #f8fafc; | |
| --text-muted: #94a3b8; | |
| --success: #10b981; | |
| --danger: #ef4444; | |
| --card-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5); | |
| } | |
| * { | |
| box-sizing: border-box; | |
| margin: 0; | |
| padding: 0; | |
| font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; | |
| } | |
| body { | |
| background: var(--bg-gradient); | |
| color: var(--text-main); | |
| min-height: 100vh; | |
| display: flex; | |
| flex-direction: column; | |
| overflow-x: hidden; | |
| } | |
| /* --- Header Section --- */ | |
| header { | |
| padding: 20px; | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| border-bottom: 1px solid var(--glass-border); | |
| backdrop-filter: blur(10px); | |
| position: sticky; | |
| top: 0; | |
| z-index: 100; | |
| background: rgba(15, 23, 42, 0.8); | |
| } | |
| .logo { | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| color: white; | |
| } | |
| .logo i { | |
| color: var(--primary-color); | |
| } | |
| .top-nav { | |
| display: flex; | |
| gap: 20px; | |
| align-items: center; | |
| } | |
| .nav-link { | |
| color: var(--text-muted); | |
| text-decoration: none; | |
| transition: color 0.3s; | |
| font-size: 0.9rem; | |
| } | |
| .nav-link:hover { | |
| color: var(--text-main); | |
| } | |
| .btn { | |
| padding: 8px 16px; | |
| border-radius: 6px; | |
| border: none; | |
| cursor: pointer; | |
| font-weight: 600; | |
| transition: all 0.3s ease; | |
| display: flex; | |
| align-items: center; | |
| gap: 8px; | |
| } | |
| .btn-primary { | |
| background-color: var(--primary-color); | |
| color: white; | |
| box-shadow: 0 4px 6px -1px rgba(99, 102, 241, 0.4); | |
| } | |
| .btn-primary:hover { | |
| background-color: var(--primary-hover); | |
| transform: translateY(-1px); | |
| box-shadow: 0 6px 8px -1px rgba(99, 102, 241, 0.5); | |
| } | |
| .btn-outline { | |
| background: transparent; | |
| border: 1px solid var(--glass-border); | |
| color: var(--text-main); | |
| } | |
| .btn-outline:hover { | |
| background: rgba(255,255,255,0.05); | |
| } | |
| /* --- Main Content Area --- */ | |
| main { | |
| flex: 1; | |
| padding: 40px; | |
| max-width: 1200px; | |
| margin: 0 auto; | |
| width: 100%; | |
| } | |
| .welcome-section { | |
| margin-bottom: 50px; | |
| } | |
| h1 { | |
| font-size: 3rem; | |
| font-weight: 800; | |
| margin-bottom: 10px; | |
| background: linear-gradient(to right, #fff, #94a3b8); | |
| -webkit-background-clip: text; | |
| -webkit-text-fill-color: transparent; | |
| } | |
| p.subtitle { | |
| color: var(--text-muted); | |
| font-size: 1.2rem; | |
| max-width: 600px; | |
| } | |
| /* --- Grid Layout for Apps --- */ | |
| .apps-grid { | |
| display: grid; | |
| grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); | |
| gap: 25px; | |
| } | |
| .app-card { | |
| background: var(--glass-bg); | |
| border: 1px solid var(--glass-border); | |
| border-radius: 16px; | |
| padding: 30px; | |
| transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1); | |
| cursor: pointer; | |
| position: relative; | |
| overflow: hidden; | |
| } | |
| .app-card:hover { | |
| transform: translateY(-5px); | |
| background: rgba(51, 65, 85, 0.8); | |
| border-color: var(--primary-color); | |
| box-shadow: var(--card-shadow); | |
| } | |
| .app-icon { | |
| width: 60px; | |
| height: 60px; | |
| background: rgba(99, 102, 241, 0.15); | |
| color: var(--primary-color); | |
| border-radius: 12px; | |
| display: flex; | |
| align-items: center; | |
| justify-content: center; | |
| font-size: 1.8rem; | |
| margin-bottom: 20px; | |
| } | |
| .app-card:hover .app-icon { | |
| background: rgba(99, 102, 241, 0.25); | |
| transform: scale(1.1); | |
| } | |
| .app-title { | |
| font-size: 1.5rem; | |
| font-weight: 700; | |
| margin-bottom: 8px; | |
| } | |
| .app-desc { | |
| color: var(--text-muted); | |
| line-height: 1.6; | |
| font-size: 0.95rem; | |
| } | |
| .launch-badge { | |
| position: absolute; | |
| top: 20px; | |
| right: 20px; | |
| background: rgba(16, 185, 129, 0.2); | |
| color: var(--success); | |
| padding: 4px 10px; | |
| border-radius: 20px; | |
| font-size: 0.75rem; | |
| font-weight: 700; | |
| text-transform: uppercase; | |
| opacity: 0; | |
| transition: opacity 0.3s; | |
| } | |
| .app-card:hover .launch-badge { | |
| opacity: 1; | |
| } | |
| /* --- Modal (The "Application" Window) --- */ | |
| .modal-overlay { | |
| position: fixed; | |
| top: 0; | |
| left: 0; | |
| width: 100%; | |
| height: 100%; | |
| background: rgba(0, 0, 0, 0.8); | |
| backdrop-filter: blur(8px); | |
| z-index: 1000; | |
| display: none; /* Hidden by default */ | |
| align-items: center; | |
| justify-content: center; | |
| opacity: 0; | |
| transition: opacity 0.3s ease; | |
| } | |
| .modal-overlay.active { | |
| display: flex; | |
| opacity: 1; | |
| } | |
| .app-window { | |
| width: 90%; | |
| max-width: 800px; | |
| height: 70vh; | |
| background: #1e293b; | |
| border-radius: 12px; | |
| border: 1px solid var(--glass-border); | |
| box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); | |
| display: flex; | |
| flex-direction: column; | |
| animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1); | |
| } | |
| @keyframes slideUp { | |
| from { transform: translateY(50px); opacity: 0; } | |
| to { transform: translateY(0); opacity: 1; } | |
| } | |
| .window-header { | |
| padding: 20px; | |
| border-bottom: 1px solid var(--glass-border); | |
| display: flex; | |
| justify-content: space-between; | |
| align-items: center; | |
| background: #0f172a; | |
| border-radius: 12px 12px 0 0; | |
| } | |
| .window-title { | |
| font-weight: 600; | |
| display: flex; | |
| align-items: center; | |
| gap: 10px; | |
| } | |
| .window-controls { | |
| display: flex; | |
| gap: 10px; | |
| } | |
| .control-dot { | |
| width: 12px; | |
| height: 12px; | |
| border-radius: 50%; | |
| } | |
| .close-dot { background: var(--danger); } | |
| .min-dot { background: var(--success); } | |
| .max-dot { background: var(--primary-color); } | |
| .window-content { | |
| flex: 1; | |
| padding: 40px; | |
| overflow-y: auto; | |
| text-align: center; | |
| } | |
| .placeholder-content { | |
| animation: fadeIn 1s ease; | |
| } | |
| @keyframes fadeIn { | |
| from { opacity: 0; } | |
| to { opacity: 1; } | |
| } | |
| .console-log { | |
| font-family: 'Courier New', Courier, monospace; | |
| background: #000; | |
| padding: 20px; | |
| border-radius: 8px; | |
| text-align: left; | |
| margin-top: 20px; | |
| color: #10b981; | |
| border: 1px solid #10b981; | |
| } | |
| .close-btn { | |
| background: transparent; | |
| border: none; | |
| color: var(--text-muted); | |
| font-size: 1.5rem; | |
| cursor: pointer; | |
| transition: color 0.2s; | |
| } | |
| .close-btn:hover { color: var(--text-main); } | |
| /* Responsive Design */ | |
| @media (max-width: 768px) { | |
| h1 { font-size: 2rem; } | |
| .apps-grid { grid-template-columns: 1fr; } | |
| main { padding: 20px; } | |
| } | |
| /* Footer Credit */ | |
| .footer-credit { | |
| text-align: center; | |
| padding: 20px; | |
| color: var(--text-muted); | |
| font-size: 0.85rem; | |
| border-top: 1px solid var(--glass-border); | |
| } | |
| .footer-credit a { | |
| color: var(--primary-color); | |
| text-decoration: none; | |
| font-weight: 600; | |
| } | |
| .footer-credit a:hover { | |
| text-decoration: underline; | |
| } | |
| </style> | |
| </head> | |
| <body> | |
| <!-- Header --> | |
| <header> | |
| <div class="logo"> | |
| <i class="fa-solid fa-rocket"></i> | |
| <span>Nexus Launcher</span> | |
| </div> | |
| <nav class="top-nav"> | |
| <a href="#" class="nav-link" onclick="launchApp('Dashboard')">Dashboard</a> | |
| <a href="#" class="nav-link" onclick="launchApp('Settings')">Settings</a> | |
| <a href="#" class="nav-link" target="_blank" rel="noopener">Help</a> | |
| <button class="btn btn-primary" onclick="launchApp('Terminal')"> | |
| <i class="fa-solid fa-terminal"></i> Launch App | |
| </button> | |
| </nav> | |
| </header> | |
| <!-- Main Content --> | |
| <main> | |
| <section class="welcome-section"> | |
| <h1>Welcome to the Digital Workspace</h1> | |
| <p class="subtitle">Select an application from the grid below to launch it. This interface demonstrates a modern, responsive web application architecture built with pure HTML, CSS, and JavaScript.</p> | |
| </section> | |
| <div class="apps-grid"> | |
| <!-- App Card 1: Dashboard --> | |
| <div class="app-card" onclick="launchApp('Analytics Dashboard')"> | |
| <div class="launch-badge"><i class="fa-solid fa-play"></i> Launch</div> | |
| <div class="app-icon"> | |
| <i class="fa-solid fa-chart-pie"></i> | |
| </div> | |
| <div class="app-title">Analytics Dashboard</div> | |
| <div class="app-desc">Visualize your data with interactive charts and real-time statistics. Perfect for monitoring project progress.</div> | |
| </div> | |
| <!-- App Card 2: Terminal --> | |
| <div class="app-card" onclick="launchApp('System Terminal')"> | |
| <div class="launch-badge"><i class="fa-solid fa-play"></i> Launch</div> | |
| <div class="app-icon"> | |
| <i class="fa-solid fa-terminal"></i> | |
| </div> | |
| <div class="app-title">System Terminal</div> | |
| <div class="app-desc">Access the command line interface directly in your browser. Run scripts, manage files, and configure settings.</div> | |
| </div> | |
| <!-- App Card 3: Media --> | |
| <div class="app-card" onclick="launchApp('Media Center')"> | |
| <div class="launch-badge"><i class="fa-solid fa-play"></i> Launch</div> | |
| <div class="app-icon"> | |
| <i class="fa-solid fa-film"></i> | |
| </div> | |
| <div class="app-title">Media Center</div> | |
| <div class="app-desc">Stream videos, manage playlists, and organize your digital media library in one place.</div> | |
| </div> | |
| <!-- App Card 4: Chat --> | |
| <div class="app-card" onclick="launchApp('Secure Chat')"> | |
| <div class="launch-badge"><i class="fa-solid fa-play"></i> Launch</div> | |
| <div class="app-icon"> | |
| <i class="fa-solid fa-comments"></i> | |
| </div> | |
| <div class="app-title">Secure Chat</div> | |
| <div class="app-desc">End-to-end encrypted messaging workspace for teams and individuals.</div> | |
| </div> | |
| <!-- App Card 5: Code Editor --> | |
| <div class="app-card" onclick="launchApp('Code Editor')"> | |
| <div class="launch-badge"><i class="fa-solid fa-play"></i> Launch</div> | |
| <div class="app-icon"> | |
| <i class="fa-solid fa-code"></i> | |
| </div> | |
| <div class="app-title">Code Editor</div> | |
| <div class="app-desc">A lightweight, fast code editing environment with syntax highlighting support.</div> | |
| </div> | |
| <!-- App Card 6: Settings --> | |
| <div class="app-card" onclick="launchApp('System Settings')"> | |
| <div class="launch-badge"><i class="fa-solid fa-play"></i> Launch</div> | |
| <div class="app-icon"> | |
| <i class="fa-solid fa-gear"></i> | |
| </div> | |
| <div class="app-title">System Settings</div> | |
| <div class="app-desc">Customize your environment, manage user accounts, and adjust system preferences.</div> | |
| </div> | |
| </div> | |
| </main> | |
| <!-- Footer --> | |
| <div class="footer-credit"> | |
| Built with <a href="https://huggingface.co/spaces/akhaliq/anycoder" target="_blank">anycoder</a> | |
| </div> | |
| <!-- Application Modal --> | |
| <div class="modal-overlay" id="appModal" onclick="if(event.target === this) closeApp();"> | |
| <div class="app-window"> | |
| <div class="window-header"> | |
| <div class="window-title"> | |
| <i class="fa-solid fa-window-maximize"></i> | |
| <span id="modalTitle">Application</span> | |
| </div> | |
| <div class="window-controls"> | |
| <div class="control-dot min-dot" title="Minimize"></div> | |
| <div class="control-dot max-dot" title="Maximize"></div> | |
| <button class="close-btn" onclick="closeApp()" title="Close Application"> | |
| <i class="fa-solid fa-xmark"></i> | |
| </button> | |
| </div> | |
| </div> | |
| <div class="window-content"> | |
| <div class="placeholder-content"> | |
| <i class="fa-solid fa-rocket" style="font-size: 4rem; color: var(--primary-color); margin-bottom: 20px;"></i> | |
| <h2 id="modalTitleText" style="margin-bottom: 15px;">Application Launched</h2> | |
| <p id="modalText" style="color: var(--text-muted); max-width: 600px; margin: 0 auto 30px auto;"> | |
| You have successfully launched a simulated web application window. | |
| </p> | |
| <!-- Dynamic Content Area --> | |
| <div id="dynamicContent" style="text-align: left; margin-top: 20px;"> | |
| <p>System initialized...<br>Waiting for input...</p> | |
| </div> | |
| <div class="console-log" id="consoleOutput"> | |
| > Initializing environment...<br> | |
| > Loading assets...<br> | |
| > Ready. | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| </div> | |
| <script> | |
| </script> | |
| </body> | |
| </html> |