-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
202 lines (181 loc) · 6.42 KB
/
index.html
File metadata and controls
202 lines (181 loc) · 6.42 KB
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Terminal Portfolio</title>
<style>
body {
margin: 0;
background: #309898;
color: #FF9F00;
font-family: monospace;
height: 100vh;
display: flex;
overflow: hidden;
}
#terminal-container {
flex: 1.8;
padding: 1rem;
overflow-y: auto;
white-space: pre-wrap;
}
#ascii-art {
flex: 1.2;
padding: 1rem;
overflow-y: auto;
color: #FF9F00;
white-space: pre;
}
.input-line {
display: flex;
}
.prompt {
margin-right: 0.5rem;
}
.blinking-cursor {
animation: blink 1s step-end infinite;
}
@keyframes blink {
50% {
opacity: 0;
}
}
input {
background: transparent;
border: none;
color: #F4631E;
font: inherit;
outline: none;
width: 100%;
}
</style>
</head>
<body>
<div id="terminal-container">
<div id="terminal"></div>
</div>
<div id="ascii-art">
<pre>
@@@@@
%%##*************##%%
@%@@ %##*****##****#***********#%
@#*****##********#**-:=*#**********#%@
@#***#********###***=:=*#*******#%
###**********++******#*#*****#%
%#*********+. .:*************##%
%*-=******=. =***************#
%*..*****+ . :*****************%
#+..****+ .*+ :******************#
@+..##*=. -=# =*******************@
+..#= +@# :*************=. .#**#
@:.=: :%:.************=. :+###%@
@#=%@#+=::.....--::::=*+==**+..:#@
@@#+-::::::::::::=-:=* .-. :**#
+:::::::::::--:::*+..--: .-**##
@=-:::::::::::=*+ .:=.:..:+**#
%##=:==*=---**=#** .:-. .=**#
@=:::==-:::::::=-:=*---..:.-.:#**#
#::-%#-:::::::::=::+. ::...+- @#%
+:-#=::::::::::+-::-...:-#%
=:*:.:::::::::::**--+%%#**##
=.. .-::::::::****# %%%
@: .:+==::=+***###
%.:... .-#***##*#**%
=.:....=+%**# #**@@%*%
#.=+++--=**=+#**@
@*+:. =**#***#@
@**=. +%#*#%%- :+
#**=. .:... .*
#*+==:-::: .=
=. :*+:.:**#*++*#
+=******. :+******@
%*********+ .=******#
%************- :******#
##********###+:-*#%%
</pre>
</div>
<script>
const terminal = document.getElementById("terminal");
const prompt = "hashir@portfolio:~$";
const commands = {
help: `Available commands: about, skills, projects, social, clear`,
about: `Hi, I'm Hashir — a .NET developer passionate about building scalable web APIs and backend systems and exploring my more creative side through novel front-end solutions.
I love tackling new technologies and challenges as I make my own journey through the digital world.`,
skills: `C#, ASP.NET Core, Entity Framework, SQL, Azure, Git`,
projects: `1. E-Commerce API (.NET 8 + EF Core)
2. Microservice Sample App (gRPC, RabbitMQ)
3. Clean Architecture Template`,
social: `GitHub: https://github.com/Hashir-K
LinkedIn: https://www.linkedin.com/in/hashir-k-0a75261b7
Medium: https://medium.com/@hashirkhanps`,
clear: "__clear__"
};
function appendLine(text = "") {
const line = document.createElement("div");
line.textContent = text;
terminal.appendChild(line);
}
function newPrompt() {
const inputLine = document.createElement("div");
inputLine.classList.add("input-line");
const label = document.createElement("span");
label.textContent = prompt;
label.classList.add("prompt");
const input = document.createElement("input");
input.autofocus = true;
inputLine.appendChild(label);
inputLine.appendChild(input);
terminal.appendChild(inputLine);
input.focus();
input.addEventListener("keydown", (e) => {
if (e.key === "Enter") {
const value = input.value.trim();
input.disabled = true;
handleCommand(value);
}
});
terminal.scrollTop = terminal.scrollHeight;
}
function typeLine(text = "", callback, delay = 20) {
let i = 0;
const line = document.createElement("div");
terminal.appendChild(line);
function type() {
if (i < text.length) {
line.textContent += text.charAt(i);
i++;
setTimeout(type, delay);
} else if (callback) {
callback();
}
}
type();
}
function handleCommand(cmd) {
typeLine();
if (commands[cmd]) {
if (commands[cmd] === "__clear__") {
terminal.innerHTML = "";
} else {
typeLine(commands[cmd]);
}
} else {
typeLine(`Command not found: ${cmd}`);
}
newPrompt();
}
appendLine(`.-----------------------------------------------------------------------------------------------------------------.
| __ __ ___ _______. __ __ __ .______ __ ___ __ __ ___ .__ __.|
|| | | | / \\ / || | | | | | | _ \\ | |/ / | | | | / \\ | \\ | ||
|| |__| | / ^ \\ | (----\`| |__| | | | | |_) | | ' / | |__| | / ^ \\ | \\| ||
|| __ | / /_\\ \\ \\ \\ | __ | | | | / | < | __ | / /_\\ \\ | . \` ||
|| | | | / _____ \\ .----) | | | | | | | | |\\ \\----. | . \\ | | | | / _____ \\ | |\\ ||
||__| |__| /__/ \\__\\ |_______/ |__| |__| |__| | _| \`._____| |__|\\__\\ |__| |__| /__/ \\__\\ |__| \\__||
'-----------------------------------------------------------------------------------------------------------------'\n`);
typeLine("Welcome to Hashir's Terminal Portfolio");
typeLine("Type 'help' to see available commands.\n");
newPrompt();
</script>
</body>
</html>