1
0
Fork 0
mirror of https://github.com/dilllxd/gitfolio.git synced 2024-08-14 22:28:09 +00:00

Remove support for Telegram, LinkedIn and Medium

This commit is contained in:
K4USTU3H 2019-12-08 21:53:21 +05:30
parent 517e20f9e5
commit efe64030d5
6 changed files with 19 additions and 61 deletions

View file

@ -42,12 +42,9 @@ program
.option("-f, --fork", "includes forks with repos") .option("-f, --fork", "includes forks with repos")
.option("-s, --sort [sort]", "set default sort for repository", "created") .option("-s, --sort [sort]", "set default sort for repository", "created")
.option("-o, --order [order]", "set default order on sort", "asc") .option("-o, --order [order]", "set default order on sort", "asc")
.option("-w, --twitter [username]", "specify twitter username")
.option("-l, --linkedin [username]", "specify linkedin username")
.option("-m, --medium [username]", "specify medium username")
.option("-d, --dribbble [username]", "specify dribbble username") .option("-d, --dribbble [username]", "specify dribbble username")
.option("-T, --telegram [username]", "specify telegram username")
.option("-e, --email [username]", "specify email") .option("-e, --email [username]", "specify email")
.option("-T, --twitter [username]", "specify twitter username")
.action(buildCommand); .action(buildCommand);
program program

View file

@ -96,12 +96,9 @@ async function buildCommand(username, program)
order: program.order, order: program.order,
includeFork: program.fork ? true : false, includeFork: program.fork ? true : false,
types, types,
twitter: program.twitter,
linkedin: program.linkedin,
medium: program.medium,
dribbble: program.dribbble, dribbble: program.dribbble,
telegram: program.telegram, email: program.email,
email: program.email twitter: program.twitter
}; };
await populateConfig(opts); await populateConfig(opts);

View file

@ -50,12 +50,9 @@ module.exports.updateHTML = (username, opts) =>
const const
{ {
includeFork, includeFork,
twitter,
linkedin,
medium,
dribbble, dribbble,
telegram, email,
email twitter
} = opts; } = opts;
//add data to assets/index.html //add data to assets/index.html
jsdom jsdom
@ -166,24 +163,15 @@ module.exports.updateHTML = (username, opts) =>
user.hireable == false || !user.hireable ? "none" : "block" user.hireable == false || !user.hireable ? "none" : "block"
};"><i class="mdi mdi-account-tie"></i> &nbsp;&nbsp; Available for hire</span> };"><i class="mdi mdi-account-tie"></i> &nbsp;&nbsp; Available for hire</span>
<div class="socials"> <div class="socials">
<span style="display:${
twitter == null ? "none !important" : "block"
};"><a href="https://www.twitter.com/${twitter}" target="_blank" class="socials"><i class="mdi mdi-twitter"></i></a></span>
<span style="display:${ <span style="display:${
dribbble == null ? "none !important" : "block" dribbble == null ? "none !important" : "block"
};"><a href="https://www.dribbble.com/${dribbble}" target="_blank" class="socials"><i class="mdi mdi-dribbble"></i></a></span> };"><a href="https://www.dribbble.com/${dribbble}" target="_blank" class="socials"><i class="mdi mdi-dribbble"></i></a></span>
<span style="display:${
linkedin == null ? "none !important" : "block"
};"><a href="https://www.linkedin.com/in/${linkedin}/" target="_blank" class="socials"><i class="mdi mdi-linkedin"></i></a></span>
<span style="display:${
medium == null ? "none !important" : "block"
};"><a href="https://www.medium.com/@${medium}/" target="_blank" class="socials"><i class="mdi mdi-medium"></i></a></span>
<span style="display:${
telegram == null ? "none !important" : "block"
};"><a href="https://t.me/@${telegram}" target="_blank" class="socials"><i class="mdi mdi-telegram"></i></a></span>
<span style="display:${ <span style="display:${
email == null ? "none !important" : "block" email == null ? "none !important" : "block"
};"><a href="mailto:${email}" target="_blank" class="socials"><i class="mdi mdi-email"></i></a></span> };"><a href="mailto:${email}" target="_blank" class="socials"><i class="mdi mdi-email"></i></a></span>
<span style="display:${
twitter == null ? "none !important" : "block"
};"><a href="https://www.twitter.com/${twitter}" target="_blank" class="socials"><i class="mdi mdi-twitter"></i></a></span>
</div> </div>
`; `;
//add data to config.json //add data to config.json

