Add files via upload

This commit is contained in:
Adil Sadqi 2023-02-19 21:01:49 +01:00 committed by GitHub
commit 053e162e78
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 1136 additions and 0 deletions

36
index.html Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,38 @@
function $(elid) {
return document.getElementById(elid);
}
var cursor;
window.onload = init;
function init() {
cursor = $("cursor");
cursor.style.left = "0px";
}
function nl2br(txt) {
return txt.replace(/\n/g, '');
}
function typeIt(from, e) {
e = e || window.event;
var w = $("typer");
var tw = from.value;
if (!pw){
w.innerHTML = nl2br(tw);
}
}
function moveIt(count, e) {
e = e || window.event;
var keycode = e.keyCode || e.which;
if (keycode == 37 && parseInt(cursor.style.left) >= (0 - ((count - 1) * 10))) {
cursor.style.left = parseInt(cursor.style.left) - 10 + "px";
} else if (keycode == 39 && (parseInt(cursor.style.left) + 10) <= 0) {
cursor.style.left = parseInt(cursor.style.left) + 10 + "px";
}
}
function alert(txt) {
console.log(txt);
}

View File

@ -0,0 +1,154 @@
var discord = "https://discord.com/users/AdilSadqi#6482";
var instagram = "https://www.instagram.com/sadqi.adil";
var twitter = "https://www.twitter.com/adilsadqi/";
var password = "ascodes";
var adil = "adil";
var Adil = "Adil";
var ADIL = "ADIL";
var jaber = "jaber";
var whatsapp = "https://wa.link/p8dhsa";
var phone = "tel:+212624489471";
var email = 'mailto:adil@asadqi.com';
var website = 'https://web.adil.asadqi.com';
var cloud = "https://cloud.asadqi.com";
var instagramjb = "https://www.instagram.com/sadqi.jpeg";
var curl = '';
whois = [
"<br>",
"Hey, I'm Adil!👋",
"Since 1998 Ive start learning about computer and programing and on this page you will find all what i have learned in the past years until now",
"And this Website created by me and Ive name it Terminal because this is like my knowledge Terminal and to put all my experience on this page ",
"And the purpose of building this site is just to let people know more about me and keep in touch with my Friends and with who i know and everyone interesting to contact me ",
"with a simple design and new look website.",
"And Ive used to build this website HTML ",
"PHP and CSS with some animation to keep it lightweight site.",
"Please feel free to contact me if you have anything for me to say 😉",
"<br>"
];
jb = [
"<br>",
"The first person who discovered this terminal!👋",
"<br>"
];
weather = [
"<div class=\"color2\">",
'<iframe async src="https://wttr.in/kenitra" scrolling="no" width="100%" height="585" frameborder="0" class="color2"></iframe>',
"<div>"
];
update = [
"<br>",
"Checking...",
"Downloading Update...",
"==========>10%",
"====================>20%",
"==============================>30%",
"========================================>40%",
"==================================================>50%",
"============================================================>60%",
"======================================================================>70%",
"================================================================================>80%",
"==========================================================================================90%",
"====================================================================================================>100%",
"Update Terminal...",
"Finishing Installation...",
"Done",
"<br>"
];
whoami = [
"<br>",
"The paradox of “Who am I?” is: we never know, but, we constantly find out.",
"<br>"
];
social = [
"<br>",
'discord <a href="' + discord + '" target="_blank">discord/adilsadqi' + '</a>',
'instagram <a href="' + instagram + '" target="_blank">instagram/adilsadqi' + '</a>',
'twitter <a href="' + twitter + '" target="_blank">twitter/adilsadqi' + '</a>',
'whatsapp <a href="' + whatsapp + '" target="_blank">whatsapp/adilsadqi' + "</a>",
'phone <a href="' + phone + '" target="_blank">phone/number' + "</a>",
'website <a href="' + website + '" target="_blank">webpage/adilsadqi' + "</a>",
"<br>"
];
socialjb = [
"<br>",
'instagram <a href="' + instagramjb + '" target="_blank">instagram/jabersadqi' + '</a>',
"<br>"
];
secret = [
"<br>",
'<span class="command">sudo</span> Only use if you\'re admin',
"<br>"
];
projects = [
"<br>",
"Still Learning... But here is some projects i did in the past :",
"ROUTER ON RASPBERRY PI, AUTOMATION ON RASPBERRY PI, CUSTOMIZE OS ON VM, SERVER CREATION ON RASPBERRY PI AND VM, BOTS CREATION, WEBSITE CREATION, CLOUD CREATION.",
"<br>"
];
help = [
"<br>",
'<span class="command">whois</span> Who is Adil?',
'<span class="command">whoami</span> Who are you?',
'<span class="command">website</span> Webpage version',
'<span class="command">social</span> Display social networks',
'<span class="command">secret</span> Find the password',
'<span class="command">projects</span> View coding projects',
'<span class="command">history</span> View command history',
'<span class="command">help</span> You obviously already know what this does',
'<span class="command">email</span> Do not email me ;)',
'<span class="command">clear</span> Clear terminal',
'<span class="command">banner</span> Display the header',
"<br>",
];
root = [
"<br>",
'<span class="command">update</span> Update terminal',
'<span class="command">close</span> Close this page',
'<span class="command">exit</span> Exit from terminal',
'<span class="command">history</span> View command history',
'<span class="command">help</span> This is what you need if you get lost',
'<span class="command">clear</span> Clear terminal',
'<span class="command">version</span> Check teminal version',
'<span class="command">sudo</span> Check it out',
'<span class="command">creator</span> Author and creator of this terminal',
'<span class="command">sadqi</span> Look for specific name in Sadqi family',
'<span class="command">weather</span> Check local weather in realtime',
"<br>",
]
banner = [
'<span class="index">Adil Sadqi Not A Corporation. No Rights reserved.</span>',
" ",
" █████╗ ██████╗ ██╗██╗ ███████╗ █████╗ ██████╗ ██████╗ ██╗",
" ██╔══██╗██╔══██╗██║██║ ██╔════╝██╔══██╗██╔══██╗██╔═══██╗██║",
" ███████║██║ ██║██║██║ ███████╗███████║██║ ██║██║ ██║██║",
" ██╔══██║██║ ██║██║██║ ╚════██║██╔══██║██║ ██║██║▄▄ ██║██║",
" ██║ ██║██████╔╝██║███████╗ ███████║██║ ██║██████╔╝╚██████╔╝██║",
" ╚═╝ ╚═╝╚═════╝ ╚═╝╚══════╝ ╚══════╝╚═╝ ╚═╝╚═════╝ ╚══▀▀═╝ ╚═╝ ©",
" ",
"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~",
'<span class="color2">Welcome to my interactive web terminal.</span>',
"<span class=\"color2\">For a list of available commands, type</span> <span class=\"command\">'help'</span><span class=\"color2\"><span class=\"color2\">Or type </span> <span class=\"command\">'website'</span><span class=\"color2\"><span class=\"color2\"> For regulare website. </span></span>",
];

