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

Add support for Medium, Stack Exchange and Steam

This commit is contained in:
Kaustubh Ladiya 2020-02-11 22:12:25 +05:30
parent 22541b9b3a
commit fc03761011
No known key found for this signature in database
GPG key ID: A77FFE5465BD4E7D
7 changed files with 58 additions and 7 deletions

View file

@ -26,6 +26,7 @@ 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("-c, --codepen [username]", "specify codepen username")
.option("-d, --dev [username]", "specify dev username")
.option("-D, --dribbble [username]", "specify dribbble username")
@ -33,7 +34,10 @@ program
.option("-F, --facebook [username]", "specify facebook username")
.option("-i, --instagram [username]", "specify instagram username")
.option("-k, --keybase [username]", "specify keybase username")
.option("-m, --medium [username]", "specify medium username")
.option("-r, --reddit [username]", "specify reddit username")
.option("-E, --stackexchange [user id]", "specify stackexchange user id")
.option("-S, --steam [username]", "specify steam username")
.option("-T, --telegram [username]", "specify telegram username")
.option("-w, --twitter [username]", "specify twitter username")
.option("-x, --xda [user id]", "specify xda user id")

View file

@ -86,7 +86,10 @@ async function buildCommand(username, program) {
facebook: program.facebook,
instagram: program.instagram,
keybase: program.keybase,
medium: program.medium,
reddit: program.reddit,
stackexchange: program.stackexchange,
steam: program.steam,
telegram: program.telegram,
twitter: program.twitter,
xda: program.xda

View file

@ -5,7 +5,7 @@
"main": "build.js",
"bin": "bin/gitfolio.js",
"scripts": {
"build": "OUT_DIR='./dist' node bin/gitfolio.js build k4ustu3h -f -t dark -s updated -c k4ustu3h -d k4ustu3h -D k4ustu3h -e k4ustu3h@gmail.com -F k4ustu3h -i k4ustu3h_ -k k4ustu3h -r kaustubhladiya -T k4ustu3h -w k4ustu3h_ -x 9461231",
"build": "OUT_DIR='./dist' node bin/gitfolio.js build k4ustu3h -f -t dark -s updated -c k4ustu3h -d k4ustu3h -D k4ustu3h -e k4ustu3h@gmail.com -F k4ustu3h -i k4ustu3h_ -k k4ustu3h -m k4ustu3h -r kaustubhladiya -E 16727002 -S k4ustu3h -T k4ustu3h -w k4ustu3h_ -x 9461231",
"cli": "OUT_DIR='./dist' node bin/gitfolio.js",
"clean": "rm -rf ./dist/*",
"prettier": "prettier --write \"./**/*.{js,jsx,json,html,css,md}\"",

View file

@ -40,7 +40,10 @@ module.exports.updateHTML = (username, opts) => {
facebook,
instagram,
keybase,
medium,
reddit,
stackexchange,
steam,
telegram,
twitter,
xda
@ -152,14 +155,13 @@ module.exports.updateHTML = (username, opts) => {
<div class="socials">
<span style="display:${
codepen == null ? "none !important" : "block"
};"><a href="https://codepen.io/${codepen}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-codepen"></span></a></span>
};"><a href="https://codepen.io/${codepen}" target="_blank" class="socials"><span class="iconify" data-icon="simple-icons:codepen"></span></a></span>
<span style="display:${
dev == null ? "none !important" : "block"
};"><a href="https://dev.to/${dev}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-dev-to"></span></a></span>
<span style="display:${
dribbble == null ? "none !important" : "block"
};"><a href="https://www.dribbble.com/${dribbble}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-dribbble"></span></a></span>
<span style="display:${
facebook == null ? "none !important" : "block"
};"><a href="https://facebook.com/${facebook}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-facebook-box"></span></a></span>
@ -168,12 +170,19 @@ module.exports.updateHTML = (username, opts) => {
};"><a href="https://www.instagram.com/${instagram}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-instagram"></span></a></span>
<span style="display:${
keybase == null ? "none !important" : "block"
};"><a href="https://keybase.io/${keybase}" target="_blank" class="socials"><span class="iconify" data-icon="simple-icons:keybase"></span>
</a>
</span>
};"><a href="https://keybase.io/${keybase}" target="_blank" class="socials"><span class="iconify" data-icon="simple-icons:keybase"></span></a></span>
<span style="display:${
medium == null ? "none !important" : "block"
};"><a href="https://medium.com/@${medium}" target="_blank" class="socials"><span class="iconify" data-icon="fa-brands:medium-m"></span></a></span>
<span style="display:${
reddit == null ? "none !important" : "block"
};"><a href="https://www.reddit.com/u/${reddit}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-reddit"></span></a></span>
};"><a href="https://www.reddit.com/u/${reddit}" target="_blank" class="socials"><span class="iconify" data-icon="fa:reddit-alien"></span></a></span>
<span style="display:${
stackexchange == null ? "none !important" : "block"
};"><a href="https://stackexchange.com/users/${stackexchange}" target="_blank" class="socials"><span class="iconify" data-icon="mdi:stack-exchange"></span></a></span>
<span style="display:${
steam == null ? "none !important" : "block"
};"><a href="https://steamcommunity.com/id/${steam}" target="_blank" class="socials"><span class="iconify" data-icon="mdi:steam"></span></a></span>
<span style="display:${
telegram == null ? "none !important" : "block"
};"><a href="https://t.me/${telegram}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-telegram"></span></a></span>

8
ui.js
View file

@ -58,7 +58,12 @@ function uiCommand() {
const facebook = req.body.facebook ? req.body.facebook : null;
const instagram = req.body.instagram ? req.body.instagram : null;
const keybase = req.body.keybase ? req.body.keybase : null;
const medium = req.body.medium ? req.body.medium : null;
const reddit = req.body.reddit ? req.body.reddit : null;
const stackexchange = req.body.stackexchange
? req.body.stackexchange
: null;
const steam = req.body.steam ? req.body.steam : null;
const telegram = req.body.telegram ? req.body.telegram : null;
const twitter = req.body.twitter ? req.body.twitter : null;
const xda = req.body.xda ? req.body.xda : null;
@ -78,7 +83,10 @@ function uiCommand() {
facebook,
instagram,
keybase,
medium,
reddit,
stackexchange,
steam,
telegram,
twitter,
xda

View file

@ -23,7 +23,10 @@ async function updateCommand() {
facebook: data[0].facebook,
instagram: data[0].instagram,
keybase: data[0].keybase,
medium: data[0].medium,
reddit: data[0].reddit,
stackexchange: data[0].stackexchange,
steam: data[0].steam,
telegram: data[0].telegram,
twitter: data[0].twitter,
xda: data[0].xda

View file

@ -162,6 +162,14 @@
name="keybase"
/>
<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"
@ -170,6 +178,22 @@
name="reddit"
/>
<br />
<input
type="text"
class="input h-weight-bold"
placeholder="stackexchange username"
id="stackexchange"
name="stackexchange"
/>
<br />
<input
type="text"
class="input h-weight-bold"
placeholder="steam username"
id="steam"
name="steam"
/>
<br />
<input
type="text"
class="input h-weight-bold"