-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
181 lines (170 loc) · 5.72 KB
/
index.html
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="author" content="Obel">
<title>C64</title>
<meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" />
<meta name="keywords" content="C64" />
<meta name="description" content="C64 - Website" />
<link rel="stylesheet" href="css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<style>
/* Estilos CSS existentes aqui */
.modalDialog {
position: fixed;
font-family: Arial, Helvetica, sans-serif;
top: -70px;
right: 0;
bottom: 0;
left: 0;
background: rgba(0,0,0,0.8);
z-index: 99999;
opacity:0;
-webkit-transition: opacity 400ms ease-in;
-moz-transition: opacity 400ms ease-in;
transition: opacity 400ms ease-in;
pointer-events: none;
}
.modalDialog:target {
opacity:1;
pointer-events: auto;
}
.modalDialog > div {
width: 800px;
position: relative;
margin: 10% auto;
padding: 5px 20px 13px 20px;
border-radius: 10px;
background: #fff;
background: -moz-linear-gradient(#fff, #999);
background: -webkit-linear-gradient(#fff, #999);
background: -o-linear-gradient(#fff, #999);
font-family: 'Press Start 2P', 'Helvetica Neue', Arial, sans-serif;
font-size:10px;
}
.close {
background: #606061;
color: #FFFFFF;
line-height: 25px;
position: absolute;
right: -12px;
text-align: center;
top: -10px;
width: 24px;
text-decoration: none;
font-weight: bold;
-webkit-border-radius: 12px;
-moz-border-radius: 12px;
border-radius: 12px;
-moz-box-shadow: 1px 1px 3px #000;
-webkit-box-shadow: 1px 1px 3px #000;
box-shadow: 1px 1px 3px #000;
}
.close:hover { background: #00d9ff; }
body {
font-family: 'Press Start 2P', 'Helvetica Neue', Arial, sans-serif;
webkit-tap-highlight-color: #222;
background-color:#5f53fe;
}
.cent {
position:absolute;
top:15%;
left:15%;
margin-top:-50px; /* this is half the height of your div*/
margin-left:-100px; /*this is half of width of your div*/
background-color:#211bae;
color:#5f53fe;
width:80%;
height:80%;
}
p {
display: inline-block;
vertical-align: middle;
}
h1 {
font-size:18px !important;
text-align: center;
}
.pre {
position: relative;
overflow-y: auto;
max-height: 300px; /* Defina uma altura máxima para o terminal */
}
.pre::after {
content: '';
position: absolute;
top: 0;
right: 0;
width: 6px;
height: 14px;
background-color: #feff00;
animation: blink 0.7s step-end infinite;
}
@keyframes blink {
50% {
background-color: transparent;
}
}
</style>
<link href="css/css.css" rel="stylesheet">
<link href="css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link href='css/Open-Sans-font.min.css' rel='stylesheet' type='text/css'>
<link href='css/Merriweather-font.min.css' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="cent">
<pre>
**** COMMODORE 64 BASIC V2 ****
64K RAM SYSTEM 38911 BASIC BYTES FREE
READY.
</pre>
</div>
<div id="toolbar" class="toolbar">
<div id="openModal" class="modalDialog">
<div>
<!-- Conteúdo existente aqui -->
</div>
</div>
</div>
<script>
// Capturar o elemento de entrada de texto
const inputElement = document.createElement('input');
inputElement.type = 'text';
inputElement.style.width = '100%';
inputElement.style.border = 'none';
inputElement.style.background = 'transparent';
inputElement.style.color = '#feff00';
inputElement.style.outline = 'none';
// Capturar o elemento de saída do terminal
const outputElement = document.createElement('pre');
outputElement.classList.add('pre');
outputElement.style.color = '#feff00';
// Adicionar elementos ao DOM
const centElement = document.querySelector('.cent');
centElement.appendChild(inputElement);
centElement.appendChild(outputElement);
// Função para processar o comando do usuário
function processCommand(command) {
// Lógica de processamento do comando aqui
// Exemplo: exibir a mensagem de comando inválido
const output = `Comando inválido: ${command}`;
outputElement.textContent += output + '\n';
}
// Manipulador de eventos para capturar a entrada do usuário
inputElement.addEventListener('keydown', function(event) {
if (event.key === 'Enter') {
const command = inputElement.value;
inputElement.value = '';
const output = `> ${command}`;
outputElement.textContent += output + '\n';
processCommand(command);
outputElement.scrollTop = outputElement.scrollHeight; // Deslocar para baixo a cada nova entrada de comando
}
});
// Focar no campo de entrada ao carregar a página
inputElement.focus();
</script>
</body>
</html>