From bd0554ca02a177898dbe22cba63f7dc7a4f740f9 Mon Sep 17 00:00:00 2001 From: Nathaniel Macapinlac Date: Thu, 9 Nov 2023 23:15:37 -0500 Subject: [PATCH] dir command --- index.html | 76 +++++++++++++++++++++++++++---------------------- js/main.js | 5 +++- js/variables.js | 21 +++++++++++--- 3 files changed, 63 insertions(+), 39 deletions(-) diff --git a/index.html b/index.html index 6492707..8c35146 100644 --- a/index.html +++ b/index.html @@ -1,35 +1,43 @@ - - - - - - - - - nasan | Terminal - - - - - - - - -
-
-
-

guest@nasan.dev:$ ~

- -
- -
-

guest@nasan.dev:$ ~ - -

-
-
-
- - - + + + + + + + + + + nasan | Terminal + + + + + + + + + +
+
+
+

guest@nasan.dev:$ ~ +

+ +
+ +
+

guest@nasan.dev:$ ~ + +

+
+
+
+ + + + \ No newline at end of file diff --git a/js/main.js b/js/main.js index fbb4913..582769e 100644 --- a/js/main.js +++ b/js/main.js @@ -26,7 +26,7 @@ function tabCompletion(tab_cmd){ } function historyScroll(event){ - let tab_cmd = ''; + let tab_cmd = '' const key = event.key if(key === "ArrowUp"){ if(history.length != 0 && historyTracker != history.length){ @@ -193,6 +193,9 @@ function switchCase(cmd){ displayText("loading GUI ...

", 1); openNewTab(website, 500); break; + case 'dir': + writeLines(dir, '', 50) + break; default: writeLines(defaultMessage, 50); break; diff --git a/js/variables.js b/js/variables.js index 91d28c1..c8731c6 100644 --- a/js/variables.js +++ b/js/variables.js @@ -3,6 +3,8 @@ const github = "https://github.com/nasan016"; const linkedin = "https://www.linkedin.com/in/nathanielmacapinlac/"; const email = 'nlm8841@nyu.edu' const website = 'https://nasan016.github.io/nasan.me/' +const drdinosaur = "https://github.com/nasan016/dr-dinosaur" +const pomodoro = "https://github.com/nasan016/pomodoro-timer" squid = 'https://www.youtube.com/watch?v=J2UyOTS3UCE' @@ -30,12 +32,13 @@ commandList = [ 'repo', 'banner', 'clear', - 'gui' + 'gui', + 'dir' ]; whoami = [ '
', - "I don't know who you are, but I know who I am.", + "Who am I? A question worth exploring.", '
', ' Email nlm8841@nyu.edu', ' GitHub github/nasan016', @@ -47,6 +50,7 @@ help = [ "
", ' \'about\' Who made this website?', ' \'whoami\' What is a nasan?', + ' \'dir\' What am I making?', ' \'sudo\' I forgot the password.', ' \'repo\' View the GitHub repository.', ' \'banner\' Display the header.', @@ -81,7 +85,7 @@ banner = [ "
    \\|__| \\|__|\\|__|\\|__|\\_________\\|__|\\|__|\\|__| \\|__|",
 "
                         \\|_________|
", "
", -"Welcome to NasanTerminal v1.0.0", +"Welcome to NasanTerminal v1.0.1", "Type 'help' for a list of available commands.", "Type 'repo' to view the GitHub repository or click here.", "Type 'gui' for a simplified version of this website or click here", @@ -90,6 +94,15 @@ banner = [ defaultMessage = [ "COMMAND NOT FOUND.", - "Try 'help' to get started.", + "Try 'help' to get started.", "
" ]; + +dir = [ + "
", + "Dr. Dinosaur JS", + "Pomodoro Timer Go", + "
", + "2 File(s) 9,814,072,356 bytes", + "
" +]