12
ui.js
View file

@ -69,12 +69,9 @@ function uiCommand()
let order = req.body.order ? req.body.order : "asc"; let order = req.body.order ? req.body.order : "asc";
let includeFork = req.body.fork == "true" ? true : false; let includeFork = req.body.fork == "true" ? true : false;
let types = ["owner"]; let types = ["owner"];
let twitter = req.body.twitter ? req.body.twitter : null;
let linkedin = req.body.linkedin ? req.body.linkedin : null;
let medium = req.body.medium ? req.body.medium : null;
let dribbble = req.body.dribbble ? req.body.dribbble : null; let dribbble = req.body.dribbble ? req.body.dribbble : null;
let telegram = req.body.telegram ? req.body.telegram : null;
let email = req.body.email ? req.body.email : null; let email = req.body.email ? req.body.email : null;
let twitter = req.body.twitter ? req.body.twitter : null;
let background = req.body.background ? let background = req.body.background ?
req.body.background : req.body.background :
"https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1500&q=80"; "https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1500&q=80";
@ -84,12 +81,9 @@ function uiCommand()
order: order, order: order,
includeFork: includeFork, includeFork: includeFork,
types, types,
twitter: twitter,
linkedin: linkedin,
medium: medium,
dribbble: dribbble, dribbble: dribbble,
telegram: telegram, email: email,
email: email twitter: twitter
}; };
updateHTML(username, opts); updateHTML(username, opts);

View file

@ -23,12 +23,9 @@ async function updateCommand()
order: data[0].order, order: data[0].order,
includeFork: data[0].includeFork, includeFork: data[0].includeFork,
types: data[0].types, types: data[0].types,
twitter: data[0].twitter,
linkedin: data[0].linkedin,
medium: data[0].medium,
dribbble: data[0].dribbble, dribbble: data[0].dribbble,
telegram: data[0].telegram, email: data[0].email,
email: data[0].email twitter: data[0].twitter
}; };
updateHTML(username, opts); updateHTML(username, opts);
} }

View file

@ -116,36 +116,21 @@
</label> </label>
<div style="display: none" <div style="display: none"
id="input_for_socials"> id="input_for_socials">
<input type="text"
class="input h-weight-bold"
placeholder="twitter username"
id="twitter"
name="twitter" /><br />
<input type="text"
class="input h-weight-bold"
placeholder="medium username"
id="medium"
name="medium" /><br />
<input type="text" <input type="text"
class="input h-weight-bold" class="input h-weight-bold"
placeholder="dribbble username" placeholder="dribbble username"
id="dribbble" id="dribbble"
name="dribbble" /><br /> name="dribbble" /><br />
<input type="text"
class="input h-weight-bold"
placeholder="linkedin username"
id="linkedin"
name="linkedin" /><br />
<input type="text"
class="input h-weight-bold"
placeholder="telegram username"
id="telegram"
name="telegram" /><br />
<input type="text" <input type="text"
class="input h-weight-bold" class="input h-weight-bold"
placeholder="email address" placeholder="email address"
id="email" id="email"
name="email" /> name="email" /><br />
<input type="text"
class="input h-weight-bold"
placeholder="twitter username"
id="twitter"
name="twitter" />
</div> </div>
<br /><br /> <br /><br />
<button type="submit" <button type="submit"