449
index_files/js Normal file

File diff suppressed because one or more lines are too long

1
index_files/main.css Normal file

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,324 @@
var before = document.getElementById("before");
var liner = document.getElementById("liner");
var command = document.getElementById("typer");
var textarea = document.getElementById("texter");
var terminal = document.getElementById("terminal");
var git = 0;
var pw = false;
let pwd = false;
var gt = 0;
var wr = false;
let wrd = false;
let wrr = false;
let wrdd = false;
var commands = [];
setTimeout(function() {
loopLines(banner, "", 80);
textarea.focus();
}, 100);
window.addEventListener("keyup", enterKey);
console.log(
"%cYou hacked my password!😠",
"color: #04ff00; font-weight: bold; font-size: 24px;"
);
console.log("%cPassword: '" + password + "' - I wonder what it does?🤔", "color: grey");
console.log(
"%cYou hacked my password!😠",
"color: #04ff00; font-weight: bold; font-size: 24px;"
);
console.log("%cPassword: '" + who + "' - I wonder what it does?🤔", "color: grey");
//init
textarea.value = "";
command.innerHTML = textarea.value;
function enterKey(e) {
if (e.keyCode == 181) {
document.location.reload(true);
}
if (pw) {
let et = "*";
let w = textarea.value.length;
command.innerHTML = et.repeat(w);
if (textarea.value === password) {
pwd = true;
}
if (pwd && e.keyCode == 13) {
loopLines(secret, "color2 margin", 120);
command.innerHTML = "";
textarea.value = "";
pwd = false;
pw = false;
liner.classList.remove("password");
} else if (e.keyCode == 13) {
addLine("Wrong password", "error", 0);
command.innerHTML = "";
textarea.value = "";
pw = false;
liner.classList.remove("password");
}
}
else if (wr) {
command.innerHTML = textarea.value;
if (textarea.value === adil) {
wrd = true;
}
if (textarea.value === Adil) {
wrd = true;
}
if (textarea.value === ADIL) {
wrd = true;
}
if (textarea.value === jaber) {
wrdd = true;
}
if (wrd && e.keyCode == 13) {
loopLines(whois, social, "color2 margin", 120);
loopLines(social, "color2 margin", 120);
command.innerHTML = "";
textarea.value = "";
wrd = false;
wr = false;
liner.classList.remove("who");
}
if (wrd && e.keyCode == 13) {
loopLines(whois, social, "color2 margin", 120);
loopLines(social, "color2 margin", 120);
command.innerHTML = "";
textarea.value = "";
wrd = false;
wr = false;
liner.classList.remove("who");
}
if (wrdd && e.keyCode == 13) {
loopLines(jb, "color2 margin", 120);
loopLines(socialjb, "color2 margin", 120);
command.innerHTML = "";
textarea.value = "";
wrdd = false;
wrr = false;
liner.classList.remove("who");
} else if (e.keyCode == 13) {
addLine("We don't know anything about this person yet", "error", 0);
command.innerHTML = "";
textarea.value = "";
wrr = false;
wr = false;
liner.classList.remove("who");
}
}
else {
if (e.keyCode == 13) {
commands.push(command.innerHTML);
git = commands.length;
addLine("visitor@asadqi.com:~$ " + command.innerHTML, "no-animation", 0);
commander(command.innerHTML.toLowerCase());
command.innerHTML = "";
textarea.value = "";
}
if (e.keyCode == 38 && git != 0) {
git -= 1;
textarea.value = commands[git];
command.innerHTML = textarea.value;
}
if (e.keyCode == 40 && git != commands.length) {
git += 1;
if (commands[git] === undefined) {
textarea.value = "";
} else {
textarea.value = commands[git];
}
command.innerHTML = textarea.value;
}
}
}
function commander(cmd) {
switch (cmd.toLowerCase()) {
case "help":
loopLines(help, "color2 margin", 80);
break;
case "root":
loopLines(root, "color2 margin", 80);
break;
case "whois":
loopLines(whois, "color2 margin", 80);
break;
case "adil":
loopLines(whois, "color2 margin", 120);
break;
case "jaber":
addLine("Jaber Sadqi...", "color2", 80);
loopLines(socialjb, "color2 margin", 120);
break;
case "whoami":
loopLines(whoami, "color2 margin", 80);
break;
case "cloud":
addLine("Opening Cloud...", "color2", 80);
newTab(cloud);
break;
case "youtube":
addLine("Opening Youtube...", "color2", 80);
setTimeout(function() {
window.open('https://www.youtube.com');
}, 1000);
break;
case "google":
addLine("Opening Google...", "color2", 80);
setTimeout(function() {
window.open('https://www.google.com');
}, 1000);
break;
case "sudo":
addLine("Oh no, you're not admin...", "color2", 80);
addLine("---------------------------","color2", 80);
loopLines(help, "color2 margin", 80);
break;
case "version":
addLine("ASCODES v2.6.3", "color2", 80);
setTimeout(function() {
},800);
break;
case "creator":
addLine("Adil Sadqi", "color2", 80);
setTimeout(function() {
},800);
break;
case "exit":
addLine("Thank you for your visit, Good Bye...", "color2", 80);
setTimeout(function() {
window.close('https://adil.asadqi.com');
}, 2500);
break;
case "close":
addLine("Thank you for your visit, Good Bye..", "color2", 80);
setTimeout(function() {
window.close('https://adil.asadqi.com');
}, 2500);
break;
case "update":
loopLines(update, "color2 margin", 1000);
break;
case "social":
loopLines(social, "color2 margin", 80);
break;
case "secret":
liner.classList.add("password");
pw = true;
break;
case "projects":
loopLines(projects, "color2 margin", 80);
break;
case "password":
addLine("<span class=\"inherit\"> Lol! You're joking, right? You\'re gonna have to try harder than that!😂</span>", "error", 100);
break;
case "weather":
loopLines(weather, "color2 margin", 10);
break;
case "sadqi":
liner.classList.add("who");
wr = true;
wrr = true;
break;
case "history":
addLine("<br>", "", 0);
loopLines(commands, "color2", 80);
addLine("<br>", "command", 80 * commands.length + 50);
break;
case "email":
addLine('Opening mailto:<a href="mailto:adil@asadqi.com.com">adil@asadqi.com</a>...', "color2", 80);
newTab(email);
break;
case "clear":
setTimeout(function() {
terminal.innerHTML = '<a id="before"></a>';
before = document.getElementById("before");
}, 1);
break;
case "banner":
loopLines(banner, "", 80);
break;
// socials
case "cloud":
addLine("Opening Cloud...", "color2", 80);
newTab(cloud);
break;
case "twitter":
addLine("Opening Twitter...", "color2", 0);
newTab(twitter);
break;
case "whatsapp":
addLine("Opening Whatsapp...", "color2", 0);
newTab(whatsapp);
break;
case "discord":
addLine("Opening Discord...", "color2", 0);
newTab(discord);
break;
case "instagram":
addLine("Opening Instagram...", "color2", 0);
newTab(instagram);
break;
case "phone":
addLine("Opening Phone Number...", "color2", 0);
newTab(phone);
break;
case "website":
addLine("Opening Website...", "color2", 0);
newTab(website);
break;
case "curl":
addLine("Opening Website...", "color2", 0);
newTab(curl);
break;
default:
addLine("<span class=\"inherit\">Command not found. For a list of commands, type <span class=\"command\">'help'</span>.</span>", "error", 100);
break;
}
}
function newTab(link) {
setTimeout(function() {
window.open(link, "_blank");
}, 500);
}
function addLine(text, style, time) {
var t = "";
for (let i = 0; i < text.length; i++) {
if (text.charAt(i) == " " && text.charAt(i + 1) == " ") {
t += "&nbsp;&nbsp;";
i++;
} else {
t += text.charAt(i);
}
}
setTimeout(function() {
var next = document.createElement("p");
next.innerHTML = t;
next.className = style;
before.parentNode.insertBefore(next, before);
window.scrollTo(0, document.body.offsetHeight);
}, time);
}
function loopLines(name, style, time) {
name.forEach(function(item, index) {
addLine(item, style, index * time);
});
}

