From 1d88bfa1d3f937c487409527efd7fed66c24520b Mon Sep 17 00:00:00 2001 From: Baipyrus Date: Thu, 12 Jan 2023 15:10:13 +0100 Subject: [PATCH] added ascii art --- css/main.css | 5 +++++ index.html | 8 ++++++++ js/main.js | 8 ++++---- 3 files changed, 17 insertions(+), 4 deletions(-) diff --git a/css/main.css b/css/main.css index 1923628..2efb837 100644 --- a/css/main.css +++ b/css/main.css @@ -22,4 +22,9 @@ body { #current { color: lightgrey; +} + +#asciiArt { + text-align: center; + color: red; } \ No newline at end of file diff --git a/index.html b/index.html index 30ab720..a303482 100644 --- a/index.html +++ b/index.html @@ -10,6 +10,14 @@
 
+
+██████╗  █████╗ ██╗██████╗ ██╗   ██╗██████╗    ██╗   ██╗███████╗
+██╔══██╗██╔══██╗██║██╔══██╗╚██╗ ██╔╝██╔══██╗   ██║   ██║██╔════╝
+██████╔╝███████║██║██████╔╝ ╚████╔╝ ██████╔╝   ██║   ██║███████╗
+██╔══██╗██╔══██║██║██╔═══╝   ╚██╔╝  ██╔══██╗   ██║   ██║╚════██║
+██████╔╝██║  ██║██║██║        ██║   ██║  ██║██╗╚██████╔╝███████║
+╚═════╝ ╚═╝  ╚═╝╚═╝╚═╝        ╚═╝   ╚═╝  ╚═╝╚═╝ ╚═════╝ ╚══════╝
+            
root@baipyr.us:~# diff --git a/js/main.js b/js/main.js index 2f8f90f..dfcccb7 100644 --- a/js/main.js +++ b/js/main.js @@ -1,16 +1,16 @@ const pretext = "root@baipyr.us:~# "; let startPosition = 0; let cursorPosition = 0; -let cursorYOffset = 0; +let cursorYOffset = 7; const tbDiv = document.getElementById("textbox"); -const length = tbDiv.innerText.length+1; +const length = pretext.length+1; startPosition = length; cursorPosition = length; const textIn = document.getElementById("input"); const textCur = document.getElementById("current"); const cursor = document.getElementById("cursor"); -cursor.style.transform = `translate(${length-1}ch)`; +cursor.style.transform = `translate(${length-1}ch,${2.222*7-0.4}ch)`; textIn.oninput = () => { textCur.textContent += textIn.value; @@ -131,7 +131,7 @@ function runCommand(input) { function updateCursor() { let cursor = document.getElementById("cursor"); - cursor.style.transform = `translate(${cursorPosition-1}ch, ${2.222*cursorYOffset}ch)`; + cursor.style.transform = `translate(${cursorPosition-1}ch, ${2.222*cursorYOffset-0.4}ch)`; } setInterval(()=>{