1
0
Fork 0
mirror of https://github.com/dilllxd/gitfolio.git synced 2024-08-07 18:56:51 +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("-s, --sort [sort]", "set default sort for repository", "created")
.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("-T, --telegram [username]", "specify telegram username")
.option("-e, --email [username]", "specify email")
.option("-T, --twitter [username]", "specify twitter username")
.action(buildCommand);
program

View file

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

View file

@ -50,12 +50,9 @@ module.exports.updateHTML = (username, opts) =>
const
{
includeFork,
twitter,
linkedin,
medium,
dribbble,
telegram,
email
email,
twitter
} = opts;
//add data to assets/index.html
jsdom
@ -166,24 +163,15 @@ module.exports.updateHTML = (username, opts) =>
user.hireable == false || !user.hireable ? "none" : "block"
};"><i class="mdi mdi-account-tie"></i> &nbsp;&nbsp; Available for hire</span>
<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:${
dribbble == null ? "none !important" : "block"
};"><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:${
email == null ? "none !important" : "block"
};"><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>
`;
//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 includeFork = req.body.fork == "true" ? true : false;
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 telegram = req.body.telegram ? req.body.telegram : null;
let email = req.body.email ? req.body.email : null;
let twitter = req.body.twitter ? req.body.twitter : null;
let background = req.body.background ?
req.body.background :
"https://images.unsplash.com/photo-1553748024-d1b27fb3f960?w=1500&q=80";
@ -84,12 +81,9 @@ function uiCommand()
order: order,
includeFork: includeFork,
types,
twitter: twitter,
linkedin: linkedin,
medium: medium,
dribbble: dribbble,
telegram: telegram,
email: email
email: email,
twitter: twitter
};
updateHTML(username, opts);

View file

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

View file

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