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

Add support for Codepen, Dev.to and Instagram

This commit is contained in:
K4USTU3H 2019-12-08 22:44:52 +05:30
parent efe64030d5
commit 0e1b7ba9af
7 changed files with 44 additions and 2 deletions

View file

@ -8,7 +8,7 @@ cache:
before_script: before_script:
- npm install -g - npm install -g
script: script:
- gitfolio build k4ustu3h --fork --theme dark --sort updated --twitter k4ustu3h_ --dribbble k4ustu3h --email k4ustu3h@gmail.com - gitfolio build k4ustu3h --fork --theme dark --sort updated --twitter k4ustu3h_ --dribbble k4ustu3h --email k4ustu3h@gmail.com --codepen k4ustu3h --dev k4ustu3h --instagram k4ustu3h
deploy: deploy:
provider: pages provider: pages
skip_cleanup: true skip_cleanup: true

View file

@ -42,8 +42,11 @@ 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("-d, --dribbble [username]", "specify dribbble username") .option("-c, --codepen [username]", "specify codepen username")
.option("-d, --dev [username]", "specify dev username")
.option("-D, --dribbble [username]", "specify dribbble username")
.option("-e, --email [username]", "specify email") .option("-e, --email [username]", "specify email")
.option("-i, --instagram [username]", "specify instagram username")
.option("-T, --twitter [username]", "specify twitter username") .option("-T, --twitter [username]", "specify twitter username")
.action(buildCommand); .action(buildCommand);

View file

@ -96,8 +96,11 @@ async function buildCommand(username, program)
order: program.order, order: program.order,
includeFork: program.fork ? true : false, includeFork: program.fork ? true : false,
types, types,
codepen: program.codepen,
dev: program.dev,
dribbble: program.dribbble, dribbble: program.dribbble,
email: program.email, email: program.email,
instagram: program.instagram,
twitter: program.twitter twitter: program.twitter
}; };

View file

@ -50,8 +50,11 @@ module.exports.updateHTML = (username, opts) =>
const const
{ {
includeFork, includeFork,
codepen,
dev,
dribbble, dribbble,
email, email,
instagram,
twitter twitter
} = opts; } = opts;
//add data to assets/index.html //add data to assets/index.html
@ -163,12 +166,21 @@ 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:${
codepen == null ? "none !important" : "block"
};"><a href="https://codepen.io/${codepen}" target="_blank" class="socials"><i class="mdi mdi-codepen"></i></a></span>
<span style="display:${
dev == null ? "none !important" : "block"
};"><a href="https://dev.to/${dev}" target="_blank" class="socials"><i class="mdi mdi-dev-to"></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:${ <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:${
instagram == null ? "none !important" : "block"
};"><a href="https://www.instagram.com/${instagram}" target="_blank" class="socials"><i class="mdi mdi-instagram"></i></a></span>
<span style="display:${ <span style="display:${
twitter == null ? "none !important" : "block" twitter == null ? "none !important" : "block"
};"><a href="https://www.twitter.com/${twitter}" target="_blank" class="socials"><i class="mdi mdi-twitter"></i></a></span> };"><a href="https://www.twitter.com/${twitter}" target="_blank" class="socials"><i class="mdi mdi-twitter"></i></a></span>

6
ui.js
View file

@ -69,8 +69,11 @@ 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 codepen = req.body.codepen ? req.body.codepen : null;
let dev = req.body.dev ? req.body.dev : null;
let dribbble = req.body.dribbble ? req.body.dribbble : null; let dribbble = req.body.dribbble ? req.body.dribbble : null;
let email = req.body.email ? req.body.email : null; let email = req.body.email ? req.body.email : null;
let instagram = req.body.instagram ? req.body.instagram : null;
let twitter = req.body.twitter ? req.body.twitter : 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 :
@ -81,8 +84,11 @@ function uiCommand()
order: order, order: order,
includeFork: includeFork, includeFork: includeFork,
types, types,
codepen: codepen,
dev: dev,
dribbble: dribbble, dribbble: dribbble,
email: email, email: email,
instagram: instagram,
twitter: twitter twitter: twitter
}; };

View file

@ -23,8 +23,11 @@ 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,
codepen: data[0].codepen,
dev: data[0].dev,
dribbble: data[0].dribbble, dribbble: data[0].dribbble,
email: data[0].email, email: data[0].email,
instagram: data[0].instagram,
twitter: data[0].twitter twitter: data[0].twitter
}; };
updateHTML(username, opts); updateHTML(username, opts);

View file

@ -116,6 +116,16 @@
</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="codepen username"
id="codepen"
name="codepen" /><br />
<input type="text"
class="input h-weight-bold"
placeholder="dev username"
id="dev"
name="dev" /><br />
<input type="text" <input type="text"
class="input h-weight-bold" class="input h-weight-bold"
placeholder="dribbble username" placeholder="dribbble username"
@ -126,6 +136,11 @@
placeholder="email address" placeholder="email address"
id="email" id="email"
name="email" /><br /> name="email" /><br />
<input type="text"
class="input h-weight-bold"
placeholder="instagram username"
id="instagram"
name="instagram" />
<input type="text" <input type="text"
class="input h-weight-bold" class="input h-weight-bold"
placeholder="twitter username" placeholder="twitter username"