-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcard.js
executable file
·92 lines (81 loc) · 2.69 KB
/
card.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
#!/usr/bin/env node
'use strict'
const boxen = require("boxen");
const chalk = require("chalk");
const inquirer = require("inquirer");
const clear = require("clear");
const open = require("open");
clear();
const prompt = inquirer.createPromptModule();
const questions = [
{
type: "list",
name: "action",
message: "What do you want to do?",
choices: [
{
name: `Send an ${chalk.bold("email")}?`,
value: () => {
open("mailto:[email protected]");
console.log("\nLooking forward to hearing your message and replying to you!\n");
}
},
{
name: "Exit",
value: () => {
console.log("Good Bye, See ya soon!\n");
}
}
]
}
];
const data = {
name: chalk.bold.green(" Aryaman Gupta"),
handle: chalk.white("@atpug22"),
fact: chalk.hex('#B10000')(' A Lazy Self-Taught Programmer'),
twitter: chalk.hex('#2B65EC')("https://twitter.com/") + chalk.hex("#488AC7")("_ryaman"),
github: chalk.hex('#2B65EC')("https://github.com/") + chalk.hex("#488AC7")("atpug22"),
linkedin: chalk.hex('#2B65EC')("https://linkedin.in/") + chalk.hex("#488AC7")("ryaman"),
labelFact: chalk.hex('#FF6262').bold(""),
labelTwitter: chalk.hex('#EAC117').bold(" Twitter:"),
labelGitHub: chalk.hex('#EAC117').bold(" GitHub:"),
labelLinkedin: chalk.hex('#EAC117').bold(" Linkedin:"),
};
const me = boxen(
[
`${data.name}`,
``,
` ${data.fact}`,
``,
`${data.labelTwitter} ${data.twitter}`,
`${data.labelGitHub} ${data.github}`,
`${data.labelLinkedin} ${data.linkedin}`,
``,
`${chalk.bold(
" Hello! I'm Aryaman, Junior Undergrad from IIT BHU "
)}`,
`${chalk.bold(" Full Stack Web Developer from India, and currently")}`,
`${chalk.bold(
" focussed on Competitive Programming, and excited learner"
)}`,
`${chalk.bold(
" for new things. Send me an email if you want to collab!"
)}`
].join("\n"),
{
margin: 1,
float: 'center',
padding: 1,
borderStyle: "single",
borderColor: "blue"
}
);
console.log(me);
const tip = [
`Tip: ${chalk.cyanBright.bold(
"cmd/ctrl + click"
)} on the links above to open them in your browser.`,
'',
].join("\n");
console.log(tip);
prompt(questions).then(answer => answer.action());