syntaxis/core/index.html
Jesús Pérez 9cef9b8d57 refactor: consolidate configuration directories
Merge _configs/ into config/ for single configuration directory.
Update all path references.

Changes:
- Move _configs/* to config/
- Update .gitignore for new patterns
- No code references to _configs/ found

Impact: -1 root directory (layout_conventions.md compliance)
2025-12-26 18:36:23 +00:00

90 lines
3.1 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta
name="description"
content="Syntaxis - Real-time project management dashboard"
/>
<title>Syntaxis Dashboard</title>
<link rel="stylesheet" href="/styles/app.css" />
<style>
/* Minimal base styles while CSS loads */
body {
margin: 0;
font-family:
-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
Oxygen, Ubuntu, Cantarell, sans-serif;
}
#app {
min-height: 100vh;
}
/* Loading state */
.loading-screen {
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
font-size: 1.2rem;
color: #666;
}
</style>
</head>
<body>
<div id="app">
<div class="loading-screen">
<div>Loading Syntaxis Dashboard...</div>
</div>
</div>
<!-- Runtime configuration for API client -->
<script>
// Configure API endpoint at runtime
// This allows the same WASM binary to be deployed in different environments
// without needing to rebuild
window.SYNTAXIS_CONFIG = {
// API base URL: auto-detect from current origin (same-origin by default)
// Can be overridden via URL parameter: ?apiUrl=http://custom-api:3000
apiUrl: (new URLSearchParams(window.location.search).get('apiUrl')
|| window.location.origin),
// API path prefix (default: /api)
apiPath: '/api',
// Additional config can be added here as needed
};
console.log("Syntaxis Dashboard config:", window.SYNTAXIS_CONFIG);
</script>
<script type="module">
import init, { hydrate } from "/pkg/dashboard_client.js";
async function run() {
try {
// Initialize the WASM module
await init();
// Mount the Leptos app
hydrate();
console.log("Dashboard initialized successfully");
} catch (error) {
console.error("Failed to initialize dashboard:", error);
document.getElementById("app").innerHTML = `
<div style="padding: 2rem; text-align: center;">
<h1 style="color: #e53e3e;">Failed to Load Dashboard</h1>
<p style="color: #666;">Please refresh the page or contact support if the problem persists.</p>
<pre style="text-align: left; background: #f7fafc; padding: 1rem; border-radius: 0.5rem; overflow: auto;">${error}</pre>
</div>
`;
}
}
run();
</script>
</body>
</html>