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

Add support for Facebook

This commit is contained in:
Kaustubh Ladiya 2020-01-14 17:38:00 +05:30
parent f8ec76b7b6
commit 5218c959c8
No known key found for this signature in database
GPG key ID: A77FFE5465BD4E7D
7 changed files with 19 additions and 2 deletions

View file

@ -23,13 +23,14 @@ program
)
.option("-t, --theme [theme]", "specify a theme to use", "light")
.option("-b, --background [background]", "set the background image")
.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("-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")
.option("-e, --email [username]", "specify email")
.option("-f, --facebook [username]", "specify facebook username")
.option("-i, --instagram [username]", "specify instagram username")
.option("-k, --keybase [username]", "specify keybase username")
.option("-r, --reddit [username]", "specify reddit username")

View file

@ -84,6 +84,7 @@ async function buildCommand(username, program) {
dev: program.dev,
dribbble: program.dribbble,
email: program.email,
facebook: program.facebook,
instagram: program.instagram,
keybase: program.keybase,
reddit: program.reddit,

View file

@ -8,7 +8,7 @@
"cli": "OUT_DIR='./dist' node bin/gitfolio.js",
"clean": "rm -rf ./dist/*",
"prettier": "prettier --write \"./**/*.{js,jsx,json,html,css,md}\"",
"test": "OUT_DIR='./dist' node bin/gitfolio.js build k4ustu3h --fork --theme dark --sort updated --twitter k4ustu3h_ --dribbble k4ustu3h --email k4ustu3h@gmail.com --codepen k4ustu3h --dev k4ustu3h --instagram k4ustu3h --telegram k4ustu3h --reddit kaustubhladiya --keybase k4ustu3h"
"test": "OUT_DIR='./dist' node bin/gitfolio.js build k4ustu3h --fork --theme dark --sort updated --twitter k4ustu3h_ --dribbble k4ustu3h --email k4ustu3h@gmail.com --codepen k4ustu3h --dev k4ustu3h --instagram k4ustu3h --telegram k4ustu3h --reddit kaustubhladiya --keybase k4ustu3h --facebook k4ustu3h"
},
"author": {
"name": "@imfunniee and community",

View file

@ -37,6 +37,7 @@ module.exports.updateHTML = (username, opts) => {
dev,
dribbble,
email,
facebook,
instagram,
keybase,
reddit,
@ -154,6 +155,9 @@ module.exports.updateHTML = (username, opts) => {
<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:${
facebook == null ? "none !important" : "block"
};"><a href="https://facebook.com/${facebook}" target="_blank" class="socials"><i class="mdi mdi-facebook-box"></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>

2
ui.js
View file

@ -55,6 +55,7 @@ function uiCommand() {
const dev = req.body.dev ? req.body.dev : null;
const dribbble = req.body.dribbble ? req.body.dribbble : null;
const email = req.body.email ? req.body.email : null;
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 reddit = req.body.reddit ? req.body.reddit : null;
@ -73,6 +74,7 @@ function uiCommand() {
dev,
dribbble,
email,
facebook,
instagram,
keybase,
reddit,

View file

@ -20,6 +20,7 @@ async function updateCommand() {
dev: data[0].dev,
dribbble: data[0].dribbble,
email: data[0].email,
facebook: data[0].facebook,
instagram: data[0].instagram,
keybase: data[0].keybase,
reddit: data[0].reddit,

View file

@ -138,6 +138,14 @@
name="email"
/>
<br />
<input
type="text"
class="input h-weight-bold"
placeholder="facebook username"
id="facebook"
name="facebook"
/>
<br />
<input
type="text"
class="input h-weight-bold"