suriya-prakash
Version:
An NPX card of my profile
102 lines (91 loc) • 2.99 kB
JavaScript
;
import boxen from "boxen";
import chalk from "chalk";
import inquirer from "inquirer";
import clear from "clear";
import open from "open";
clear();
const prompt = inquirer.createPromptModule();
const questions = [
{
type: "list",
name: "action",
message: "What do you want to do?",
choices: [
{
name: `📧 Toss an ${chalk.bold("email")}?`,
value: () => {
open("mailto:suriyaprakashj811@gmail.com");
console.log("\nLooking forward to hearing from you! 🖐\n");
},
},
{
name: `🐙 Visit my ${chalk.bold("GitHub")}`,
value: () => {
open("https://github.com/SuriyaPrakash-J");
console.log("\nOpening GitHub profile...\n");
},
},
{
name: `💼 Connect on ${chalk.bold("LinkedIn")}`,
value: () => {
open("https://www.linkedin.com/in/suriyaprakash81/");
console.log("\nOpening LinkedIn profile...\n");
},
},
{
name: "🚪 Exit",
value: () => {
console.log("Goodbye 👋, have a great day!\n");
},
},
],
},
];
const data = {
name: chalk.bold.hex("#EEB58B")(" Suriya Prakash J"),
handle: chalk.white("@suriya-prakash"),
fact: chalk.hex("#a6c90d").bold(
"HTML5, CSS3, JavaScript, React, Git, Bootstrap, NodeJS, SQL, Excel, Power BI, Python"
),
github: chalk.hex("#19c54d")("https://github.com/SuriyaPrakash-J"),
website: chalk.hex("#e6e6e6")("https://github.com/SuriyaPrakash-J"),
linkedin: chalk.hex("#6a61f1")("https://www.linkedin.com/in/suriyaprakash81/"),
npx: chalk.hex("#A1AB00")("npx suriya-prakash"),
labelFact: chalk.hex("#FF6262").bold(" My Skills:"),
labelGitHub: chalk.hex("#59FFC8").bold(" GitHub:"),
labelWebsite: chalk.hex("#59FFC8").bold(" Website:"),
labelLinkedin: chalk.hex("#59FFC8").bold(" Linkedin:"),
labelCard: chalk.hex("#FFF976").bold(" Card:"),
};
const me = boxen(
[
"👨💻",
`${data.name}`,
``,
`${data.labelCard} ${data.npx}`,
``,
`${data.labelGitHub} ${data.github}`,
`${data.labelWebsite} ${data.website}`,
`${data.labelLinkedin} ${data.linkedin}`,
``,
`${data.labelFact} ${data.fact}`,
`${data.handle}`,
``,
chalk.bold("Hi there! I'm Suriya Prakash J 👋"),
chalk.bold("Frontend Developer | Designer | Data Analyst | Content Creator | Editor"),
chalk.bold("Passionate about tech-driven work, design, and real games 🎮."),
chalk.bold("Toss me an email if you want to collab! 😉"),
].join("\n"),
{
margin: 1,
float: "center",
padding: 1,
borderStyle: "double",
borderColor: "#EEB58B",
}
);
// Show the card
console.log(me);
prompt(questions).then((answer) => answer.action());