From bd73e7d34bdab3c246dc7280eb69f9407a310219 Mon Sep 17 00:00:00 2001 From: SahooBishwajeet Date: Sun, 30 Jun 2024 03:01:19 +0530 Subject: [PATCH] Fix lint issues --- css/style.css | 4 +- index.html | 89 ++++++++++++++++-------------- modules/commands/default.ts | 8 +-- modules/commands/projects.ts | 14 ++--- modules/commands/whoami.ts | 26 ++++----- modules/style.ts | 102 ++++++++++++++++++----------------- 6 files changed, 127 insertions(+), 116 deletions(-) diff --git a/css/style.css b/css/style.css index e067791..25d4a3c 100644 --- a/css/style.css +++ b/css/style.css @@ -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; } diff --git a/index.html b/index.html index 361c635..ea394a9 100644 --- a/index.html +++ b/index.html @@ -1,49 +1,58 @@ - - - - - - - + + + + + + Portfolio - + - +
-
-
BishwajeetSahoo.x31_01
-
-
-
-
-
-
-
- - @:$ ~ - -
- +
+
BishwajeetSahoo.x31_01
+
+
+
+
+
+
+
+ + @:$ ~ +
-
-
- -

- - @:$ ~ - - -

-
+ +
+
+
+ +

+ + @:$ ~ + + +

+
- - - - + - \ No newline at end of file + + + diff --git a/modules/commands/default.ts b/modules/commands/default.ts index bca0f84..f67a229 100644 --- a/modules/commands/default.ts +++ b/modules/commands/default.ts @@ -3,16 +3,16 @@ const createDefault = (): string[] => { "
", "Unknown Command", "Type 'help' to get started.", - "
" - ] + "
", + ]; const defaultMsg: string[] = []; defaultMsgArr.forEach((ele) => { defaultMsg.push(ele); - }) + }); return defaultMsg; -} +}; export const DEFAULT = createDefault(); diff --git a/modules/commands/projects.ts b/modules/commands/projects.ts index 8fc23a7..7a51f95 100644 --- a/modules/commands/projects.ts +++ b/modules/commands/projects.ts @@ -1,4 +1,4 @@ -import command from '../../main.json' assert {type: 'json'}; +import command from "../../main.json" assert { type: "json" }; const createProject = (): string[] => { let string = ""; @@ -6,16 +6,16 @@ const createProject = (): string[] => { const files = `${command.projects.length} File(s)`; const SPACE = " "; - projects.push("
") + projects.push("
"); command.projects.forEach((ele) => { - let link = `${ele[0]}` + let link = `${ele[0]}`; string += SPACE.repeat(2); string += link; string += SPACE.repeat(24 - ele[0].length); string += ele[1]; projects.push(string); - string = ''; + string = ""; }); projects.push("
"); @@ -24,7 +24,7 @@ const createProject = (): string[] => { projects.push("
"); - return projects -} + return projects; +}; -export const PROJECTS = createProject() +export const PROJECTS = createProject(); diff --git a/modules/commands/whoami.ts b/modules/commands/whoami.ts index c4c4e4b..8eb7c66 100644 --- a/modules/commands/whoami.ts +++ b/modules/commands/whoami.ts @@ -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,", @@ -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[] = []; @@ -66,5 +66,5 @@ export const createWhoami = (): string[] => { whoami.push("
"); - return whoami -} + return whoami; +}; diff --git a/modules/style.ts b/modules/style.ts index 3f81a07..22a91b2 100644 --- a/modules/style.ts +++ b/modules/style.ts @@ -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) -})() \ No newline at end of file + 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); +})();