This commit is contained in:
mehbark 2026-01-24 19:48:10 -05:00
commit 112961960d
14 changed files with 3834 additions and 0 deletions

1
.envrc Normal file
View file

@ -0,0 +1 @@
use flake

4
.gitignore vendored Normal file
View file

@ -0,0 +1,4 @@
.direnv/
node_modules/
_site/
*.woff2

31
eleventy.config.js Normal file
View file

@ -0,0 +1,31 @@
import { pathToFileURL } from "node:url";
import { evaluate } from "@mdx-js/mdx";
import { renderToStaticMarkup } from "react-dom/server";
import * as runtime from "react/jsx-runtime";
export default function (eleventyConfig) {
eleventyConfig.addExtension("mdx", {
compile: async (str, inputPath) => {
const { default: mdxContent } = await evaluate(str, {
...runtime,
baseUrl: pathToFileURL(inputPath),
});
return async function (data) {
let res = await mdxContent(data);
return renderToStaticMarkup(res);
};
},
});
eleventyConfig.setNunjucksEnvironmentOptions({
throwOnUndefined: true,
});
eleventyConfig.addPassthroughCopy("site-src/res");
eleventyConfig.addPassthroughCopy("site-src/*.png");
eleventyConfig.setLayoutsDirectory("layout");
eleventyConfig.addGlobalData("layout", "page.njk");
}

61
flake.lock Normal file
View file

@ -0,0 +1,61 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1769018530,
"narHash": "sha256-MJ27Cy2NtBEV5tsK+YraYr2g851f3Fl1LpNHDzDX15c=",
"owner": "nixos",
"repo": "nixpkgs",
"rev": "88d3861acdd3d2f0e361767018218e51810df8a1",
"type": "github"
},
"original": {
"owner": "nixos",
"ref": "nixos-unstable",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs",
"utils": "utils"
}
},
"systems": {
"locked": {
"lastModified": 1681028828,
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
"owner": "nix-systems",
"repo": "default",
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
"type": "github"
},
"original": {
"owner": "nix-systems",
"repo": "default",
"type": "github"
}
},
"utils": {
"inputs": {
"systems": "systems"
},
"locked": {
"lastModified": 1731533236,
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
"owner": "numtide",
"repo": "flake-utils",
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
"type": "github"
},
"original": {
"owner": "numtide",
"repo": "flake-utils",
"type": "github"
}
}
},
"root": "root",
"version": 7
}

57
flake.nix Normal file
View file

