Skip to content

Commit

Permalink
Fix lint issues
Browse files Browse the repository at this point in the history
  • Loading branch information
SahooBishwajeet committed Jun 29, 2024
1 parent 650e490 commit bd73e7d
Show file tree
Hide file tree
Showing 6 changed files with 127 additions and 116 deletions.
4 changes: 2 additions & 2 deletions css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@ a:hover {

.command {
text-shadow:
0 0 7px #fff,
0 0 151px var(--border);
0 0 2px #fff,
0 0 50px var(--border);
color: #FD9BDB;
}

Expand Down
89 changes: 49 additions & 40 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,49 +1,58 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="css/base.css">
<link rel="stylesheet" href="css/style.css">
<script src="https://kit.fontawesome.com/d5effce557.js" crossorigin="anonymous"></script>
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/base.css" />
<link rel="stylesheet" href="css/style.css" />
<script
src="https://kit.fontawesome.com/d5effce557.js"
crossorigin="anonymous"
></script>
<title>Portfolio</title>
</head>
</head>

<body>
<body>
<main id="main">
<div id="lines">
<div id="line-1">BishwajeetSahoo.x31_01</div>
<div id="line-2"></div>
<div id="line-3"></div>
<div id="line-4"></div>
<div id="line-5"></div>
</div>
<div id="terminal">
<div>
<span id="prompt">
<span id="pre-user"></span>@<span id="pre-host"></span>:$ ~
</span>
</div>
<a id="write-lines"></a>
<div id="lines">
<div id="line-1">BishwajeetSahoo.x31_01</div>
<div id="line-2"></div>
<div id="line-3"></div>
<div id="line-4"></div>
<div id="line-5"></div>
</div>
<div id="terminal">
<div>
<span id="prompt">
<span id="pre-user"></span>@<span id="pre-host"></span>:$ ~
</span>
</div>
<div id="input-line">
<div>
<p id="password-input" style="display: none;">Password: <input id="password-field" autocomplete="off"
type="password" /></p>
<p id="input-hidden">
<span id="prompt">
<span id="user"></span>@<span id="host"></span>:$ ~
</span>
<input id="user-input" type="text" enterkeyhint="Enter" spellcheck="false" autocapitalize="none"
autocomplete="off" />
</p>
</div>
<a id="write-lines"></a>
</div>
<div id="input-line">
<div>
<p id="password-input" style="display: none">
Password:
<input id="password-field" autocomplete="off" type="password" />
</p>
<p id="input-hidden">
<span id="prompt">
<span id="user"></span>@<span id="host"></span>:$ ~
</span>
<input
id="user-input"
type="text"
enterkeyhint="Enter"
spellcheck="false"
autocapitalize="none"
autocomplete="off"
/>
</p>
</div>
</div>
</main>
</body>

<script type="module" src="./modules/main.ts"></script>
<script type="module" src="./modules/style.ts"></script>
</body>

</html>
<script type="module" src="./modules/main.ts"></script>
<script type="module" src="./modules/style.ts"></script>
</html>
8 changes: 4 additions & 4 deletions modules/commands/default.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,16 @@ const createDefault = (): string[] => {
"<br>",
"Unknown Command",
"Type <span class='command'>'help'</span> to get started.",
"<br>"
]
"<br>",
];

const defaultMsg: string[] = [];

defaultMsgArr.forEach((ele) => {
defaultMsg.push(ele);
})
});

return defaultMsg;
}
};

export const DEFAULT = createDefault();
14 changes: 7 additions & 7 deletions modules/commands/projects.ts
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import command from '../../main.json' assert {type: 'json'};
import command from "../../main.json" assert { type: "json" };

