fix(terminal): refactor names for posts

This commit is contained in:
Barrett Ruth 2024-06-15 14:19:10 -05:00
parent 2571771f70
commit f6750ade55
3 changed files with 8 additions and 8 deletions

View file

@ -11,9 +11,9 @@
<body class="graph"> <body class="graph">
<header> <header>
<a href="/" onclick="refresh(event)"> <a href="/" onclick="refresh(event)">
<div class="terminal-prompt"> <div class="terminal-container">
<span class="prompt">barrett@ruth:~$</span> <span class="terminal-prompt">barrett@ruth:~$</span>
<span class="cursor"></span> <span class="terminal-cursor"></span>
</div> </div>
</a> </a>
<div class="header-links"> <div class="header-links">

View file

@ -22,7 +22,7 @@ function clearPrompt(delay, callback) {
if (clearing) return; if (clearing) return;
clearing = true; clearing = true;
const terminalPrompt = document.querySelector(".prompt"); const terminalPrompt = document.querySelector(".terminal-prompt");
const topicLength = terminalPrompt.innerHTML.length - TERMINAL_PROMPT.length; const topicLength = terminalPrompt.innerHTML.length - TERMINAL_PROMPT.length;
let i = 0; let i = 0;
@ -83,7 +83,7 @@ function typechars(e) {
const topic = e.target.textContent; const topic = e.target.textContent;
const terminalText = ` ${topic.toLowerCase()}/`; const terminalText = ` ${topic.toLowerCase()}/`;
const terminalPrompt = document.querySelector(".prompt"); const terminalPrompt = document.querySelector(".terminal-prompt");
const delay = const delay =
terminalPrompt.innerHTML.length > TERMINAL_PROMPT.length ? 250 : 500; terminalPrompt.innerHTML.length > TERMINAL_PROMPT.length ? 250 : 500;
@ -104,7 +104,7 @@ function typechars(e) {
} }
window.addEventListener("beforeunload", () => { window.addEventListener("beforeunload", () => {
document.querySelector(".prompt").innerHTML = TERMINAL_PROMPT; document.querySelector(".terminal-prompt").innerHTML = TERMINAL_PROMPT;
}); });
function applyColor(topic) { function applyColor(topic) {

View file

@ -61,7 +61,7 @@ footer {
justify-content: flex-end; justify-content: flex-end;
} }
.cursor { .terminal-cursor {
display: inline-block; display: inline-block;
width: 10px; width: 10px;
height: 1em; height: 1em;
@ -78,7 +78,7 @@ footer {
} }
} }
.terminal-prompt { .terminal-container {
font-family: "Courier New", monospace; font-family: "Courier New", monospace;
} }