1
mirror of https://github.com/jakejarvis/jarv.is.git synced 2025-06-30 07:56:40 -04:00

add real /stats page

This commit is contained in:
2022-04-25 00:04:12 -04:00
parent 07562f625e
commit 7e4f6f1443
5 changed files with 100 additions and 47 deletions

View File

@ -24,3 +24,4 @@ export { default as XOcticon } from "@primer/octicons/build/svg/x-16.svg";
// simple icons: https://simpleicons.org/
export { default as NextjsLogo } from "simple-icons/icons/nextdotjs.svg";
export { default as FathomLogo } from "simple-icons/icons/fathom.svg";

View File

@ -87,6 +87,10 @@ module.exports = (phase, { defaultConfig }) => {
key: "Onion-Location",
value: `${config.onionDomain}/:path*`,
},
{
key: "x-got-milk",
value: "2%",
},
],
},
{
@ -139,11 +143,6 @@ module.exports = (phase, { defaultConfig }) => {
// misc. crap:
{ source: "/resume/", destination: "/static/resume.pdf", permanent: false },
{ source: "/resume.pdf", destination: "/static/resume.pdf", permanent: false },
{
source: "/stats/",
destination: `https://app.usefathom.com/share/${config.fathomSiteId}/${config.siteDomain}`,
permanent: false,
},
{ source: "/jarvis.asc", destination: "/pubkey.asc", permanent: true },
{ source: "/scrabble/:path*", destination: "https://jakejarvis.github.io/scrabble/:path*", permanent: false },
],

View File

@ -18,9 +18,9 @@
"lint": "next lint"
},
"dependencies": {
"@fontsource/comic-neue": "4.5.7",
"@fontsource/comic-neue": "4.5.8",
"@fontsource/inter": "4.5.7",
"@fontsource/roboto-mono": "4.5.5",
"@fontsource/roboto-mono": "4.5.7",
"@giscus/react": "^2.0.3",
"@hcaptcha/react-hcaptcha": "^1.1.1",
"@novnc/novnc": "github:novnc/noVNC#7730814b8d43d24db0894b641317be4b9f683da4",

53
pages/stats.tsx Normal file
View File

@ -0,0 +1,53 @@
import { NextSeo } from "next-seo";
import Content from "../components/Content";
import PageTitle from "../components/PageTitle";
import Link from "../components/Link";
import IFrame from "../components/IFrame";
import { FathomLogo } from "../components/Icons";
import { styled } from "../lib/styles/stitches.config";
import { fathomSiteId, siteDomain } from "../lib/config";
const PoweredBy = styled("p", {
textAlign: "center",
marginBottom: 0,
fontWeight: 475,
});
const FathomIcon = styled(FathomLogo, {
width: "1.2em",
height: "1.2em",
verticalAlign: "-0.2em",
margin: "0 0.15em",
fill: "$text",
});
const Stats = () => (
<>
<NextSeo
title="Stats"
openGraph={{
title: "Stats",
}}
/>
<PageTitle>📈 Stats</PageTitle>
<Content>
<PoweredBy>
Powered by{" "}
<Link href="https://usefathom.com/ref/ZEYG0O" fancy={false}>
<FathomIcon /> Fathom Analytics
</Link>
</PoweredBy>
<IFrame
src={`https://app.usefathom.com/share/${fathomSiteId}/${siteDomain}`}
title="Fathom Analytics dashboard"
height={600}
allowScripts
/>
</Content>
</>
);
export default Stats;

View File

@ -1042,20 +1042,20 @@
minimatch "^3.0.4"
strip-json-comments "^3.1.1"
"@fontsource/comic-neue@4.5.7":
version "4.5.7"
resolved "https://registry.yarnpkg.com/@fontsource/comic-neue/-/comic-neue-4.5.7.tgz#8d96bacf58a06e7a7a4a167512a917984903a951"
integrity sha512-OJR5OlM4Hkvzlt4TKon3ewYb+n6a9FYdqnohTcHV9UDUMpMPMEuNmkAIzd/XhJHiHZUGM+BHqmVpw9QVJNIjeA==
"@fontsource/comic-neue@4.5.8":
version "4.5.8"
resolved "https://registry.yarnpkg.com/@fontsource/comic-neue/-/comic-neue-4.5.8.tgz#269237c1b11d16efa1729a45cdd317799156204d"
integrity sha512-m4Y/o/L8mzAuiWXBHisijMmCHDpHXFMxRyFQ6mDeBlOwlyUU7PB2XdrV6utR/1Y0wPjxa8AZKEYPMy1tBXDURA==
"@fontsource/inter@4.5.7":
version "4.5.7"
resolved "https://registry.yarnpkg.com/@fontsource/inter/-/inter-4.5.7.tgz#f0657c52105ed51e04ac636a25d6016896c5ee9d"
integrity sha512-25k3thupaOEBexuU+jAkGqieKPbuhSuA+sinDwp1iBNhqQPiJ9QHDvsXgoCgCbZ4sGlE8aCwZmSlDJrPdJHNkw==
"@fontsource/roboto-mono@4.5.5":
version "4.5.5"
resolved "https://registry.yarnpkg.com/@fontsource/roboto-mono/-/roboto-mono-4.5.5.tgz#cf80fc625d4fabe82ecb3661be19026e46c674cf"
integrity sha512-krIslwmFMjDHtbSVKZLC6+PM6dOvw26OTm7rE7CrniJ4q5Lbfffx67RAlDI3ee0LsG6gIJd/JXBeUm+RgUsPqg==
"@fontsource/roboto-mono@4.5.7":
version "4.5.7"
resolved "https://registry.yarnpkg.com/@fontsource/roboto-mono/-/roboto-mono-4.5.7.tgz#69a89b679ab962ea3591438f35833b09f0f8980f"
integrity sha512-1uBjM95BEz7zJlmmnpNAM5afMvIxx0wqr86eA76vRqZw8OF5wmsRqYfF3caHuVarBH9/AGN7t9h+3UXK8fjq/Q==
"@giscus/react@^2.0.3":
version "2.0.3"
@ -1089,9 +1089,9 @@
integrity sha512-HrPBEsV9/P63xOsVE3dZlIlmGYrhRcm2k8W3TriJJhpQ7wJMKdQoq/TpRz4jvUsNNca4pGYEkpZhxH8uAqlRiQ==
"@jridgewell/resolve-uri@^3.0.3":
version "3.0.5"
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.5.tgz#68eb521368db76d040a6315cdb24bf2483037b9c"
integrity sha512-VPeQ7+wH0itvQxnG+lIzWgkysKIr3L9sslimFW55rHMdGu/qCQ5z5h9zq4gI8uBtqkpHhsF4Z/OwExufUCThew==
version "3.0.6"
resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.0.6.tgz#4ac237f4dabc8dd93330386907b97591801f7352"
integrity sha512-R7xHtBSNm+9SyvpJkdQl+qrM3Hm2fea3Ef197M3mUug+v+yR+Rhfbs7PBtcBUVnIWJ4JcAdjvij+c8hXS9p5aw==
"@jridgewell/sourcemap-codec@^1.4.10":
version "1.4.11"
@ -1627,9 +1627,9 @@
integrity sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==
"@types/node@*":
version "17.0.25"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.25.tgz#527051f3c2f77aa52e5dc74e45a3da5fb2301448"
integrity sha512-wANk6fBrUwdpY4isjWrKTufkrXdu1D2YHCot2fD/DfWxF5sMrVSA+KN7ydckvaTCh0HiqX9IVl0L5/ZoXg5M7w==
version "17.0.26"
resolved "https://registry.yarnpkg.com/@types/node/-/node-17.0.26.tgz#1bbff9b23ee5a64f87b4f30c0c854b112ee2e635"
integrity sha512-z/FG/6DUO7pnze3AE3TBGIjGGKkvCcGcWINe1C7cADY8hKLJPDYpzsNE37uExQ4md5RFtTCvg+M8Mu1Enyeg2A==
"@types/parse-json@^4.0.0":
version "4.0.0"
@ -2092,14 +2092,14 @@ braces@^3.0.2:
fill-range "^7.0.1"
browserslist@^4.17.5, browserslist@^4.20.2:
version "4.20.2"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.2.tgz#567b41508757ecd904dab4d1c646c612cd3d4f88"
integrity sha512-CQOBCqp/9pDvDbx3xfMi+86pr4KXIf2FDkTTdeuYw8OxS9t898LA1Khq57gtufFILXpfgsSx5woNgsBgvGjpsA==
version "4.20.3"
resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.20.3.tgz#eb7572f49ec430e054f56d52ff0ebe9be915f8bf"
integrity sha512-NBhymBQl1zM0Y5dQT/O+xiLP9/rzOIQdKM/eMJBAq7yBgaB6krIYLGejrwVYnSHZdqjscB1SPuAjHwxjvN6Wdg==
dependencies:
caniuse-lite "^1.0.30001317"
electron-to-chromium "^1.4.84"
caniuse-lite "^1.0.30001332"
electron-to-chromium "^1.4.118"
escalade "^3.1.1"
node-releases "^2.0.2"
node-releases "^2.0.3"
picocolors "^1.0.0"
btoa-lite@^1.0.0:
@ -2125,7 +2125,7 @@ camelcase@^6.2.0:
resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.3.0.tgz#5685b95eb209ac9c0c177467778c9c84df58ba9a"
integrity sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==
caniuse-lite@^1.0.30001283, caniuse-lite@^1.0.30001317:
caniuse-lite@^1.0.30001283, caniuse-lite@^1.0.30001332:
version "1.0.30001332"
resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001332.tgz#39476d3aa8d83ea76359c70302eafdd4a1d727dd"
integrity sha512-10T30NYOEQtN6C11YGg411yebhvpnC6Z102+B95eAsN0oB6KUs01ivE8u+G6FMIRtIrVlYXhL+LUwQ3/hXwDWw==
@ -2561,10 +2561,10 @@ eastasianwidth@^0.2.0:
resolved "https://registry.yarnpkg.com/eastasianwidth/-/eastasianwidth-0.2.0.tgz#696ce2ec0aa0e6ea93a397ffcf24aa7840c827cb"
integrity sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==
electron-to-chromium@^1.4.84:
version "1.4.117"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.117.tgz#829d747deb9faa653cab72764a891ef523ba7413"
integrity sha512-ypZHxY+Sf/PXu7LVN+xoeanyisnJeSOy8Ki439L/oLueZb4c72FI45zXcK3gPpmTwyufh9m6NnbMLXnJh/0Fxg==
electron-to-chromium@^1.4.118:
version "1.4.118"
resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.118.tgz#2d917c71712dac9652cc01af46c7d0bd51552974"
integrity sha512-maZIKjnYDvF7Fs35nvVcyr44UcKNwybr93Oba2n3HkKDFAtk0svERkLN/HyczJDS3Fo4wU9th9fUQd09ZLtj1w==
emoji-regex@^8.0.0:
version "8.0.0"
@ -4763,7 +4763,7 @@ node-fetch@^3.2.3:
fetch-blob "^3.1.4"
formdata-polyfill "^4.0.10"
node-releases@^2.0.2:
node-releases@^2.0.3:
version "2.0.3"
resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.3.tgz#225ee7488e4a5e636da8da52854844f9d716ca96"
integrity sha512-maHFz6OLqYxz+VQyCAtA3PTX4UP/53pa05fyDNc9CwjvJ0yEh6+xBwKsgCxMNhS8taUKBFYxfuiaD9U/55iFaw==
@ -5858,9 +5858,9 @@ styled-jsx@5.0.1:
integrity sha512-+PIZ/6Uk40mphiQJJI1202b+/dYeTVd9ZnMPR80pgiWbjIwvN2zIp4r9et0BgqBuShh48I0gttPlAXA7WVvBxw==
stylis@^4.0.6:
version "4.1.0"
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.0.tgz#e3c7b24ff96d8af35efd161b6991a81c46e51933"
integrity sha512-SrSDzNasOCBTo7C2N9geFwydg/2bmdkWXd4gJirtq82m5JBYtR2+Ialck8czmfBLIdPxCOotlgJESPa8C1RqvA==
version "4.1.1"
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.1.1.tgz#e46c6a9bbf7c58db1e65bb730be157311ae1fe12"
integrity sha512-lVrM/bNdhVX2OgBFNa2YJ9Lxj7kPzylieHd3TNjuGE0Re9JB7joL5VUKOVH1kdNNJTgGPpT8hmwIAPLaSyEVFQ==
supports-color@^5.3.0:
version "5.5.0"
@ -6010,9 +6010,9 @@ tslib@^1.10.0, tslib@^1.8.1, tslib@^1.9.3:
integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==
tslib@^2.1.0, tslib@^2.3.1:
version "2.3.1"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.3.1.tgz#e8a335add5ceae51aa261d32a490158ef042ef01"
integrity sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw==
version "2.4.0"
resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.4.0.tgz#7cecaa7f073ce680a05847aa77be941098f36dc3"
integrity sha512-d6xOpEDfsi2CZVlPQzGeux8XMwLT9hssAsaPYExaQMuYskwb+x1x7J371tWlbBdWHroy99KnVB6qIkUbs5X3UQ==
tsutils@^3.21.0:
version "3.21.0"
@ -6269,21 +6269,21 @@ url-join@^5.0.0:
integrity sha512-n2huDr9h9yzd6exQVnH/jU5mr+Pfx08LRXXZhkLLetAMESRj+anQsTAh940iMrIetKAmry9coFuZQ2jY8/p3WA==
use-composed-ref@^1.0.0:
version "1.2.1"
resolved "https://registry.yarnpkg.com/use-composed-ref/-/use-composed-ref-1.2.1.tgz#9bdcb5ccd894289105da2325e1210079f56bf849"
integrity sha512-6+X1FLlIcjvFMAeAD/hcxDT8tmyrWnbSPMU0EnxQuDLIxokuFzWliXBiYZuGIx+mrAMLBw0WFfCkaPw8ebzAhw==
version "1.3.0"
resolved "https://registry.yarnpkg.com/use-composed-ref/-/use-composed-ref-1.3.0.tgz#3d8104db34b7b264030a9d916c5e94fbe280dbda"
integrity sha512-GLMG0Jc/jiKov/3Ulid1wbv3r54K9HlMW29IWcDFPEqFkSO2nS0MuefWgMJpeHQ9YJeXDL3ZUF+P3jdXlZX/cQ==
use-isomorphic-layout-effect@^1.0.0:
use-isomorphic-layout-effect@^1.1.1:
version "1.1.2"
resolved "https://registry.yarnpkg.com/use-isomorphic-layout-effect/-/use-isomorphic-layout-effect-1.1.2.tgz#497cefb13d863d687b08477d9e5a164ad8c1a6fb"
integrity sha512-49L8yCO3iGT/ZF9QttjwLF/ZD9Iwto5LnH5LmEdk/6cFmXddqi2ulF0edxTwjj+7mqvpVVGQWvbXZdn32wRSHA==
use-latest@^1.0.0:
version "1.2.0"
resolved "https://registry.yarnpkg.com/use-latest/-/use-latest-1.2.0.tgz#a44f6572b8288e0972ec411bdd0840ada366f232"
integrity sha512-d2TEuG6nSLKQLAfW3By8mKr8HurOlTkul0sOpxbClIv4SQ4iOd7BYr7VIzdbktUCnv7dua/60xzd8igMU6jmyw==
version "1.2.1"
resolved "https://registry.yarnpkg.com/use-latest/-/use-latest-1.2.1.tgz#d13dfb4b08c28e3e33991546a2cee53e14038cf2"
integrity sha512-xA+AVm/Wlg3e2P/JiItTziwS7FK92LWrDB0p+hgXloIMuVCeJJ8v6f0eeHyPZaJrM+usM1FkFfbNCrJGs8A/zw==
dependencies:
use-isomorphic-layout-effect "^1.0.0"
use-isomorphic-layout-effect "^1.1.1"
util-deprecate@^1.0.2:
version "1.0.2"