diff --git a/index.html b/index.html index 54408c6..4a0f2a1 100644 --- a/index.html +++ b/index.html @@ -7,6 +7,7 @@ + WebShell diff --git a/src/commands.ts b/src/commands.ts index fef2afa..6bbbdcb 100644 --- a/src/commands.ts +++ b/src/commands.ts @@ -23,8 +23,8 @@ const DEFAULTOBJ = { const WHOAMIOBJ = { "message" : [ [ - "In the kaleidoscope of existence,", - "I am but a reflection questioning the enigma - " + "In the kaleidoscope of existence,", + "I am but a reflection questioning the enigma - " ], [ "Amidst cosmic whispers,", @@ -36,6 +36,16 @@ const WHOAMIOBJ = { "I am a note inquiring its own melody,", "harmonizing with the universal query - ", ], + [ + "As stardust contemplating its journey,", + "I ponder the cosmic query,", + "silently asking - ", + ], + [ + "In the tapestry of reality,", + "I am the thread of self-inquiry,", + "weaving through the eternal question - " + ], ], } @@ -63,6 +73,19 @@ const HELPOBJ = { ], } +const ABOUTOBJ = { + "message": "Hi I'm Nathan.", + "github": [ + "github/nasan016", + "https://github.com/nasan016", + ], + "linkedin": [ + "linkedin/nathanielmacapinlac", + "https://linkedin.com/nathanielmacapinlac", + ], + "email": "nlm8841@nyu.edu" +} + const CREATEBANNER = () : string[] => { const banner : string[] = []; banner.push("
") @@ -111,13 +134,55 @@ const CREATEWHOAMI = () : string[] => { }) whoami.push("
"); + return whoami; } -console.log(CREATEWHOAMI()) +const CREATEABOUT = () : string[] => { + const about : string[] = []; + + const SPACE = " " + + const EMAIL = "email" + const GITHUB = "github" + const LINKEDIN = "linkedin" + + const email = " Email" + const github = " Github" + const linkedin = " LinkedIn" + let string = "" + + about.push("
") + about.push(ABOUTOBJ.message) + about.push("
") + string += SPACE.repeat(2) + string += email + string += SPACE.repeat(17 - EMAIL.length) + string += `${ABOUTOBJ.email}` + about.push(string) + + string = '' + string += SPACE.repeat(2) + string += github + string += SPACE.repeat(17 - GITHUB.length) + string += `${ABOUTOBJ.github[0]}` + about.push(string) + + string = '' + string += SPACE.repeat(2) + string += linkedin + string += SPACE.repeat(17 - LINKEDIN.length) + string += `${ABOUTOBJ.linkedin[0]}` + about.push(string) + + about.push("
") + return about +} + const CREATEHELP = () : string[] => { const help : string[] = [] help.push("
") + HELPOBJ.commands.forEach((ele) => { const SPACE = " "; let string = ""; diff --git a/src/css/style.css b/src/css/style.css index 7f3a72c..7b1dff3 100644 --- a/src/css/style.css +++ b/src/css/style.css @@ -150,4 +150,9 @@ a { 0 0 7px #fff, 0 0 151px var(--border); color: #FD9BDB; +} + +.output { + font-weight: 400 !important; + color: #FF7685 } \ No newline at end of file diff --git a/src/main.ts b/src/main.ts index 381c47e..3de8024 100644 --- a/src/main.ts +++ b/src/main.ts @@ -23,7 +23,6 @@ function userInputHandler(e : KeyboardEvent) { switch(key) { case "Enter": enterKey(); - SCROLLTOBOTTOM(); break; } } @@ -32,6 +31,7 @@ function enterKey() { const resetInput = ""; userInput = USERINPUT.value; userInput = userInput.trim(); + let newUserInput = `${userInput}` //if clear then early return if (userInput === 'clear') { @@ -42,7 +42,7 @@ function enterKey() { } const DIV = document.createElement("div"); - DIV.innerHTML = PROMPT.innerHTML.concat(" ", userInput); + DIV.innerHTML = PROMPT.innerHTML.concat(" ", newUserInput); WRITELINES.parentNode!.insertBefore(DIV, WRITELINES); /* @@ -75,6 +75,9 @@ function commandHandler(input : string) { case 'whoami': writeLines(CREATEWHOAMI()) break; + case 'about': + writeLines(CREATEABOUT()) + break; default: writeLines(DEFAULT) break;