moondream3-preview / index.html
Siranjeevi029's picture
Upload folder using huggingface_hub
ff488d3 verified
<!DOCTYPE html>
<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>
// --- JavaScript Logic ---
// Select DOM elements
const modal = document.getElementById('appModal');
const modalTitle = document.getElementById('modalTitle');
const modalTitleText = document.getElementById('modalTitleText');
const modalText = document.getElementById('modalText');
const dynamicContent = document.getElementById('dynamicContent');
const consoleOutput = document.getElementById('consoleOutput');
// Function to launch an application
function launchApp(appName) {
// 1. Show the modal
modal.classList.add('active');
// 2. Update content based on the app name
modalTitleText.innerText = appName;
modalTitle.innerText = `${appName} - Active`;
// 3. Simulate different behaviors for different apps
let contentHTML = '';
let logMessages = [];
switch(appName) {
case 'System Terminal':
case 'Code Editor':
contentHTML = `
<div style="background: #000; padding: 15px; border-radius: 8px; font-family: monospace; color: #fff;">
<p><span style="color: #10b981;">user@nexus:~$</span> ls -la</p>
<p>drwxr-xr-x 12 user staff 384 Jan 10 10:00 .</p>
<p>drwxr-xr-x 5 user staff 160 Jan 9 14:30 ..</p>
<p>-rw-r--r-- 1 user staff 1024 Jan 10 10:01 index.html</p>
<p>-rw-r--r-- 1 user staff 2048 Jan 10 10:02 style.css</p>
<p><span style="color: #10b981;">user@nexus:~$</span> ./launch_app.sh</p>
<p style="color: #6366f1;">> Application "${appName}" started successfully.</p>
</div>`;
logMessages = [
"> Mounting virtual drive...",
"> Checking permissions...",
"> Loading binary assets...",
"> GUI renderer initialized."
];
break;
case 'Analytics Dashboard':
contentHTML = `
<div style="display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px;">
<div style="background: rgba(255,255,255,0.05); padding: 20px; border-radius: 8px; border-left: 4px solid var(--primary-color);">
<h3>Total Users</h3>
<h1 style="color: var(--success);">12,450</h1>
<small style="color: var(--success);">+12% this week</small>
</div>
<div style="background: rgba(255,255,255,0.05); padding: 20px; border-radius: 8px; border-left: 4px solid var(--danger);">
<h3>System Load</h3>
<h1 style="color: var(--danger);">45%</h1>
<small style="color: var(--text-muted);">Optimal Performance</small>
</div>
</div>
<div style="background: rgba(255,255,255,0.05); padding: 20px; border-radius: 8px; height: 150px; display: flex; align-items: center; justify-content: center; color: var(--text-muted);">
[Chart Visualization Placeholder]
</div>`;
logMessages = [
"> Connecting to database...",
"> Fetching metrics...",
"> Rendering visualization...",
"> Dashboard updated."
];
break;
case 'Media Center':
contentHTML = `
<div style="background: #000; width: 100%; max-width: 500px; aspect-ratio: 16/9; margin: 0 auto; border-radius: 8px; display: flex; align-items: center; justify-content: center; position: relative;">
<i class="fa-solid fa-play" style="font-size: 4rem; color: white; opacity: 0.8;"></i>
<div style="position: absolute; bottom: 20px; left: 20px; right: 20px; background: linear-gradient(to top, black, transparent); padding: 20px;">
<h3 style="margin-bottom: 5px;">Sample Video Stream</h3>
<p style="color: #aaa;">Duration: 04:20 | Quality: 1080p</p>
</div>
</div>`;
logMessages = [
"> Loading media decoder...",
"> Scanning local library...",
"> Playlist loaded (3 items).",
"> Ready to play."
];
break;
case 'Secure Chat':
contentHTML = `
<div style="background: rgba(255,255,255,0.05); border-radius: 8px; padding: 20px; height: 200px; overflow-y: auto; text-align: left;">
<div style="margin-bottom: 10px;">
<span style="color: var(--primary-color); font-weight: bold;">System:</span> Welcome to the secure channel.
</div>
<div style="margin-bottom: 10px; text-align: right;">
<span style="background: var(--primary-color); padding: 8px 12px; border-radius: 12px; color: white; display: inline-block;">Hello World!</span>
</div>
<div style="margin-bottom: 10px;">
<span style="color: var(--success); font-weight: bold;">User_01:</span> Is the connection encrypted?
</div>
<div style="margin-bottom: 10px;">
<span style="color: var(--primary-color); font-weight: bold;">System:</span> <i class="fa-solid fa-lock"></i> Yes, end-to-end encryption active.
</div>
</div>`;
logMessages = [
"> Establishing secure handshake...",
"> Verifying certificates...",
"> Channel encrypted (AES-256).",
"> Connected to server."
];
break;
default: // Settings and others
contentHTML = `
<div style="display: grid; grid-template-columns: 200px 1fr; gap: 20px;">
<div style="background: rgba(255,255,255,0.05); border-radius: 8px; padding: 10px;">
<div style="padding: 10px; background: var(--primary-color); border-radius: 4px; margin-bottom: 5px;">General</div>
<div style="padding: 10px; color: var(--text-muted);">Network</div>
<div style="padding: 10px; color: var(--text-muted);">Security</div>
</div>
<div style="background: rgba(255,255,255,0.05); border-radius: 8px; padding: 20px; min-height: 150px;">
<h3>General Settings</h3>
<p style="margin-top: 10px; color: var(--text-muted);">Adjust your preferences here.</p>
<label style="display: flex; align-items: center; gap: 10px; margin-top: 20px; cursor: pointer;">
<input type="checkbox" checked> Enable Notifications
</label>
<label style="display: flex; align-items: center; gap: 10px; margin-top: 10px; cursor: pointer;">
<input type="checkbox"> Dark Mode
</label>
</div>
</div>`;
logMessages = [
"> Loading configuration files...",
"> Checking for updates...",
"> User profile loaded.",
"> Settings ready."
];
}
dynamicContent.innerHTML = contentHTML;
// Simulate console log animation
consoleOutput.innerHTML = '';
logMessages.forEach((msg, index) => {
setTimeout(() => {
consoleOutput.innerHTML += msg + '<br>';
// Auto scroll to bottom of console
const consoleDiv = document.getElementById('consoleOutput');
consoleDiv.scrollTop = consoleDiv.scrollHeight;
}, index * 400 + 200);
});
}
// Function to close the application
function closeApp() {
modal.classList.remove('active');
// Optional: Clear console when closing
setTimeout(() => {
consoleOutput.innerHTML = '';
}, 300);
}
// Initialize with a welcome message in console
window.onload = () => {
consoleOutput.innerHTML = "> System boot complete.<br>> Welcome to Nexus Launcher.<br>> Waiting for user input...";
};
</script>
</body>
</html>