Compare commits

...

3 Commits

  1. 8
      index.html
  2. 14
      package.json
  3. 922
      pnpm-lock.yaml
  4. 20
      src/blog.json
  5. 4
      src/components/Container.tsx
  6. 4
      src/components/Menu.tsx
  7. 6
      src/components/RevealChildren.tsx
  8. 4
      src/index.css
  9. 1
      src/index.tsx
  10. 3
      src/util/index.ts
  11. 1
      tsconfig.json

8
index.html

@ -17,13 +17,17 @@
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png"> <link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
<meta name="msapplication-config" content="/favicon/browserconfig.xml"> <meta name="msapplication-config" content="/favicon/browserconfig.xml">
<meta name="msapplication-TileColor" content="#ff5555"> <meta name="msapplication-TileColor" content="#ff5555">
<link rel="stylesheet" href="/fonts.css" />
<title>MKRhere</title> <title>MKRhere</title>
</head> </head>
<body> <body>
<noscript>You need to enable JavaScript to run this app.</noscript> <noscript>You need to enable JavaScript to run this app.</noscript>
<style>
/* inline all the CSS to save a couple roundtrips */
@import url('./src/index.css');
@import url('./public/fonts.css');
@import url('./src/util/dynamic-gradient.css');
</style>
<div id="root"></div> <div id="root"></div>
<script type="module" src="/src/index.tsx"></script> <script type="module" src="/src/index.tsx"></script>
</body> </body>

14
package.json

@ -20,20 +20,20 @@
"framer-motion": "^10.16.4", "framer-motion": "^10.16.4",
"gm": "^1.25.0", "gm": "^1.25.0",
"imagen": "github:MKRhere/imagen", "imagen": "github:MKRhere/imagen",
"marked": "^9.0.3", "marked": "^9.1.2",
"react": "^18.2.0", "react": "^18.2.0",
"react-dom": "^18.2.0", "react-dom": "^18.2.0",
"wouter": "^2.11.0" "wouter": "^2.12.1"
}, },
"devDependencies": { "devDependencies": {
"@svgr/rollup": "^8.1.0", "@svgr/rollup": "^8.1.0",
"@types/gm": "^1.25.2", "@types/gm": "^1.25.3",
"@types/marked": "^5.0.2", "@types/marked": "^5.0.2",
"@types/node": "^20.8.0", "@types/node": "^20.8.7",
"@types/react": "^18.2.24", "@types/react": "^18.2.30",
"@types/react-dom": "^18.2.8", "@types/react-dom": "^18.2.14",
"@vitejs/plugin-react": "^4.1.0", "@vitejs/plugin-react": "^4.1.0",
"typescript": "^5.2.2", "typescript": "^5.2.2",
"vite": "^4.4.9" "vite": "^4.5.0"
} }
} }

922
pnpm-lock.yaml

File diff suppressed because it is too large

20
src/blog.json

@ -1,14 +1,4 @@
{ {
"2016": {
"convergence-of-world-lines-2": {
"title": "Convergence of World Lines 2",
"published": "December 14, 2016",
"category": "Thoughts",
"featured-img": "kurisu-okabe-crossing.jpg",
"snippet": "In an infinite number of universes where anything is possible, I want to meet you again in all of them, and fall in love with you all over again.",
"slug": "convergence-of-world-lines-2"
}
},
"2017": { "2017": {
"convergence-of-world-lines": { "convergence-of-world-lines": {
"title": "Convergence of World Lines", "title": "Convergence of World Lines",
@ -18,15 +8,5 @@
"snippet": "In an infinite number of universes where anything is possible, I want to meet you again in all of them, and fall in love with you all over again.", "snippet": "In an infinite number of universes where anything is possible, I want to meet you again in all of them, and fall in love with you all over again.",
"slug": "convergence-of-world-lines" "slug": "convergence-of-world-lines"
} }
},
"2018": {
"convergence-of-world-lines-3": {
"title": "Convergence of World Lines 3",
"published": "December 14, 2018",
"category": "Thoughts",
"featured-img": "threads-of-time.jpg",
"snippet": "In an infinite number of universes where anything is possible, I want to meet you again in all of them, and fall in love with you all over again.",
"slug": "convergence-of-world-lines-3"
}
} }
} }

4
src/components/Container.tsx

