-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
650e490
commit bd73e7d
Showing
6 changed files
with
127 additions
and
116 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
})(); |