File size: 1,621 Bytes
de6f895
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
document.addEventListener('DOMContentLoaded', function() {
    // Initialize terminal typing effect
    const terminalLines = document.querySelectorAll('.terminal-boot');
    
    terminalLines.forEach((line, index) => {
        line.style.opacity = '0';
        line.style.animationDelay = `${index * 0.2}s`;
        line.classList.add('terminal-boot');
    });
    
    // Handle console input
    const consoleInput = document.querySelector('input');
    if (consoleInput) {
        consoleInput.addEventListener('keypress', function(e) {
            if (e.key === 'Enter') {
                const command = this.value.toLowerCase();
                handleCommand(command);
                this.value = '';
            }
        });
    }
    
    // Command handler
    function handleCommand(command) {
        switch(command) {
            case 'help':
                alert('Available commands: about, chapters, status, clear');
                break;
            case 'about':
                alert('Quantum Consciousness Terminal v1.0\nAn interface to reality\'s source code');
                break;
            case 'chapters':
                alert('Navigate to chapters using the links above');
                break;
            case 'status':
                alert('System operational\nReality rendering at 60fps');
                break;
            case 'clear':
                alert('Terminal cleared (just kidding, this is a static interface)');
                break;
            default:
                alert(`Command not found: ${command}\nType "help" for available commands`);
        }
    }
});