From d88e5d6a3184bb65e1bde748115f4fcf2d9bc808 Mon Sep 17 00:00:00 2001 From: amy Date: Tue, 7 Feb 2023 10:29:53 -0600 Subject: updates i think --- html/display.html | 55 +++++++++++++++++++++++++++++++++---------------------- html/tty.html | 8 ++++++-- src/jssh.js | 37 +++++++++++++++++++++---------------- src/server.js | 6 +++--- 4 files changed, 63 insertions(+), 43 deletions(-) diff --git a/html/display.html b/html/display.html index 718a018..ee90429 100644 --- a/html/display.html +++ b/html/display.html @@ -52,6 +52,15 @@ #root { position: relative; background-color: cornsilk; + background-image: url("src/img/wallpaper.png"); + background-repeat: no-repeat; + background-origin: content-box; + background-attachment: fixed; + background-position: center top; + -webkit-background-size: cover; + -moz-background-size: cover; + -o-background-size: cover; + background-size: cover; width: 90%; height: 90%; margin-left: 5%; @@ -291,15 +300,16 @@ background-color: #c7c7c7; } - textarea{ - resize:none; - background-color: rgba(0,0,0,0); - border:none; + + textarea { + resize: none; + background-color: rgba(0, 0, 0, 0); + border: none; outline: none; - overflow:scroll; - -webkit-box-shadow: none; - -moz-box-shadow: none; - box-shadow: none; + overflow: scroll; + -webkit-box-shadow: none; + -moz-box-shadow: none; + box-shadow: none; } - +
-
+ λ
diff --git a/src/jssh.js b/src/jssh.js index c78ca6d..374abb7 100644 --- a/src/jssh.js +++ b/src/jssh.js @@ -1,4 +1,9 @@ -let jssh = { +class jssh { + constructor(fs, working_dir, uid) { + this.fs = fs; + this.working_dir = working_dir; + this.uid = uid; + } set_wd(dir) { //let lwd = fs let wd = fs; @@ -34,7 +39,7 @@ let jssh = { } return wd; //return 1; - }, + } clean_path(path) { path = path .split("/") @@ -50,13 +55,13 @@ let jssh = { } } return "/" + path.join("/"); - }, + } main() { for (let d of fs) { if (d.name == ".bashrc") { for (let line of d.content.split("\n")) { document.getElementById("line").value = line; - jssh.ex(); + this.ex(); } break; } @@ -64,16 +69,16 @@ let jssh = { setInterval(() => { document.getElementById("line").focus(); }, 10); - }, + } ex() { - let temp_working_dir = working_dir; + let temp_working_dir = this.working_dir; document.getElementById("history").innerHTML += "λ " + document.getElementById("line").value + "
"; let com = document.getElementById("line").value; let stripped = com.split(" "); switch (stripped[0]) { case "jssh": - jssh.main(); + this.main(); break; case "neofetch": let add = ""; @@ -92,7 +97,7 @@ let jssh = { `--' `--' "; //position this plz:) add += "hello, i am amelia, they/them
i am mostly a typescript and c++ dev, but
i can work in most languages
--
i enjoy manga, and coding in free time
contact me at ameliasquires@disroot.org

"; - colors = ["#cdb4db", "#ffc8dd", "#ffafcc", "#bde0fe", "#a2d2ff"]; + let colors = ["#cdb4db", "#ffc8dd", "#ffafcc", "#bde0fe", "#a2d2ff"]; for (let co of colors) { add += "
 {
-  res.sendFile(__dirname + "/html/display.html");
+  res.sendFile("html/display.html",{'root': './'});
 });
-app.use("/src", express.static("src"));
+app.use("/src", express.static("src",{'root': './'}));
 app.listen(port, () => {
   console.log(`http://localhost:${port}`);
 });
-- 
cgit v1.2.3