Skip to content

Commit

Permalink
Add "Let-Me-Sleep" reference
Browse files Browse the repository at this point in the history
  • Loading branch information
SahooBishwajeet committed Jun 29, 2024
1 parent bd73e7d commit f334865
Show file tree
Hide file tree
Showing 3 changed files with 49 additions and 49 deletions.
27 changes: 19 additions & 8 deletions modules/commands/about.ts
Original file line number Diff line number Diff line change
@@ -1,17 +1,19 @@
import main from '../../main.json' assert {type: 'json'};
import main from "../../main.json" assert { type: "json" };

const createAbout = (): string[] => {
const about: string[] = [];

const SPACE = " ";

const BRAINDUMP = "Brain-Dump";
const EMAIL = "Email";
const GITHUB = "Github";
const LINKEDIN = "Linkedin";
const TWITTER = "Twitter";
const INSTAGRAM = "Instagram";
const DISCORD = "Discord";

const braindump = `<i class='fa-solid fa-brain'></i> ${BRAINDUMP}`;
const email = `<i class='fa-solid fa-envelope'></i> ${EMAIL}`;
const github = `<i class='fa-brands fa-github'></i> ${GITHUB}`;
const linkedin = `<i class='fa-brands fa-linkedin'></i> ${LINKEDIN}`;
Expand All @@ -26,49 +28,58 @@ const createAbout = (): string[] => {

about.push("<br>");

string += SPACE.repeat(2);
string += braindump;
string += SPACE.repeat(17 - BRAINDUMP.length);
string += `<a target='_blank' href='${main.braindump}'>${
main.braindump.split("/")[2]
}</a>`;
about.push(string);

string = "";
string += SPACE.repeat(2);
string += email;
string += SPACE.repeat(17 - EMAIL.length);
string += `<a target='_blank' href='mailto:${main.social.email}'>${main.social.email}</a>`;
about.push(string);

string = '';
string = "";
string += SPACE.repeat(2);
string += github;
string += SPACE.repeat(17 - GITHUB.length);
string += `<a target='_blank' href='https://github.com/${main.social.github}'>github/${main.social.github}</a>`;
about.push(string);

string = '';
string = "";
string += SPACE.repeat(2);
string += linkedin;
string += SPACE.repeat(17 - LINKEDIN.length);
string += `<a target='_blank' href='https://www.linkedin.com/in/${main.social.linkedin}'>linkedin/${main.social.linkedin}</a>`;
about.push(string);

string = '';
string = "";
string += SPACE.repeat(2);
string += twitter;
string += SPACE.repeat(17 - TWITTER.length);
string += `<a target='_blank' href='https://twitter.com/${main.social.twitter}'>twitter/${main.social.twitter}</a>`;
about.push(string);

string = '';
string = "";
string += SPACE.repeat(2);
string += discord;
string += SPACE.repeat(17 - DISCORD.length);
string += `<a target='_blank' href='https://discordapp.com/channels/@me/${main.social.discord}'>discord/${main.social.github}</a>`;
about.push(string);

string = '';
string = "";
string += SPACE.repeat(2);
string += instagram;
string += SPACE.repeat(17 - INSTAGRAM.length);
string += `<a target='_blank' href='https://www.instagram.com/${main.social.instagram}'>instagram/${main.social.instagram}</a>`;
about.push(string);

about.push("<br>");
return about
}
return about;
};

export const ABOUT = createAbout();
18 changes: 12 additions & 6 deletions modules/commands/banner.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import main from '../../main.json' assert {type: 'json'};
import main from "../../main.json" assert { type: "json" };

const createBanner = (): string[] => {
const banner: string[] = [];

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

main.ascii.forEach((ele) => {
let bannerString = "";
Expand All @@ -20,18 +20,24 @@ const createBanner = (): string[] => {
let eleToPush = `<pre>${bannerString}</pre>`;

banner.push(eleToPush);

});

banner.push("<br>");

banner.push("Welcome To My Portfolio");
banner.push("Type <span class='command'>'help'</span> for a list of all available commands.");
banner.push(`Type <span class='command'>'curl repo'</span> to view the GitHub repository or click <a href='${main.repository}' target='_blank'>here</a>.`);
banner.push(
"Type <span class='command'>'help'</span> for a list of all available commands."
);
banner.push(
`Type <span class='command'>'curl repo'</span> to view the GitHub repository or click <a href='${main.repository}' target='_blank'>here</a>.`
);
banner.push(
`Type <span class='command'>'letmesleep'</span> to visit my Brain-Dump a.k.a my Blog or click <a href='${main.braindump}' target='_blank'>here</a>.`
);

banner.push("<br>");

return banner;
}
};

export const BANNER = createBanner();
53 changes: 18 additions & 35 deletions modules/commands/help.ts
Original file line number Diff line number Diff line change
@@ -1,39 +1,20 @@
const helpObj = {
"commands": [
[
"'cat about.me'",
"About Me",
],
[
"'ls -la projects'",
"What did I cook?"
],
[
"'whoami'",
"A very intriguing question."
],
[
"'curl repo'",
"View the Github Repo."
],
["'neofetch'",
"Display the banner."
],
[
"'clear'",
"Clear the terminal."
],
[
"'roasted'",
"It's all on you, don't come crying to me."
],
commands: [
["'letmesleep'", "Visit my Brain-Dump"],
["'cat about.me'", "About Me"],
["'ls -la projects'", "What did I cook?"],
["'whoami'", "A very intriguing question."],
["'curl repo'", "View the Github Repo."],
["'neofetch'", "Display the banner."],
["'clear'", "Clear the terminal."],
["'roasted'", "It's all on you, don't come crying to me."],
],
}
};

const createHelp = (): string[] => {
const help: string[] = []
const help: string[] = [];

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

helpObj.commands.forEach((ele) => {
const SPACE = "&nbsp;";
Expand All @@ -47,17 +28,19 @@ const createHelp = (): string[] => {
string += ele[1];

help.push(string);
})
});

help.push("<br>");

help.push("Press <span class='keys'>[Tab]</span> for auto completion.");
help.push("Press <span class='keys'>[Esc]</span> to clear the input line.");
help.push("Press <span class='keys'>[↑][↓]</span> to scroll through your history of commands.");
help.push(
"Press <span class='keys'>[↑][↓]</span> to scroll through your history of commands."
);

help.push("<br>");

return help
}
return help;
};

export const HELP = createHelp();

0 comments on commit f334865

Please sign in to comment.