@ -0,0 +1,57 @@
{
inputs = {
utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs, utils }: utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
self-pkgs = self.packages.${system};
default-flags = ["--formats=mdx" "--input=site-src"];
eleventy-shortcut = { name, args ? [] }: pkgs.writeShellApplication {
inherit name;
text = ''
npx @11ty/eleventy \
${pkgs.lib.escapeShellArgs default-flags} \
${pkgs.lib.escapeShellArgs args} \
"$@"
'';
runtimeInputs = [
pkgs.nodejs_25
];
};
deploy = pkgs.writeShellApplication {
name = "deploy";
text = ''
build
rsyncy --archive _site/* mbk@celestia:/srv/twopn
'';
runtimeInputs = [
self-pkgs.build
pkgs.rsyncy
];
};
in
{
devShell = pkgs.mkShell {
buildInputs = with pkgs; [
nodejs_25
];
};
packages = {
default = eleventy-shortcut { name = "eleventy"; };
build = eleventy-shortcut { name = "build"; };
serve = eleventy-shortcut { name = "serve"; args = ["--serve"]; };
watch = eleventy-shortcut { name = "watch"; args = ["--watch"]; };
inherit deploy;
};
}
);
}

3229
package-lock.json generated Normal file

File diff suppressed because it is too large Load diff

19
package.json Normal file
View file

@ -0,0 +1,19 @@
{
"name": "twopn",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"keywords": [],
"author": "",
"license": "ISC",
"type": "module",
"dependencies": {
"@11ty/eleventy": "^3.1.2",
"@mdx-js/mdx": "^3.1.1",
"react": "^19.2.3",
"react-dom": "^19.2.3"
}
}

24
site-src/index.mdx Normal file
View file

@ -0,0 +1,24 @@
---
description: mehbark's website for anything
tags: special
---
export function PostLink({post}) {
const tags = post.data.tags.filter(t => t != "post");
return <>
<a href={post.url}>
{post.data.title}
</a>
{" "}
({tags.join(", ")})
{" "}
(<time datetime={post.date.toISOString()}>{post.date.toDateString()}</time>)
</>
}
## Posts
<ul>
{props.collections.post.toReversed().map(p =>
<li key={p.url}><PostLink post={p} /></li>
)}
</ul>

38
site-src/layout/page.njk Normal file
View file

@ -0,0 +1,38 @@
---
title: terezi.pyrope.net
---
<!doctype html>
<html lang="en">
<head>
<title>{{ title }}</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="/res/main.css">
<link rel="stylesheet" type="text/css" href="/res/charis.css"/>
<link rel="icon" href="/res/pyralspite.webp">
<meta itemprop="name" content="{{ title }}">
<meta property="og:title" content="{{ title }}">
<meta property="twitter:title" content="{{ title }}">
<meta name="description" content="{{ description }}">
<meta property="og:description" content="{{ description }}">
<meta property="twitter:description" content="{{ description }}">
<meta property="og:site_name" content="terezi.pyrope.net">
<meta name="twitter:image" content="/res/pyralspite.webp">
<meta name="theme-color" content="#008282">
</head>
<body>
<h1 id="site-title"><a href="/">T3R3Z1.PYROP3.N3T</a></h1>
{% if title != "terezi.pyrope.net" %}
<h1><a href="{{ url or "" }}">{{ title }}</a></h1>
{% endif %}
{{ content | safe }}
</body>
</html>

87
site-src/res/charis.css Normal file
View file

@ -0,0 +1,87 @@
@font-face {
font-family: CharisSILW;
src: url(/res/CharisSIL-Regular.woff2);
font-display: fallback;
}
/* use Charis SIL - Italic in .woff2 format */
@font-face {
font-family: CharisSILW;
font-style: italic;
src: url(/res/CharisSIL-Italic.woff2);
font-display: fallback;
}
/* use Charis SIL - Bold in .woff2 format */
@font-face {
font-family: CharisSILW;
font-weight: bold;
src: url(/res/CharisSIL-Bold.woff2);
font-display: fallback;
}
/* use Charis SIL - Bold Italic in .woff2 format */
@font-face {
font-family: CharisSILW;
font-weight: bold;
font-style: italic;
src: url(/res/CharisSIL-BoldItalic.woff2);
font-display: fallback;
}
:root {
--fv-aalt: "aalt" off;
--fv-c2sc: "c2sc" off;
--fv-cv13: "cv13" off;
--fv-cv17: "cv17" off;
--fv-cv19: "cv19" off;
--fv-cv20: "cv20" off;
--fv-cv25: "cv25" off;
--fv-cv28: "cv28" off;
--fv-cv37: "cv37" off;
--fv-cv43: "cv43" off;
--fv-cv44: "cv44" off;
--fv-cv46: "cv46" off;
--fv-cv47: "cv47" off;
--fv-cv49: "cv49" off;
--fv-cv55: "cv55" off;
--fv-cv57: "cv57" off;
--fv-cv62: "cv62" off;
--fv-cv68: "cv68" off;
--fv-cv69: "cv69" off;
--fv-cv70: "cv70" off;
--fv-cv71: "cv71" off;
--fv-cv75: "cv75" off;
--fv-cv76: "cv76" off;
--fv-cv77: "cv77" off;
--fv-cv79: "cv79" off;
--fv-cv80: "cv80" off;
--fv-cv81: "cv81" off;
--fv-cv82: "cv82" off;
--fv-cv84: "cv84" off;
--fv-cv90: "cv90" off;
--fv-cv91: "cv91" off;
--fv-cv92: "cv92" off;
--fv-cv98: "cv98" off;
--fv-frac: "frac" off;
--fv-smcp: "smcp" off;
--fv-ss01: "ss01" off;
--fv-ss04: "ss04" off;
--fv-ss05: "ss05" off;
--fv-ss11: "ss11" off;
--fv-ss12: "ss12" off;
--fv-subs: "subs" off;
--fv-sups: "sups" off;
}
* {
font-feature-settings:
var(--fv-aalt), var(--fv-c2sc), var(--fv-cv13), var(--fv-cv17),
var(--fv-cv19), var(--fv-cv20), var(--fv-cv25), var(--fv-cv28),
var(--fv-cv37), var(--fv-cv43), var(--fv-cv44), var(--fv-cv46),
var(--fv-cv47), var(--fv-cv49), var(--fv-cv55), var(--fv-cv57),
var(--fv-cv62), var(--fv-cv68), var(--fv-cv69), var(--fv-cv70),
var(--fv-cv71), var(--fv-cv75), var(--fv-cv76), var(--fv-cv77),
var(--fv-cv79), var(--fv-cv80), var(--fv-cv81), var(--fv-cv82),
var(--fv-cv84), var(--fv-cv90), var(--fv-cv91), var(--fv-cv92),
var(--fv-cv98), var(--fv-frac), var(--fv-smcp), var(--fv-ss01),
var(--fv-ss04), var(--fv-ss05), var(--fv-ss11), var(--fv-ss12),
var(--fv-subs), var(--fv-sups);
}

264
site-src/res/main.css Normal file
View file

@ -0,0 +1,264 @@
* {
margin: 0;
padding: 0;
}
body {
font-size: 14pt;
line-height: 1.3;
font-family: CharisSILW, serif;
--fg: #3f676e;
--bg: #fdf7d3;
--light: #555;
--accent: #ab547d;
/* cef5f84 */
--accent2: #8bf3e4;
color: var(--fg);
background: var(--bg);
hyphens: auto;
text-decoration: none;
text-wrap: pretty;
text-align: left;
/* idk */
/* font-feature-settings: "aalt", "c2sc", "ccmp", "cv13", "cv17", "cv19", "cv20", "cv25", "cv28", "cv37", "cv43", "cv44", "cv46", "cv47", "cv49", "cv55", "cv57", "cv62", "cv68", "cv69", "cv70", "cv71", "cv75", "cv76", "cv77", "cv79", "cv80", "cv81", "cv82", "cv84", "cv90", "cv91", "cv92", "cv98", "frac", "liga", "locl", "smcp", "ss01", "ss04", "ss05", "ss11", "ss12", "subs", "sups", "mark", "mkmk";
*/
}
@media (prefers-color-scheme: dark) {
body {
--fg: #f6f6f6;
--bg: #040402;
--light: #aeaeae;
--accent: #fff831;
--accent2: #b94d04;
}
}
/* we can make code wider :D */
p,
h1,
h2,
video {
width: min(650px, 95vw);
margin-inline: auto;
}
ul,
ol {
width: min(650px, 80vw);
margin-inline: auto;
}
li > p {
width: 100%;
}
.highlight {
overflow: auto;
margin-bottom: 8pt;
}
pre {
/* 80 is pretty aggressive */
/* yeah what the heck let's do 100 (for rust's sake) */
/* reducing the font-size a touch makes this more than reasonable methinks */
/* nvm */
width: min(80ch, 95vw);
margin-inline: auto;
font-size: 1rem;
}
.anchor {
color: var(--light);
opacity: 0;
transition: opacity linear 0.1s;
user-select: none;
margin-left: 5px;
}
*:hover > .anchor {
opacity: 1;
}
h1 {
font-size: 1.3em;
margin-top: 20pt;
margin-bottom: 10pt;
text-align: center;
hyphens: none;
}
h2 {
font-size: 1.1em;
margin-top: 10pt;
text-align: left;
hyphens: none;
}
h1:not(#site-title) > a,
h2 > a {
text-decoration: none;
color: var(--fg);
}
p,
blockquote {
margin-block: 0 8pt;
}
code,
pre {
/* kde default i think; looks nice, so i want to keep it consistent */
font-family: Hack, monospace;
whitespace: pre;
}
/* mmmm */
code {
white-space: nowrap;
/*
color: #008282;
filter: grayscale(0.7); */
}
pre > code {
white-space: pre;
}
.meta-date {
/* broken, but only when really narrow */
text-align: start;
}
.meta-date > .label {
color: var(--light);
}
abbr {
text-decoration: none;
--fv-smcp: "smcp" on;
--fv-c2sc: "c2sc" on;
/*
letter-spacing: 0.03em;
font-size: 1.1em;
*/
}
a {
color: var(--fg);
text-decoration: dotted underline;
text-decoration-color: var(--accent);
}
a:not(.heading):not([href="/"]):hover {
color: var(--accent);
transition:
color linear 0.2s,
text-decoration linear 0.2s;
text-decoration: underline;
}
.note {
color: var(--light);
}
blockquote {
width: min(550px, 90vw);
margin-inline: auto;
font-size: 1em;
line-height: 1.1;
}
hr {
border: none;
border-top: 2px solid var(--light);
margin-block: 2rem;
width: min(600px, 90vw);
margin-inline: auto;
}
li {
margin-bottom: 0.5rem;
}
footer {
width: min(700px, 95vw);
--fv-smcp: "smcp" on;
margin-inline: auto;
display: flex;
margin-bottom: 2rem;
gap: 1rem;
flex-flow: row wrap;
justify-content: center;
}
code,
.emoticon,
.css-property,
.url-link {
font-family: Hack, monospace;
font-size: 1rem;
}
/* todo: would be great (but hard) to have footnotes on the side when the screen is wide enough */
.footnote-return,
.footnote {
user-select: none;
}
.footnote {
font-size: 0.65rem;
padding-inline: 0.07rem;
vertical-align: super;
}
.footnote-content {
width: fit-content;
/* kinda inelegant V */
padding-inline: 0.25rem;
}
.posts {
text-align: left;
hyphens: none;
}
.no-hyphens {
hyphens: none;
}
.work-title {
font-style: italic;
}
.heading-link {
font-weight: 550;
--fv-smcp: "smcp" on;
}
/* meh */
:target {
outline: 1px solid var(--accent);
border-radius: 0.125rem;
}
video {
display: block;
border-radius: 1rem;
margin-block-end: 1rem;
}
#site-title {
width: 100%;
font-family:
Courier New,
Courier,
monospace;
background: var(--accent2);
}
#site-title > a {
color: var(--accent);
text-decoration: none;
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 15 KiB

9
site-src/revchron.mdx Normal file
View file

@ -0,0 +1,9 @@
---
title: On the reverse-chronological ordering of items
description: I pontificate on the merits and missteps of ordering items by their associated date in a fashion antiparallel to our logical conception of time.
tags: post,short
---
the bit is that this is actually for testing reverse chron but i'm going to turn it into a little piece about reverse chron.
very little.
as little as possible actually

10
site-src/twopn.mdx Normal file
View file

@ -0,0 +1,10 @@
---
title: What is twopn?
description: How I made a new website without exploding
tags: post,short,meta
---
twopn is new website and stuff [lisannne](https://lisanne.gay) and [poly wolf](https://wolfgirl.dev/blog)
## i'm just not going to worry about heading links
that's okay