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

Add support for Reddit

This commit is contained in:
Kaustubh Ladiya 2019-12-15 18:45:08 +05:30
parent a9198c274f
commit 8af465f46e
No known key found for this signature in database
GPG key ID: A77FFE5465BD4E7D
7 changed files with 18 additions and 1 deletions

View file

@ -12,7 +12,7 @@ before_install:
before_script:
- npm install -g
script:
- gitfolio build k4ustu3h --fork --theme dark --sort updated --twitter k4ustu3h_ --dribbble k4ustu3h --email k4ustu3h@gmail.com --codepen k4ustu3h --dev k4ustu3h --instagram k4ustu3h --telegram k4ustu3h
- gitfolio 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
after_success:
- lhci autorun --upload.target=temporary-public-storage --staticDistDir=/home/travis/build/k4ustu3h/gitfolio/dist
deploy:

View file

@ -31,6 +31,7 @@ program
.option("-D, --dribbble [username]", "specify dribbble username")
.option("-e, --email [username]", "specify email")
.option("-i, --instagram [username]", "specify instagram username")
.option("-r, --reddit [username]", "specify reddit username")
.option("-T, --telegram [username]", "specify telegram username")
.option("-w, --twitter [username]", "specify twitter username")
.action(buildCommand);

View file

@ -82,6 +82,7 @@ async function buildCommand(username, program) {
dribbble: program.dribbble,
email: program.email,
instagram: program.instagram,
reddit: program.reddit,
telegram: program.telegram,
twitter: program.twitter
};

View file

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

2
ui.js
View file

@ -56,6 +56,7 @@ function uiCommand() {
let dribbble = req.body.dribbble ? req.body.dribbble : null;
let email = req.body.email ? req.body.email : null;
let instagram = req.body.instagram ? req.body.instagram : null;
let reddit = req.body.reddit ? req.body.reddit : null;
let telegram = req.body.telegram ? req.body.telegram : null;
let twitter = req.body.twitter ? req.body.twitter : null;
let background = req.body.background
@ -72,6 +73,7 @@ function uiCommand() {
dribbble: dribbble,
email: email,
instagram: instagram,
reddit: reddit,
telegram: telegram,
twitter: twitter
};

View file

@ -20,6 +20,7 @@ async function updateCommand() {
dribbble: data[0].dribbble,
email: data[0].email,
instagram: data[0].instagram,
reddit: data[0].reddit,
telegram: data[0].telegram,
twitter: data[0].twitter
};

View file

@ -146,6 +146,14 @@
name="instagram"
/>
<br />
<input
type="text"
class="input h-weight-bold"
placeholder="reddit username"
id="reddit"
name="reddit"
/>
<br />
<input type="text"
class="input h-weight-bold"
placeholder="telegram username"