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

Updates and Fixes

Updated
  - ejs
  - got
  - handlebars
  - jsdom
  - snyk
  - prettier
  - stylelint
Fixed
  - Manrope font
Added
  - fs-extra
This commit is contained in:
Kaustubh Ladiya 2020-04-22 20:36:51 +05:30
parent d499e36a74
commit e0cd4e7e27
No known key found for this signature in database
GPG key ID: A77FFE5465BD4E7D
8 changed files with 714 additions and 530 deletions

Binary file not shown.

Binary file not shown.

Binary file not shown.

View file

@ -1,9 +1,30 @@
@charset "UTF-8";
@font-face {
font-family: "Manrope VF";
src: url("/assets/fonts/variable/Manrope%5Bwght%5D.ttf")
format("truetype-variations");
font-style: normal;
font-weight: 200 800;
}
@font-face {
font-family: "Manrope";
src: url("/assets/fonts/web/manrope-bold.woff2") format("woff2"),
url("/assets/fonts/otf/manrope-bold.otf") format("opentype");
font-style: normal;
font-weight: 700;
}
body { body {
align-items: center; align-items: center;
background: var(--bg-color); background: var(--bg-color);
color: var(--text-color); color: var(--text-color);
font-family: "Manrope", sans-serif; font-family: "Manrope VF", Manrope, sans-serif;
font-feature-settings: "calt", "liga"; font-feature-settings: "calt", "liga";
font-size: 64px;
font-variation-ligatures: normal;
font-variation-settings: "wght" 500;
font-weight: 700;
margin: 0%; margin: 0%;
max-width: 100vw; max-width: 100vw;
overflow-x: hidden; overflow-x: hidden;
@ -54,8 +75,11 @@ body {
.footer a { .footer a {
color: var(--text-color) !important; color: var(--text-color) !important;
font-family: "Manrope", sans-serif; font-family: "Manrope VF", Manrope, sans-serif;
font-weight: bold; font-feature-settings: "calt", "liga";
font-variation-ligatures: normal;
font-variation-settings: "wght" 500;
font-weight: 700;
text-decoration: none; text-decoration: none;
} }

View file

@ -10,15 +10,11 @@
href="https://fonts.googleapis.com/css?family=Asap|Asap+Condensed&display=swap" href="https://fonts.googleapis.com/css?family=Asap|Asap+Condensed&display=swap"
rel="stylesheet" rel="stylesheet"
/> />
<link
href="https://github.com/sharanda/manrope/raw/master/fonts/web/index.css"
rel="stylesheet"
/>
<script src="https://unpkg.com/magic-grid/dist/magic-grid.min.js"></script> <script src="https://unpkg.com/magic-grid/dist/magic-grid.min.js"></script>
<script src="https://code.iconify.design/1/1.0.4/iconify.min.js"></script> <script src="https://code.iconify.design/1/1.0.6/iconify.min.js"></script>
<script <script
src="https://code.jquery.com/jquery-3.4.1.min.js" src="https://code.jquery.com/jquery-3.5.0.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo=" integrity="sha256-xNzN2a4ltkB44Mc/Jz3pT4iU1cmeR0FkXs4pru/JxaQ="
crossorigin="anonymous" crossorigin="anonymous"
></script> ></script>
<link rel="stylesheet" href="index.css" /> <link rel="stylesheet" href="index.css" />
@ -39,7 +35,7 @@
<h1>Work.</h1> <h1>Work.</h1>
<div class="projects" id="work_section"></div> <div class="projects" id="work_section"></div>
</div> </div>
<div id="forks" style="display:none;"> <div id="forks" style="display: none;">
<h1>Forks.</h1> <h1>Forks.</h1>
<div class="projects" id="forks_section"></div> <div class="projects" id="forks_section"></div>
</div> </div>

View file

@ -5,11 +5,14 @@ const bluebird = require("bluebird");
const hbs = require("handlebars"); const hbs = require("handlebars");
// Creates promise-returning async functions from callback-passed async functions // Creates promise-returning async functions from callback-passed async functions
const fs = bluebird.promisifyAll(require("fs")); const fs = bluebird.promisifyAll(require("fs"));
const fse = require("fs-extra");
const { updateHTML } = require("./populate"); const { updateHTML } = require("./populate");
const { getConfig, outDir } = require("./utils"); const { getConfig, outDir } = require("./utils");
const assetDir = path.resolve(`${__dirname}/assets/`); const assetDir = path.resolve(`${__dirname}/assets/`);
const config = path.join(outDir, "config.json"); const config = path.join(outDir, "config.json");
const tempfont = path.resolve(assetDir, "fonts");
const fonts = path.join(outDir, "assets/fonts");
/** /**
* Creates the stylesheet used by the site from a template stylesheet. * Creates the stylesheet used by the site from a template stylesheet.
@ -19,7 +22,7 @@ const config = path.join(outDir, "config.json");
*/ */
async function populateCSS({ async function populateCSS({
theme = "light", theme = "light",
background = "https://source.unsplash.com/1280x720/?wallpaper" background = "https://source.unsplash.com/1280x720/?wallpaper",
} = {}) { } = {}) {
// Get the theme the user requests. Defaults to 'light' // Get the theme the user requests. Defaults to 'light'
theme = `${theme}.css`; theme = `${theme}.css`;
@ -35,6 +38,9 @@ async function populateCSS({
// Copy over the template CSS stylesheet // Copy over the template CSS stylesheet
await fs.copyFileAsync(template, stylesheet); await fs.copyFileAsync(template, stylesheet);
// Copy Fonts
fse.copySync(tempfont, fonts);
// Get an array of every available theme // Get an array of every available theme
const themes = await fs.readdirAsync(path.join(assetDir, "themes")); const themes = await fs.readdirAsync(path.join(assetDir, "themes"));
@ -48,7 +54,7 @@ async function populateCSS({
themeSource = themeSource.toString("utf-8"); themeSource = themeSource.toString("utf-8");
const themeTemplate = hbs.compile(themeSource); const themeTemplate = hbs.compile(themeSource);
const styles = themeTemplate({ const styles = themeTemplate({
background: `${background}` background: `${background}`,
}); });
// Add the user-specified styles to the new stylesheet // Add the user-specified styles to the new stylesheet
await fs.appendFileAsync(stylesheet, styles); await fs.appendFileAsync(stylesheet, styles);
@ -92,7 +98,7 @@ async function buildCommand(username, program) {
steam: program.steam, steam: program.steam,
telegram: program.telegram, telegram: program.telegram,
twitter: program.twitter, twitter: program.twitter,
xda: program.xda xda: program.xda,
}; };
await populateConfig(opts); await populateConfig(opts);
@ -102,5 +108,5 @@ async function buildCommand(username, program) {
module.exports = { module.exports = {
buildCommand, buildCommand,
populateCSS, populateCSS,
populateConfig populateConfig,
}; };

1173
package-lock.json generated

File diff suppressed because it is too large Load diff

View file

@ -37,19 +37,20 @@
"bluebird": "^3.5.4", "bluebird": "^3.5.4",
"body-parser": "^1.19.0", "body-parser": "^1.19.0",
"commander": "^2.20.0", "commander": "^2.20.0",
"ejs": "^3.0.1", "ejs": "3.0.2",
"express": "^4.17.0", "express": "^4.17.0",
"fs-extra": "9.0.0",
"github-emoji": "^1.1.1", "github-emoji": "^1.1.1",
"got": "10.6.0", "got": "11.0.2",
"handlebars": "^4.7.3", "handlebars": "4.7.6",
"jsdom": "^16.2.1", "jsdom": "16.2.2",
"ncp": "^2.0.0", "ncp": "^2.0.0",
"snyk": "1.299.0" "snyk": "1.307.0"
}, },
"devDependencies": { "devDependencies": {
"eslint": "^6.8.0", "eslint": "^6.8.0",
"prettier": "^1.19.1", "prettier": "2.0.5",
"stylelint": "^13.2.1", "stylelint": "13.3.3",
"stylelint-config-prettier": "^8.0.1", "stylelint-config-prettier": "^8.0.1",
"stylelint-config-standard": "^20.0.0", "stylelint-config-standard": "^20.0.0",
"stylelint-prettier": "^1.1.2" "stylelint-prettier": "^1.1.2"