1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-04-26 16:28:28 -04:00

bump Hugo to 0.86.1

This commit is contained in:
Jake Jarvis 2021-07-30 10:42:27 -04:00
parent 6c6c049491
commit 053e5922c6
Signed by: jake
GPG Key ID: 2B0C9CF251E69A39
153 changed files with 146 additions and 126 deletions

View File

@ -11,65 +11,65 @@ const wrapper = document.getElementById("github-cards");
if (wrapper) {
dayjs.extend(relativeTime); // https://day.js.org/docs/en/plugin/relative-time
// this is a total sh*tshow, but safer than setting one big string via innerHTML :)
const template = (repo) => html`
<a class="repo-name" href="${repo.url}" target="_blank" rel="noopener">${repo.name}</a>
${(() => {
if (repo.description) {
return html`<p class="repo-description">${repo.description}</p>`;
}
})()}
${(() => {
if (repo.language) {
return html`<div class="repo-meta">
<span class="repo-language-color" style="background-color: ${repo.language.color}"></span>
<span>${repo.language.name}</span>
</div>`;
}
})()}
${(() => {
if (repo.stars > 0) {
const starsComma = numeral(repo.stars).format("0,0");
const starsPlural = repo.stars === 1 ? "star" : "stars";
return html`<div class="repo-meta" title="${starsComma} ${starsPlural}">
<svg viewBox="0 0 16 16" height="16" width="16">
<path
fill-rule="evenodd"
d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"
></path>
</svg>
<span>${starsComma}</span>
</div>`;
}
})()}
${(() => {
if (repo.forks > 0) {
const forksComma = numeral(repo.forks).format("0,0");
const forksPlural = repo.forks === 1 ? "fork" : "forks";
return html`<div class="repo-meta" title="${forksComma} ${forksPlural}">
<svg viewBox="0 0 16 16" height="16" width="16">
<path
fill-rule="evenodd"
d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"
></path>
</svg>
<span>${forksComma}</span>
</div>`;
}
})()}
<div class="repo-meta" title="${dayjs(repo.updatedAt).format("MMM D, YYYY h:mm A")}">
<span>Updated ${dayjs(repo.updatedAt).fromNow()}</span>
</div>
`;
fetch("/api/projects/?top")
.then((response) => response.json())
.then((data) => {
data.forEach((repo) => {
// this is a total sh*tshow, but safer than setting one big string via innerHTML :)
const template = (repo) => html`
<a class="repo-name" href="${repo.url}" target="_blank" rel="noopener">${repo.name}</a>
${(() => {
if (repo.description) {
return html`<p class="repo-description">${repo.description}</p>`;
}
})()}
${(() => {
if (repo.language) {
return html`<div class="repo-meta">
<span class="repo-language-color" style="background-color: ${repo.language.color}"></span>
<span>${repo.language.name}</span>
</div>`;
}
})()}
${(() => {
if (repo.stars > 0) {
const starsComma = numeral(repo.stars).format("0,0");
const starsPlural = repo.stars === 1 ? "star" : "stars";
return html`<div class="repo-meta" title="${starsComma} ${starsPlural}">
<svg viewBox="0 0 16 16" height="16" width="16">
<path
fill-rule="evenodd"
d="M8 .25a.75.75 0 01.673.418l1.882 3.815 4.21.612a.75.75 0 01.416 1.279l-3.046 2.97.719 4.192a.75.75 0 01-1.088.791L8 12.347l-3.766 1.98a.75.75 0 01-1.088-.79l.72-4.194L.818 6.374a.75.75 0 01.416-1.28l4.21-.611L7.327.668A.75.75 0 018 .25zm0 2.445L6.615 5.5a.75.75 0 01-.564.41l-3.097.45 2.24 2.184a.75.75 0 01.216.664l-.528 3.084 2.769-1.456a.75.75 0 01.698 0l2.77 1.456-.53-3.084a.75.75 0 01.216-.664l2.24-2.183-3.096-.45a.75.75 0 01-.564-.41L8 2.694v.001z"
></path>
</svg>
<span>${starsComma}</span>
</div>`;
}
})()}
${(() => {
if (repo.forks > 0) {
const forksComma = numeral(repo.forks).format("0,0");
const forksPlural = repo.forks === 1 ? "fork" : "forks";
return html`<div class="repo-meta" title="${forksComma} ${forksPlural}">
<svg viewBox="0 0 16 16" height="16" width="16">
<path
fill-rule="evenodd"
d="M5 3.25a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm0 2.122a2.25 2.25 0 10-1.5 0v.878A2.25 2.25 0 005.75 8.5h1.5v2.128a2.251 2.251 0 101.5 0V8.5h1.5a2.25 2.25 0 002.25-2.25v-.878a2.25 2.25 0 10-1.5 0v.878a.75.75 0 01-.75.75h-4.5A.75.75 0 015 6.25v-.878zm3.75 7.378a.75.75 0 11-1.5 0 .75.75 0 011.5 0zm3-8.75a.75.75 0 100-1.5.75.75 0 000 1.5z"
></path>
</svg>
<span>${forksComma}</span>
</div>`;
}
})()}
<div class="repo-meta" title="${dayjs(repo.updatedAt).format("MMM D, YYYY h:mm A")}">
<span>Updated ${dayjs(repo.updatedAt).fromNow()}</span>
</div>
`;
const div = document.createElement("div");
div.classList.add("github-card");
render(template(repo), div);

View File

@ -1,13 +1,13 @@
import path from "path";
import { fileURLToPath } from "url";
import BrowserSync from "browser-sync";
import del from "del";
import gulp from "gulp";
import { task as execa } from "gulp-execa";
import htmlmin from "gulp-html-minifier-terser";
import imagemin from "gulp-imagemin";
import del from "del";
import BrowserSync from "browser-sync";
// use up-to-date imagemin plugins instead of those bundled with gulp-imagemin:
import imagemin from "gulp-imagemin";
import imageminMozjpeg from "imagemin-mozjpeg";
import imageminPngquant from "imagemin-pngquant";
import imageminGifsicle from "imagemin-gifsicle";

View File

@ -34,7 +34,7 @@
"@fontsource/inter": "4.5.0",
"@fontsource/roboto-mono": "4.5.0",
"@octokit/graphql": "^4.6.4",
"@octokit/graphql-schema": "^10.56.0",
"@octokit/graphql-schema": "^10.57.0",
"@sentry/node": "^6.10.0",
"cross-fetch": "3.1.4",
"dayjs": "1.10.6",
@ -66,7 +66,7 @@
"babel-loader": "^8.2.2",
"babel-plugin-template-html-minifier": "^4.1.0",
"browser-sync": "^2.27.5",
"clean-css": "^5.1.3",
"clean-css": "^5.1.4",
"copy-webpack-plugin": "^9.0.1",
"css-loader": "^6.2.0",
"css-minimizer-webpack-plugin": "^3.0.2",
@ -84,7 +84,7 @@
"gulp-execa": "^3.0.2",
"gulp-html-minifier-terser": "^6.0.1",
"gulp-imagemin": "^7.1.0",
"hugo-extended": "0.84.3",
"hugo-extended": "0.86.1",
"lint-staged": "^11.1.1",
"markdownlint-cli": "~0.28.1",
"mini-css-extract-plugin": "^2.1.0",
@ -113,7 +113,7 @@
"terser": "^5.7.1",
"terser-webpack-plugin": "^5.1.4",
"typescript": "^4.3.5",
"webpack": "^5.47.0",
"webpack": "^5.47.1",
"webpack-assets-manifest": "^5.0.6",
"webpack-bundle-analyzer": "^4.4.2",
"webpack-cli": "^4.7.2",

Binary file not shown.

After

Width:  |  Height:  |  Size: 339 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 324 KiB

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 805 KiB

After

Width:  |  Height:  |  Size: 805 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 856 KiB

After

Width:  |  Height:  |  Size: 856 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 987 KiB

After

Width:  |  Height:  |  Size: 987 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 884 KiB

After

Width:  |  Height:  |  Size: 884 KiB

Some files were not shown because too many files have changed in this diff Show More