Switch to Iconify and add XDA Developers

This commit is contained in:
Kaustubh Ladiya 2020-02-04 22:35:22 +05:30
parent 523521ea35
commit 1226782b7f
No known key found for this signature in database
GPG Key ID: A77FFE5465BD4E7D
9 changed files with 55 additions and 111 deletions

View File

@ -383,80 +383,9 @@ body {
background: var(--text-color);
}
/* Material Icons */
.mdi::before {
/* Iconify */
.iconify {
font-size: 24px;
line-height: 14px;
}
.btn .mdi::before {
position: relative;
top: 4px;
}
.btn-xs .mdi::before {
font-size: 18px;
top: 3px;
}
.btn-sm .mdi::before {
font-size: 18px;
top: 3px;
}
.dropdown-menu .mdi {
width: 18px;
}
.dropdown-menu .mdi::before {
left: -8px;
position: relative;
top: 4px;
}
.nav .mdi::before {
position: relative;
top: 4px;
}
.navbar .navbar-toggle .mdi::before {
color: #fff;
position: relative;
top: 4px;
}
.breadcrumb .mdi::before {
position: relative;
top: 4px;
}
.breadcrumb a:hover {
text-decoration: none;
}
.breadcrumb a:hover span {
text-decoration: underline;
}
.alert .mdi::before {
margin-right: 2px;
position: relative;
top: 4px;
}
.input-group-addon .mdi::before {
position: relative;
top: 3px;
}
.navbar-brand .mdi::before {
margin-right: 2px;
position: relative;
top: 2px;
}
.list-group-item .mdi::before {
left: -3px;
position: relative;
top: 3px;
}

View File

@ -6,10 +6,7 @@
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<meta name="p:domain_verify" content="888d983503e053f3db87d36354df7eef" />
<title></title>
<link
rel="stylesheet"
href="https://cdn.materialdesignicons.com/4.8.95/css/materialdesignicons.min.css"
/>
<script src="https://code.iconify.design/1/1.0.4/iconify.min.js"></script>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="

View File

@ -23,19 +23,20 @@ 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 [email]", "specify email")
.option("-f, --facebook [username]", "specify facebook username")
.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")
.option("-T, --telegram [username]", "specify telegram username")
.option("-w, --twitter [username]", "specify twitter username")
.option("-x, --xda [user id]", "specify xda user id")
.action(buildCommand);
program

View File

@ -94,7 +94,8 @@ async function buildCommand(username, program) {
keybase: program.keybase,
reddit: program.reddit,
telegram: program.telegram,
twitter: program.twitter
twitter: program.twitter,
xda: program.xda
};
await populateConfig(opts);

View File

@ -5,7 +5,7 @@
"main": "build.js",
"bin": "bin/gitfolio.js",
"scripts": {
"build": "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",
"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",
"cli": "OUT_DIR='./dist' node bin/gitfolio.js",
"clean": "rm -rf ./dist/*",
"prettier": "prettier --write \"./**/*.{js,jsx,json,html,css,md}\"",

View File

@ -42,7 +42,8 @@ module.exports.updateHTML = (username, opts) => {
keybase,
reddit,
telegram,
twitter
twitter,
xda
} = opts;
//add data to assets/index.html
jsdom
@ -81,13 +82,13 @@ module.exports.updateHTML = (username, opts) => {
repos[i].language == null
? "none"
: "inline-block"
};"><i class="mdi mdi-code-tags"></i>&nbsp; ${
};"><span class="iconify" data-icon="mdi-code-tags"></span>&nbsp; ${
repos[i].language
}</span>
<span><i class="mdi mdi-star"></i>&nbsp; ${
<span><span class="iconify" data-icon="mdi-star"></span>&nbsp; ${
repos[i].stargazers_count
}</span>
<span><i class="mdi mdi-source-branch"></i>&nbsp; ${
<span><span class="iconify" data-icon="mdi-source-fork"></span>&nbsp; ${
repos[i].forks_count
}</span>
</div>
@ -127,60 +128,61 @@ module.exports.updateHTML = (username, opts) => {
document.getElementById("about").innerHTML = `
<span style="display:${
user.company == null || !user.company ? "none" : "block"
};"><i class="mdi-face"></i> &nbsp; ${user.company}</span>
};"><span class="iconify" data-icon="mdi-face"></span> &nbsp; ${
user.company
}</span>
<span style="display:block;"><a href="${
user.html_url
}"><i class="mdi mdi-github-circle"></i>&nbsp;&nbsp;@${
}"><span class="iconify" data-icon="mdi-github-circle"></span>&nbsp;&nbsp;@${
user.login
}</a></span>
<span style="display:${
email == null ? "none !important" : "block"
};"><a href="mailto:${email}" target="_blank" class="socials"><i class="mdi mdi-email"></i>&nbsp;&nbsp;${email}</a></span>
};"><a href="mailto:${email}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-email"></span>&nbsp;&nbsp;${email}</a></span>
<span style="display:${
user.location == null || !user.location ? "none" : "block"
};"><a href="https://www.google.com/maps/search/?api=1&query=${
user.location
}"<i class="mdi mdi-map-marker"></i>&nbsp;&nbsp;${
}"><span class="iconify" data-icon="mdi-map-marker"></span>&nbsp;&nbsp;${
user.location
}</a></span>
<span style="display:${
user.hireable == false || !user.hireable ? "none" : "block"
};"><i class="mdi mdi-account-tie"></i> &nbsp;&nbsp; Available for hire</span>
};"><span class="iconify" data-icon="mdi-account-tie"></span> &nbsp;&nbsp; Available for hire</span>
<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>
};"><a href="https://codepen.io/${codepen}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-codepen"></span></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>
};"><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"><i class="mdi mdi-dribbble"></i></a></span>
};"><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"><i class="mdi mdi-facebook-box"></i></a></span>
};"><a href="https://facebook.com/${facebook}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-facebook-box"></span></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>
};"><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"><svg height="24" width="24" viewBox="0 0 448 512">
<path
fill="currentColor"
d="M286.17 419a18 18 0 1 0 18 18 18 18 0 0 0-18-18zm111.92-147.6c-9.5-14.62-39.37-52.45-87.26-73.71q-9.1-4.06-18.38-7.27a78.43 78.43 0 0 0-47.88-104.13c-12.41-4.1-23.33-6-32.41-5.77-.6-2-1.89-11 9.4-35L198.66 32l-5.48 7.56c-8.69 12.06-16.92 23.55-24.34 34.89a51 51 0 0 0-8.29-1.25c-41.53-2.45-39-2.33-41.06-2.33-50.61 0-50.75 52.12-50.75 45.88l-2.36 36.68c-1.61 27 19.75 50.21 47.63 51.85l8.93.54a214 214 0 0 0-46.29 35.54C14 304.66 14 374 14 429.77v33.64l23.32-29.8a148.6 148.6 0 0 0 14.56 37.56c5.78 10.13 14.87 9.45 19.64 7.33 4.21-1.87 10-6.92 3.75-20.11a178.29 178.29 0 0 1-15.76-53.13l46.82-59.83-24.66 74.11c58.23-42.4 157.38-61.76 236.25-38.59 34.2 10.05 67.45.69 84.74-23.84.72-1 1.2-2.16 1.85-3.22a156.09 156.09 0 0 1 2.8 28.43c0 23.3-3.69 52.93-14.88 81.64-2.52 6.46 1.76 14.5 8.6 15.74 7.42 1.57 15.33-3.1 18.37-11.15C429 443 434 414 434 382.32c0-38.58-13-77.46-35.91-110.92zM142.37 128.58l-15.7-.93-1.39 21.79 13.13.78a93 93 0 0 0 .32 19.57l-22.38-1.34a12.28 12.28 0 0 1-11.76-12.79L107 119c1-12.17 13.87-11.27 13.26-11.32l29.11 1.73a144.35 144.35 0 0 0-7 19.17zm148.42 172.18a10.51 10.51 0 0 1-14.35-1.39l-9.68-11.49-34.42 27a8.09 8.09 0 0 1-11.13-1.08l-15.78-18.64a7.38 7.38 0 0 1 1.34-10.34l34.57-27.18-14.14-16.74-17.09 13.45a7.75 7.75 0 0 1-10.59-1s-3.72-4.42-3.8-4.53a7.38 7.38 0 0 1 1.37-10.34L214 225.19s-18.51-22-18.6-22.14a9.56 9.56 0 0 1 1.74-13.42 10.38 10.38 0 0 1 14.3 1.37l81.09 96.32a9.58 9.58 0 0 1-1.74 13.44zM187.44 419a18 18 0 1 0 18 18 18 18 0 0 0-18-18z"></path>
</svg>
};"><a href="https://keybase.io/${keybase}" target="_blank" class="socials"><span class="iconify" data-icon="simple-icons:keybase"></span>
</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>
};"><a href="https://www.reddit.com/u/${reddit}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-reddit"></span></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>
};"><a href="https://t.me/${telegram}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-telegram"></span></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>
};"><a href="https://www.twitter.com/${twitter}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-twitter"></span></a></span>
<span style="display:${
xda == null ? "none !important" : "block"
};"><a href="https://forum.xda-developers.com/member.php?u=${xda}" target="_blank" class="socials"><span class="iconify" data-icon="mdi-xda"></span></a></span>
</div>
`;
//add data to config.json

4
ui.js
View File

@ -61,6 +61,7 @@ function uiCommand() {
const reddit = req.body.reddit ? req.body.reddit : 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;
const background = req.body.background
? req.body.background
: "https://source.unsplash.com/1280x720/?wallpaper";
@ -79,7 +80,8 @@ function uiCommand() {
keybase,
reddit,
telegram,
twitter
twitter,
xda
};
updateHTML(username, opts);

View File

@ -25,7 +25,8 @@ async function updateCommand() {
keybase: data[0].keybase,
reddit: data[0].reddit,
telegram: data[0].telegram,
twitter: data[0].twitter
twitter: data[0].twitter,
xda: data[0].xda
};
updateHTML(username, opts);
}

View File

@ -170,11 +170,14 @@
name="reddit"
/>
<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="telegram username"
id="telegram"
name="telegram"
/>
<br />
<input
type="text"
class="input h-weight-bold"
@ -182,6 +185,14 @@
id="twitter"
name="twitter"
/>
<br />
<input
type="text"
class="input h-weight-bold"
placeholder="xda user id"
id="xda"
name="xda"
/>
</div>
<br />
<br />