@ -157,7 +157,7 @@ const Container: React.FC<{
return ( return (
<div <div
className={css` className={css`
background: var(--background-colour); background: var(--bg-colour);
padding-block-start: 15rem; padding-block-start: 15rem;
padding-block-end: 8rem; padding-block-end: 8rem;
padding-inline: calc(100vw / 8); padding-inline: calc(100vw / 8);
@ -200,6 +200,7 @@ const Container: React.FC<{
onMouseOver={() => !mobile && setShowMenu(true)} onMouseOver={() => !mobile && setShowMenu(true)}
onMouseOut={() => !mobile && setShowMenu(false)}> onMouseOut={() => !mobile && setShowMenu(false)}>
<button <button
aria-label="Logo (Back to home)"
ref={highlightCircle} ref={highlightCircle}
className={cx( className={cx(
css` css`
@ -283,7 +284,6 @@ const Container: React.FC<{
cursor: pointer; cursor: pointer;
letter-spacing: 0.2rem; letter-spacing: 0.2rem;
border: none; border: none;
overflow: hidden;
width: 0; width: 0;
transition: all 300ms; transition: all 300ms;
overflow: hidden; overflow: hidden;

4
src/components/Menu.tsx

@ -27,7 +27,7 @@ const offscreenNav = css`
top: 0; top: 0;
left: 0; left: 0;
z-index: 900; z-index: 900;
background: var(--background-colour); background: var(--bg-colour);
padding: 6rem; padding: 6rem;
opacity: 0; opacity: 0;
top: -100%; top: -100%;
@ -81,7 +81,7 @@ const Menu: React.FC<{
return ( return (
<motion.div <motion.div
className={notmobile ? desktopNav : offscreenNav} className={cx("menu", notmobile ? desktopNav : offscreenNav)}
animate={{ animate={{
// if resized to mobile and back, numeric value will persist but // if resized to mobile and back, numeric value will persist but
// will be ignored because desktopNav isn't absolutely positioned // will be ignored because desktopNav isn't absolutely positioned

6
src/components/RevealChildren.tsx

@ -3,7 +3,11 @@ import { motion } from "framer-motion";
const RevealChildren: React.FC<{ const RevealChildren: React.FC<{
type: "div" | "span" | "li"; type: "div" | "span" | "li";
children: React.ReactChild[]; children: (
| string
| number
| React.ReactElement<any, string | React.JSXElementConstructor<any>>
)[];
show: boolean; show: boolean;
}> = ({ type, children: items, show = false, ...props }) => { }> = ({ type, children: items, show = false, ...props }) => {
const Comp = motion[type]; const Comp = motion[type];

4
src/index.css

@ -1,5 +1,5 @@
:root { :root {
--background-colour: rgb(0, 0, 0); --bg-colour: rgb(0, 0, 0);
--card-bg: rgb(18, 18, 18); --card-bg: rgb(18, 18, 18);
--card-tags: rgb(34, 34, 34); --card-tags: rgb(34, 34, 34);
--card-tags-hover: rgb(25, 25, 25); --card-tags-hover: rgb(25, 25, 25);
@ -9,6 +9,8 @@
--card-active: rgb(45, 45, 45); --card-active: rgb(45, 45, 45);
--card-active-border: rgb(60, 60, 60); --card-active-border: rgb(60, 60, 60);
--card-hover: rgb(15, 15, 15); --card-hover: rgb(15, 15, 15);
--offscreen-handle: rgb(60, 60, 60);
--offscreen-handle-tab: rgb(158, 158, 158);
font-weight: 500; font-weight: 500;
font-size: max(16px, 0.8vw); font-size: max(16px, 0.8vw);
} }

1
src/index.tsx

@ -1,7 +1,6 @@
import React from "react"; import React from "react";
import { createRoot } from "react-dom/client"; import { createRoot } from "react-dom/client";
import "./index.css";
import useLocation from "wouter/use-location"; import useLocation from "wouter/use-location";

3
src/util/index.ts

@ -56,8 +56,7 @@ export const get = {
}, },
}; };
import "./dynamic-gradient.css"; // required css is inlined in index.html
export function setupCursorTracking(el: HTMLElement | null) { export function setupCursorTracking(el: HTMLElement | null) {
if (!el) return; if (!el) return;

1
tsconfig.json

@ -6,6 +6,7 @@
"skipLibCheck": false, "skipLibCheck": false,
"esModuleInterop": false, "esModuleInterop": false,
"allowSyntheticDefaultImports": true, "allowSyntheticDefaultImports": true,
"allowImportingTsExtensions": true,
"strict": true, "strict": true,
"forceConsistentCasingInFileNames": true, "forceConsistentCasingInFileNames": true,
"module": "ESNext", "module": "ESNext",

Loading…
Cancel
Save