-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
203 lines (180 loc) · 8.02 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
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>KeaysXYZ Terminal</title>
<link rel="shortcut icon" href="favicon.ico">
<meta http-equiv="Content-Security-Policy" content="default-src 'self'; script-src 'self' https://cdn.jsdelivr.net; style-src 'self' https://cdn.jsdelivr.net 'unsafe-inline'; img-src 'self' https://raw.githubusercontent.com data:; connect-src 'self';">
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/tailwind.min.css" rel="stylesheet" integrity="sha384-HtMZLkYo+pR5/u7zCzXxMJP6QoNnQJt1qkHM0EaOPvGDIzaVZbmYr/TlvUZ/sKAg%" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/jquery.min.js" integrity="sha384-vtXRMe3mGCbOeY7l30aIg8H9p3GdeSe4IFlP6G8JMa7o7lXvnz3GFKzPxzJdPfGK%" crossorigin="anonymous"></script>
<style>
html, body {
height: 100%;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
}
body.terminal {
width: 100%;
height: 100%;
background-color: #000;
color: #00FF00;
font-family: 'IBM Plex Mono', monospace;
display: flex;
justify-content: center;
align-items: center;
}
.terminal-container {
display: flex;
justify-content: center;
align-items: center;
width: 100%;
height: 100%;
}
.terminal {
flex-grow: 1;
max-width: 100%;
max-height: 100%;
border: 2px solid #00FF00;
background-color: rgba(0, 0, 0, 0.8);
box-shadow: 0px 0px 20px #00FF00;
overflow: hidden;
display: flex;
flex-direction: column;
justify-content: space-between;
padding: 1rem;
}
@keyframes holographic-effect {
0% { transform: rotateX(10deg) rotateY(5deg); box-shadow: 0px 0px 20px #00FF00; }
100% { transform: rotateX(10deg) rotateY(-5deg); box-shadow: 0px 0px 30px #00FF00; }
}
#prompt-line {
display: inline-block;
animation: blink-caret 0.75s step-end infinite;
}
@keyframes blink-caret {
from, to { border-right-color: transparent; }
50% { border-right-color: #00FF00; }
}
.prompt {
display: flex;
width: 100%;
align-items: center;
}
#command-input {
flex-grow: 1;
background: transparent;
border: none;
color: #00FF00;
outline: none;
margin-left: 0.5rem;
}
</style>
</head>
<body class="terminal">
<!-- Terminal Container -->
<div class="terminal-container">
<div id="main-interface" class="terminal" style="display: none;">
<!-- Logo -->
<div class="flex justify-center mb-4">
<img height="60px" width="60px" src="https://raw.githubusercontent.com/berlintay/KeaysBootXYZ_WEB/3f293d49d66c1503145d8d5540ceafca4c1d4265/media/image-removebg-preview.png" alt="Logo">
</div>
<!-- Trending Repositories -->
<div id="trending-container" class="mb-6">
<h2 class="text-white">Trending Repositories</h2>
<div id="trending-repos" class="text-gray-300"></div>
</div>
<div>
<a href="https://github.com/berlintay/KeaysXYZ">
<button>LINKS </button>
</a>
</div>
<!-- Command Prompt -->
<div id="terminal-output" class="mb-4">
<!-- Dynamic content will be inserted here -->
</div>
<div class="prompt">
<span id="prompt-line">𓅓 ⊸⊸⊶≻</span>
<input type="text" id="command-input" autofocus aria-label="Command input">
</div>
</div>
</div>
<!-- Script with your old logic integrated -->
<script>
document.addEventListener("DOMContentLoaded", function() {
const mainInterface = document.getElementById('main-interface');
mainInterface.style.display = 'block';
fetch('./trending_repos.json')
.then(response => response.json())
.then(data => {
const trendingContainer = document.getElementById('trending-repos');
trendingContainer.innerHTML = ''; // Clear existing content
data.forEach(repo => {
const repoElement = document.createElement('div');
repoElement.classList.add('repo');
repoElement.innerHTML = `
<h3>${repo.organization} / ${repo.repository}</h3>
<p>${repo.description}</p>
`;
trendingContainer.appendChild(repoElement);
});
})
.catch(error => console.error('Error fetching trending data:', error));
// Terminal command handling logic
document.getElementById('command-input').addEventListener('keypress', function(event) {
if (event.key === 'Enter') {
const command = event.target.value.trim();
processCommand(command);
event.target.value = ''; // Clear the input after processing
}
});
// Function to process terminal commands
function processCommand(command) {
switch (command) {
case 'help':
appendToTerminal("Commands available: about, services, portfolio, contact, clear");
break;
case 'about':
appendToTerminal("<p>I am a self-taught, freelance, anytime any place Developer. If I don't know it, I will learn & fix it.</p>", true);
break;
case 'services':
appendToTerminal("What can I do for you?");
appendToTerminal("<ul><li>Pretty much anything you can think of</li><li>To an extent 😂</li><li>UI/UX Design</li><li>E-commerce Solutions</li><li>Need a whole setup for a website/business idea? That too.</li></ul>", true);
break;
case 'portfolio':
appendToTerminal("<p>You can check out my Github: <a href='https://github.com/berlintay' target='_blank'>https://github.com/berlintay</a></p>", true);
break;
case 'contact':
appendToTerminal('Contact me?!😫');
appendToTerminal("<ul><li>Email: [email protected]</li><li>Cell: (506) 790-5712</li></ul>", true);
break;
case 'clear':
clearTerminal();
break;
default:
appendToTerminal("Unknown command. Type 'help' for a list of available commands.");
break;
}
}
function appendToTerminal(content, isHtml = false) {
const terminal = document.getElementById('terminal-output');
const output = document.createElement('div');
if (isHtml) {
output.innerHTML = content;
} else {
output.textContent = content;
}
terminal.appendChild(output);
}
function clearTerminal() {
const terminal = document.getElementById('terminal-output');
terminal.innerHTML = '';
}
appendToTerminal("Hello, Friend 🤲🧿");
});
</script>
</body>
</html>