Compare commits

...

3 Commits

  1. 10
      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

10
index.html

@ -17,15 +17,19 @@
<link rel="apple-touch-icon" sizes="180x180" href="/favicon/apple-touch-icon.png">
<meta name="msapplication-config" content="/favicon/browserconfig.xml">
<meta name="msapplication-TileColor" content="#ff5555">
<link rel="stylesheet" href="/fonts.css" />
<title>MKRhere</title>
</head>
<body>
<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>
<script type="module" src="/src/index.tsx"></script>
</body>
</html>
</html>

14
package.json

@ -20,20 +20,20 @@
"framer-motion": "^10.16.4",
"gm": "^1.25.0",
"imagen": "github:MKRhere/imagen",
"marked": "^9.0.3",
"marked": "^9.1.2",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"wouter": "^2.11.0"
"wouter": "^2.12.1"
},
"devDependencies": {
"@svgr/rollup": "^8.1.0",
"@types/gm": "^1.25.2",
"@types/gm": "^1.25.3",
"@types/marked": "^5.0.2",
"@types/node": "^20.8.0",
"@types/react": "^18.2.24",
"@types/react-dom": "^18.2.8",
"@types/node": "^20.8.7",
"@types/react": "^18.2.30",
"@types/react-dom": "^18.2.14",
"@vitejs/plugin-react": "^4.1.0",
"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": {
"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.",
"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 (
<div
className={css`
background: var(--background-colour);
background: var(--bg-colour);
padding-block-start: 15rem;
padding-block-end: 8rem;
padding-inline: calc(100vw / 8);
@ -200,6 +200,7 @@ const Container: React.FC<{
onMouseOver={() => !mobile && setShowMenu(true)}
onMouseOut={() => !mobile && setShowMenu(false)}>
<button
aria-label="Logo (Back to home)"
ref={highlightCircle}
className={cx(
css`
@ -283,7 +284,6 @@ const Container: React.FC<{
cursor: pointer;
letter-spacing: 0.2rem;
border: none;
overflow: hidden;
width: 0;
transition: all 300ms;
overflow: hidden;

4
src/components/Menu.tsx

@ -27,7 +27,7 @@ const offscreenNav = css`
top: 0;
left: 0;
z-index: 900;
background: var(--background-colour);
background: var(--bg-colour);
padding: 6rem;
opacity: 0;
top: -100%;
@ -81,7 +81,7 @@ const Menu: React.FC<{
return (
<motion.div
className={notmobile ? desktopNav : offscreenNav}
className={cx("menu", notmobile ? desktopNav : offscreenNav)}
animate={{
// if resized to mobile and back, numeric value will persist but
// 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<{
type: "div" | "span" | "li";
children: React.ReactChild[];
children: (
| string
| number
| React.ReactElement<any, string | React.JSXElementConstructor<any>>
)[];
show: boolean;
}> = ({ type, children: items, show = false, ...props }) => {
const Comp = motion[type];

4
src/index.css

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

1
src/index.tsx

@ -1,7 +1,6 @@
import React from "react";
import { createRoot } from "react-dom/client";
import "./index.css";
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) {
if (!el) return;

1
tsconfig.json

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

Loading…
Cancel
Save