134
index_files/style.css Normal file
View File

@ -0,0 +1,134 @@
body {
margin: 0;
padding: 15px 20px;
min-height: 99%;
width: 100%;
min-width: 550px;
color: #519975;
background: #211D1B;
font-family: cursor, monospace;
overflow-x: hidden;
}
::selection {
color: #211830;
background-color: #519975;
}
::-moz-selection {
color: #211830;
background-color: #519975;
}
textarea {
left: -1000px;
position: absolute;
}
b {
font-weight: bold;
text-decoration: underline;
}
/* Cursor Start */
.cursor {
font-size: 12px;
color: #73ABAD;
background-color: #73ABAD;
position: relative;
opacity: 1;
height: 1.5em;
width: 10px;
max-width: 10px;
transform: translateY(4px);
overflow: hidden;
text-indent: -5px;
display: inline-block;
text-decoration: blink;
animation: blinker 1s linear infinite;
}
@keyframes blinker {
50% {
opacity: 0;
}
}
#command {
cursor: text;
height: 50px;
color: #73ABAD;
}
#liner {
line-height: 1.3em;
margin-top: -2px;
animation: show 0.5s ease forwards;
animation-delay: 1.2s;
opacity: 0;
}
#liner::before {
color: #519975;
content: "visitor@asadqi.com:~$";
}
#liner.password::before {
content: "Password:";
}
#liner.who::before {
content: "Please specify a name:";
}
@keyframes show {
from {
opacity: 0;
}
to {
opacity: 1;
}
}
/* Cursor End */
p {
display: block;
line-height: 1.3em;
margin: 0;
overflow: hidden;
white-space: nowrap;
margin: 0;
letter-spacing: 0.05em;
animation: typing 0.5s steps(30, end);
}
.no-animation {
animation: typing 0 steps(30, end);
}
.margin {
margin-left: 20px;
}
@keyframes typing {
from {
width: 0;
}
to {
width: 100%;
}
}
.index {
color: #DCDCCC;
}
.color2 {
color: #B89076;
}
.command {
color: #73ABAD;
text-shadow: 0 0 5px #73ABAD;
}
.error {
color: #B89076;
}
.white {
color: #fff;
}
.inherit,
a {
color: #9C8394;
}
a {
text-decoration: inherit;
}
a:hover {
background: #73ABAD;
color: #211830;
}
a:focus {
outline: 0;
}