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

304 lines
10 KiB
HTML

<!DOCTYPE html>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title></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;
font-family: 'EB Garamond', serif;
color: rgba(0, 0, 0, 0.9);
overflow: hidden;
height: 100%;
display: flex;
align-items: center;
justify-content: center;
}
html {
height: 100%;
margin: 0;
font-family: 'EB Garamond', sans-serif;
font-feature-settings: 'kern' on, 'liga' on, 'onum' on, 'dlig' on, 'clig' on, 'calt' on, 'hlig' off, 'swsh' on, 'locl' off;
-webkit-font-smoothing: antialiased;
}
.loading-overlay {
font-family: 'EB Garamond', serif;
color: #fff;
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: #000;
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: 40px;
width: 100%;
overflow: visible;
}
.module-name, .module-status, .module-status-detail {
font-size: 14px !important;
line-height: 24px !important;
}
.module-status {
text-align: center !important;
font-size: 14px !important;
grid-column: 2 !important;
min-width: 80px !important;
padding: 0 10px !important;
position: relative !important;
z-index: 1 !important;
}
.module-item::before {
content: "";
position: absolute;
top: 0;
left: 0;
height: 100%;
width: var(--progress-width, 0%);
background: rgba(76, 175, 80, 0.15);
transition: width 0.3s ease-in-out;
z-index: 0;
pointer-events: none;
border-radius: 4px;
}
/* Fallback for browsers without CSS variable support */
.module-item[data-progress] {
position: relative;
}
.module-name {
text-align: left;
padding-right: 10px;
grid-column: 1;
position: relative;
z-index: 1;
}
.module-status-detail {
grid-column: 3;
text-align: right;
font-size: 11px;
color: #aaa;
font-style: italic;
padding-left: 10px;
position: relative;
z-index: 1;
}
.status-pending {
color: #ccc;
}
.status-loading {
color: #07ffe6;
}
.status-fetching {
color: #ff00dd;
}
.status-waiting {
color: #FF9800;
}
.status-initializing {
color: #2196F3;
}
.status-finished {
color: #4CAF50;
}
.status-error {
color: #F44336;
}
/* Module fade animations */
@keyframes fadeInModule {
0% { opacity: 0; transform: translateY(5px); }
100% { opacity: 1; transform: translateY(0); }
}
@keyframes fadeOutModule {
0% { opacity: 1; max-height: 24px; margin-bottom: 8px; transform: translateY(0); }
60% { opacity: 0; max-height: 24px; margin-bottom: 8px; transform: translateY(-3px); }
100% { opacity: 0; max-height: 0; margin-bottom: 0; padding-top: 0; padding-bottom: 0; transform: translateY(-3px); }
}
.module-item {
display: grid !important;
grid-template-columns: 1fr auto 1fr !important;
margin-bottom: 8px !important;
color: #ccc !important;
position: relative !important;
width: 100% !important;
height: 24px;
max-height: 24px;
line-height: 24px;
overflow: hidden !important;
font-size: 14px !important;
animation: fadeInModule 0.5s ease-in-out forwards !important;
transition: max-height 0.5s ease-in-out, margin-bottom 0.5s ease-in-out, opacity 0.5s ease-in-out !important;
}
.module-finished {
animation: fadeOutModule 1.5s ease-in-out forwards !important;
animation-delay: 1s !important; /* Shorter delay so you can see it happen */
}
/* Update loader module list scrolling */
.loading-overlay #modules-list {
list-style-type: none;
padding: 0;
margin-top: 20px;
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;
}
/* Add scrollbar styles from main CSS */
/* ===== Scrollbar CSS ===== */
/* Firefox */
* {
scrollbar-width: auto;
scrollbar-color: #000000 rgba(255,255,255,0);
}
/* Chrome, Edge, and Safari */
*::-webkit-scrollbar {
width: calc(1rem/4);
}
*::-webkit-scrollbar-track {
background: rgba(255,255,255,0);
}
*::-webkit-scrollbar-thumb {
background-color: #000000;
border-radius: 10px;
border: 1px none rgba(255,255,255,0);
}
</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>
// Redefine console.log to expose browser logs to model
const originalLog = console.log;
console.log = function(...args) {
if (typeof debug !== 'undefined' && debug) {
const debugContent = document.getElementById('debug-content');
if (debugContent) {
const logMsg = document.createElement('div');
// Convert all arguments to string and join them
logMsg.textContent = args.map(arg =>
typeof arg === 'object' ? JSON.stringify(arg) : String(arg)
).join(' ');
debugContent.appendChild(logMsg);
}
}
// Pass all arguments to the original console.log
originalLog.apply(console, args);
};
</script>
<script type="module" src="/js/loader.js?v=20260516-scroll-window"></script>
</body>
</html>