Skip to content

Commit 5de87d9

Browse files
authored
First commit
1 parent b6de846 commit 5de87d9

File tree

3 files changed

+129
-0
lines changed

3 files changed

+129
-0
lines changed

index.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<!DOCTYPE html>
2+
<html>
3+
<head>
4+
<title>Thecode764 Portfolio Terminal </title>
5+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/jquery.terminal/css/jquery.terminal.min.css"/>
6+
<link rel="stylesheet" href="./style.css">
7+
</head>
8+
<body>
9+
<script src="https://cdn.jsdelivr.net/npm/jquery"></script>
10+
<script src="https://cdn.jsdelivr.net/npm/jquery.terminal/js/jquery.terminal.min.js"></script>
11+
<script src="terminal.js"></script>
12+
</body>
13+
</html>
14+

style.css

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
.ubuntu {
2+
background-color: rgb(45, 9, 34);
3+
}
4+
5+
.dark {
6+
background-color: black;
7+
}
8+
9+
.light {
10+
background-color: azure;
11+
}

terminal.js

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
let history = []
2+
let theme_for_terminal = "dark"
3+
$('body').terminal({
4+
help: function () {
5+
this.echo('<h1 style="color:red;">© 2024 Thecode764 Portfolio Website</h1><p style="color:yellowgreen;">Welcome to Thecode764 terminal portfolio<br>Here is <b>Help section</b></p><br><p style="color:blue;">pwd: Show the dir<br>socials: My social media<br>neofetch: The neofetch command<br>clear: Clear the screen<br>reboot: Restart the terminal<br>whoami: The whoami command<br>about: About me<br>history: Command history<br>search: Search in google for space use %20<br>poweroff: Power off this terminal<br>echo: Print text<br>themeset --help: Set a theme for terminal</p>', { typing: true, delay: 30, raw:true });
6+
history.push("help")
7+
},
8+
pwd: function () {
9+
this.echo('<p style="color:red;">/home/null</p>', { typing: true, delay: 30, raw:true })
10+
history.push("pwd")
11+
},
12+
socials: function () {
13+
this.echo(`<div style="display:flex;align-items:center;justify-content:center;gap:5px;">
14+
<a href="https://github.com/Thecode764" target="_blank" style="text-decoration:underline;">Github</a>
15+
<a href="https://discord.com/users/1125429179685548112" style="text-decoration:underline;">Discord</a>
16+
</div>`, { typing: true, delay: 1, raw:true })
17+
history.push("socials")
18+
},
19+
neofetch: function () {
20+
if (theme_for_terminal == "dark") {
21+
this.echo(`<h1 style="color:red;">Neofetch</h1>Name: Terminal portfolio OS<br>Version: V 0.3<br>Github: <a href="https://github.com/Thecode764" style="text-decoration:underline;">Github</a><br>Discord: <a href="https://discord.com/users/11254291796855481<12" style="text-decoration: underline;">Discord</a><br>Developer: <a href="https://github.com/Thecode764" style="text-decoration:underline;">Artin karimi</a><br>Browser: ${navigator.userAgent}<br>Theme: Dark`, {raw:true})
22+
} else if (theme_for_terminal == "light") {
23+
this.echo(`<h1 style="color:red;">Neofetch</h1>Name: Terminal portfolio OS<br>Version: V 0.3<br>Github: <a href="https://github.com/Thecode764" style="text-decoration:underline;">Github</a><br>Discord: <a href="https://discord.com/users/11254291796855481<12" style="text-decoration: underline;">Discord</a><br>Developer: <a href="https://github.com/Thecode764" style="text-decoration:underline;">Artin karimi</a><br>Browser: ${navigator.userAgent}<br>Theme: Light`, {raw:true})
24+
} else if (theme_for_terminal == "ubuntu") {
25+
this.echo(`<h1 style="color:red;">Neofetch</h1>Name: Terminal portfolio OS<br>Version: V 0.3<br>Github: <a href="https://github.com/Thecode764" style="text-decoration:underline;">Github</a><br>Discord: <a href="https://discord.com/users/11254291796855481<12" style="text-decoration: underline;">Discord</a><br>Developer: <a href="https://github.com/Thecode764" style="text-decoration:underline;">Artin karimi</a><br>Browser: ${navigator.userAgent}<br>Theme: Ubuntu`, {raw:true})
26+
}
27+
history.push('neofetch')
28+
},
29+
reboot: function () {
30+
window.location.reload()
31+
history.push("reboot")
32+
},
33+
whoami: function () {
34+
this.echo('<p style="background-image:linear-gradient(black, gray);border-radius:5px;">null</p>', {raw:true, typing: true, delay: 30})
35+
history.push("whoami")
36+
},
37+
about: function () {
38+
this.echo('<h1 style="color:red;">About me</h1><p style="color:blue;">Hi i am artin karimi<br>I am a <b>Web developer and python</b> Developer</p><p style="color:red;">I love programming 💖 I use linux. linux is best <3</p><p style="color:yellowgreen;">I use flask for backend i learning react for front-end ⚡️</p>', {raw:true, typing:true, delay:30})
39+
history.push("about")
40+
},
41+
history: function () {
42+
this.echo(`<p style="color:blue;">History for ${new Date().toDateString()}:</p>${history.join("<br>")}<br>`, {raw:true, typing:true, delay:30})
43+
history.push("history")
44+
},
45+
search: function (data) {
46+
this.echo(`<a href="https://www.google.com/search?q=${data}&sca_upv=1" style="text-decoration:underline;color:red;">Link</a>`,{raw:true, typing:true, delay:30})
47+
this.echo('<h1 style="color:yellowgreen">You search result opened in new page! 🚀</h1>',{raw:true, typing:true, delay:30})
48+
history.push(`search ${data}`)
49+
},
50+
poweroff: function () {
51+
window.location.href = "https://google.com"
52+
history.push("poweroff")
53+
},
54+
echo: function (text) {
55+
this.echo(text)
56+
history.push(`echo ${text}`)
57+
},
58+
themeset: function (theme) {
59+
if (theme == "--help") {
60+
this.echo(`<h1 style="color:yellowgreen;">Themes</h1><p style="color:purple;">Ubuntu (themeset ubuntu)</p><p>Dark (Default) (themeset dark)</p><p>Light (themeset light)</p>`,{raw:true})
61+
history.push("themeset --help")
62+
}
63+
else if (theme == "ubuntu") {
64+
body = document.getElementsByClassName('terminal')
65+
for (var i = 0; i < body.length; i++) {
66+
// Add the class to each element
67+
body[i].classList.remove(theme_for_terminal);
68+
body[i].classList.add('ubuntu');
69+
theme_for_terminal = "ubuntu"
70+
}
71+
history.push('<p style="color:purple;">themeset ubuntu</p>')
72+
} else if (theme == "dark") {
73+
body = document.getElementsByClassName('terminal')
74+
for (var i = 0; i < body.length; i++) {
75+
// Add the class to each element
76+
body[i].classList.remove(theme_for_terminal);
77+
body[i].classList.add('dark');
78+
theme_for_terminal = "dark"
79+
}
80+
history.push('<p style="color:gray;">themeset dark</p>')
81+
} else if (theme == "light") {
82+
body = document.getElementsByClassName('terminal')
83+
for (var i = 0; i < body.length; i++) {
84+
// Add the class to each element
85+
body[i].classList.remove(theme_for_terminal);
86+
body[i].classList.add('light');
87+
theme_for_terminal = "light"
88+
}
89+
history.push('<p style="color:azure;">themeset light</p>')
90+
}
91+
else {
92+
this.echo(`<h1 style="color:red;">Theme not found! 🔇</h1>`,{raw:true})
93+
history.push(`themeset ${theme}`)
94+
}
95+
}
96+
}, {
97+
greetings: '<h1 style="color:red;">Welcome to Thecode764 Portfolio website</h1><p style="color:yellowgreen;">The three version of my website was created in 2024 for best design this terminal created with jquery.terminal type "help" for start 🔍️</p><p style="color:red;">⚡️ Wait for command output please! i used writer effects</p><p style="color:blue;">The terminal is fast ⚡️</p><p style="color:orange;">✅ Have auto complete with TAB</p>',
98+
prompt: 'null ⚡️@Thecode764: ',
99+
raw: true,
100+
onCommandNotFound: function(command, term) {
101+
term.echo(`<h1 style="color:red;">Command error</h1><p>Command <b>${command} Not Found!</b><br><p style="color:green;"><b>Type :help: for view commands 🔧</b></p>`, {raw: true, typing: true, delay: 30})
102+
},
103+
completion: true
104+
});

0 commit comments

Comments
 (0)