Files
ai.interactive.fiction/public/index.html

193 lines
6.0 KiB
HTML

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>AI Interactive Fiction</title>
<link rel="preload" href="/fonts/EBGaramond12-Regular.otf" as="font" type="font/otf" crossorigin>
<link rel="preload" href="/fonts/EBGaramond12-Italic.otf" as="font" type="font/otf" crossorigin>
<link rel="icon" href="/favicon.ico" type="image/x-icon">
<style>
@font-face {
font-family: 'EB Garamond';
src: url('/fonts/EBGaramond12-Regular.otf') format('opentype');
font-weight: normal;
font-style: normal;
font-display: swap;
}
@font-face {
font-family: 'EB Garamond';
src: url('/fonts/EBGaramond12-Italic.otf') format('opentype');
font-weight: normal;
font-style: italic;
font-display: swap;
}
body {
margin: 0;
padding: 0;
background-color: #000;
}
.loading-overlay {
font-family: 'EB Garamond', serif;
color: #fff;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.85);
display: flex;
justify-content: center;
align-items: center;
z-index: 9999;
transition: opacity 0.5s ease-out;
}
.loading-content {
width: 80%;
max-width: 500px;
text-align: center;
}
.loading-bar {
width: 100%;
height: 24px;
background: #333;
border-radius: 12px;
overflow: hidden;
position: relative;
margin-top: 20px;
}
.loading-progress {
width: 0%;
height: 100%;
background: #4CAF50;
transition: width 0.3s ease-in-out;
}
.loading-text {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
display: flex;
justify-content: center;
align-items: center;
color: #fff;
font-weight: bold;
}
#modules-list {
list-style-type: none;
padding: 0;
margin-top: 20px;
max-height: 300px; /* Increased height */
overflow: hidden; /* Hide scrollbar */
width: 100%;
}
.module-item {
display: grid;
grid-template-columns: 1fr auto 1fr;
margin-bottom: 8px;
color: #ccc;
position: relative;
width: 100%;
}
.module-name {
text-align: left;
padding-right: 10px;
grid-column: 1;
}
.module-status {
text-align: center;
font-size: 12px;
grid-column: 2;
min-width: 80px; /* Ensure status has minimum width */
padding: 0 10px;
}
.module-status-detail {
grid-column: 3;
text-align: right;
font-size: 11px;
color: #aaa;
font-style: italic;
padding-left: 10px;
}
.status-pending {
color: #ccc;
}
.status-loading {
color: #FFC107;
}
.status-waiting {
color: #FF9800;
}
.status-initializing {
color: #2196F3;
}
.status-finished {
color: #4CAF50;
}
.status-error {
color: #F44336;
}
/* Update loader module list scrolling */
.loading-overlay #modules-list {
list-style-type: none;
padding: 0;
margin-top: 20px;
max-height: 300px;
overflow-y: auto; /* Enable vertical scrolling */
width: 100%;
scrollbar-width: thin;
scrollbar-color: #555 #333;
}
.loading-overlay #modules-list::-webkit-scrollbar {
width: 8px;
}
.loading-overlay #modules-list::-webkit-scrollbar-track {
background: #333;
}
.loading-overlay #modules-list::-webkit-scrollbar-thumb {
background-color: #555;
border-radius: 4px;
}
</style>
</head>
<body>
<!-- Debug output area -->
<div id="debug-output" style="position:fixed; bottom:10px; left:10px; background:rgba(0,0,0,0.7); color:white; padding:10px; border-radius:5px; font-family:monospace; max-width:80%; max-height:200px; overflow:auto; z-index:10000; display:none;">
<div id="debug-content"></div>
</div>
<script>
// Set up error tracking
window.addEventListener('error', function(event) {
const debugOutput = document.getElementById('debug-output');
const debugContent = document.getElementById('debug-content');
if (debugOutput && debugContent) {
debugOutput.style.display = 'block';
const errorMsg = document.createElement('div');
errorMsg.style.color = '#ff6b6b';
errorMsg.textContent = `ERROR: ${event.message} at ${event.filename}:${event.lineno}`;
debugContent.appendChild(errorMsg);
}
console.error(event);
});
// Debug logger
window.debugLog = function(message) {
const debugOutput = document.getElementById('debug-output');
const debugContent = document.getElementById('debug-content');
if (debugOutput && debugContent) {
debugOutput.style.display = 'block';
const logMsg = document.createElement('div');
logMsg.textContent = message;
debugContent.appendChild(logMsg);
}
console.log(message);
};
</script>
<script type="module" src="/js/loader.js"></script>
</body>
</html>