const createProject = (): string[] => {
let string = "";
const projects: string[] = [];
const files = `${command.projects.length} File(s)`;
const SPACE = "&nbsp;";

projects.push("<br>")
projects.push("<br>");

command.projects.forEach((ele) => {
let link = `<a href="${ele[2]}" target="_blank">${ele[0]}</a>`
let link = `<a href="${ele[2]}" target="_blank">${ele[0]}</a>`;
string += SPACE.repeat(2);
string += link;
string += SPACE.repeat(24 - ele[0].length);
string += ele[1];
projects.push(string);
string = '';
string = "";
});

projects.push("<br>");
Expand All @@ -24,7 +24,7 @@ const createProject = (): string[] => {

projects.push("<br>");

return projects
}
return projects;
};

export const PROJECTS = createProject()
export const PROJECTS = createProject();
26 changes: 13 additions & 13 deletions modules/commands/whoami.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
const whoamiObj = {
"message": [
message: [
[
"In the kaleidoscope of existence,",
"I am but a reflection questioning the enigma - "
"I am but a reflection questioning the enigma - ",
],
[
"Amidst cosmic whispers,",
"I navigate the maze of self-discovery,",
"echoing the eternal refrain - "
"echoing the eternal refrain - ",
],
[
"In the symphony of life,",
Expand All @@ -22,35 +22,35 @@ const whoamiObj = {
[
"In the tapestry of reality,",
"I am the thread of self-inquiry,",
"weaving through the eternal question - "
"weaving through the eternal question - ",
],
[
"In the vast expanse of the universe,",
"I am a seeker of truth,",
"questioning the mysteries of existence - "
"questioning the mysteries of existence - ",
],
[
"Amidst the cosmic dance,",
"I am a curious observer,",
"seeking answers to the unknown - "
"seeking answers to the unknown - ",
],
[
"In the realm of possibilities,",
"I am an explorer of consciousness,",
"unraveling the secrets of being - "
"unraveling the secrets of being - ",
],
[
"As a wanderer in the cosmic labyrinth,",
"I question the nature of reality,",
"seeking enlightenment - "
"seeking enlightenment - ",
],
[
"In the symphony of existence,",
"I am a melody seeking harmony,",
"embracing the eternal question - "
]
"embracing the eternal question - ",
],
],
}
};

export const createWhoami = (): string[] => {
const whoami: string[] = [];
Expand All @@ -66,5 +66,5 @@ export const createWhoami = (): string[] => {

whoami.push("<br>");

return whoami
}
return whoami;
};
102 changes: 52 additions & 50 deletions modules/style.ts
Original file line number Diff line number Diff line change
@@ -1,56 +1,58 @@
import main from '../main.json' assert {type: 'json'};
import main from "../main.json" assert { type: "json" };

(() => {
const style = document.createElement('style')
const head = document.head
const background = `body {background: ${main.colors.background}}`
const foreground = `body {color: ${main.colors.foreground}}`
const inputBackground = `input {background: ${main.colors.background}}`
const inputForeground = `input {color: ${main.colors.prompt.input}}`
const outputColor = `.output {color: ${main.colors.prompt.input}}`
const preHost = `#pre-host {color: ${main.colors.prompt.host}}`
const host = `#host {color: ${main.colors.prompt.host}}`
const preUser = `#pre-user {color: ${main.colors.prompt.user}}`
const user = `#user {color: ${main.colors.prompt.user}}`
const prompt = `#prompt {color: ${main.colors.prompt.default}}`
const banner = `pre {color: ${main.colors.banner}}`
const link = `a {color: ${main.colors.link.text}}`
const linkHighlight = `a:hover {background: ${main.colors.link.highlightColor}}`
const linkTextHighlight = `a:hover {color: ${main.colors.link.highlightText}}`
const commandHighlight = `.command {color: ${main.colors.commands.textColor}}`
const keys = `.keys {color: ${main.colors.banner}}`
const style = document.createElement("style");
const head = document.head;
const background = `body {background: ${main.colors.background}}`;
const foreground = `body {color: ${main.colors.foreground}}`;
const inputBackground = `input {background: ${main.colors.background}}`;
const inputForeground = `input {color: ${main.colors.prompt.input}}`;
const outputColor = `.output {color: ${main.colors.prompt.input}}`;
const preHost = `#pre-host {color: ${main.colors.prompt.host}}`;
const host = `#host {color: ${main.colors.prompt.host}}`;
const preUser = `#pre-user {color: ${main.colors.prompt.user}}`;
const user = `#user {color: ${main.colors.prompt.user}}`;
const prompt = `#prompt {color: ${main.colors.prompt.default}}`;
const banner = `pre {color: ${main.colors.banner}}`;
const link = `a {color: ${main.colors.link.text}}`;
const linkHighlight = `a:hover {background: ${main.colors.link.highlightColor}}`;
const linkTextHighlight = `a:hover {color: ${main.colors.link.highlightText}}`;
const commandHighlight = `.command {color: ${main.colors.commands.textColor}}`;
const keys = `.keys {color: ${main.colors.banner}}`;

head.appendChild(style)
head.appendChild(style);

if (!style.sheet) return
if (!style.sheet) return;

if (!main.colors.border.visible) {
style.sheet.insertRule("#lines {display: none}")
style.sheet.insertRule("main {border: none}")
} else {
style.sheet.insertRule(`main {border-color: ${main.colors.border.color}}`)
style.sheet.insertRule(`#lines {background: ${main.colors.background}}`)
style.sheet.insertRule(`#line-1 {background: ${main.colors.border.color}; color: ${main.colors.background}}`)
style.sheet.insertRule(`#line-2 {background: ${main.colors.border.color}}`)
style.sheet.insertRule(`#line-3 {background: ${main.colors.border.color}}`)
style.sheet.insertRule(`#line-4 {background: ${main.colors.border.color}}`)
style.sheet.insertRule(`#line-5 {background: ${main.colors.border.color}}`)
}
if (!main.colors.border.visible) {
style.sheet.insertRule("#lines {display: none}");
style.sheet.insertRule("main {border: none}");
} else {
style.sheet.insertRule(`main {border-color: ${main.colors.border.color}}`);
style.sheet.insertRule(`#lines {background: ${main.colors.background}}`);
style.sheet.insertRule(
`#line-1 {background: ${main.colors.border.color}; color: ${main.colors.background}}`
);
style.sheet.insertRule(`#line-2 {background: ${main.colors.border.color}}`);
style.sheet.insertRule(`#line-3 {background: ${main.colors.border.color}}`);
style.sheet.insertRule(`#line-4 {background: ${main.colors.border.color}}`);
style.sheet.insertRule(`#line-5 {background: ${main.colors.border.color}}`);
}

style.sheet.insertRule(background)
style.sheet.insertRule(foreground)
style.sheet.insertRule(inputBackground)
style.sheet.insertRule(inputForeground)
style.sheet.insertRule(outputColor)
style.sheet.insertRule(preHost)
style.sheet.insertRule(host)
style.sheet.insertRule(preUser)
style.sheet.insertRule(user)
style.sheet.insertRule(prompt)
style.sheet.insertRule(banner)
style.sheet.insertRule(link)
style.sheet.insertRule(linkHighlight)
style.sheet.insertRule(linkTextHighlight)
style.sheet.insertRule(commandHighlight)
style.sheet.insertRule(keys)
})()
style.sheet.insertRule(background);
style.sheet.insertRule(foreground);
style.sheet.insertRule(inputBackground);
style.sheet.insertRule(inputForeground);
style.sheet.insertRule(outputColor);
style.sheet.insertRule(preHost);
style.sheet.insertRule(host);
style.sheet.insertRule(preUser);
style.sheet.insertRule(user);
style.sheet.insertRule(prompt);
style.sheet.insertRule(banner);
style.sheet.insertRule(link);
style.sheet.insertRule(linkHighlight);
style.sheet.insertRule(linkTextHighlight);
style.sheet.insertRule(commandHighlight);
style.sheet.insertRule(keys);
})();

0 comments on commit bd73e7d

Please sign in to comment.