diff options
| -rw-r--r-- | Dockerfile | 20 | ||||
| -rw-r--r-- | html/index.html | 142 | ||||
| -rw-r--r-- | html/index.php | 141 | ||||
| -rw-r--r-- | nginx.conf | 19 |
4 files changed, 165 insertions, 157 deletions
@@ -1,20 +1,14 @@ -#FROM node:22-alpine AS builder -# -#WORKDIR /app -# -#COPY package*.json ./ -#RUN npm install -# -#COPY . . -# -#RUN npm run build - FROM nginx:alpine AS lizdotcoffee -# COPY --from=builder /app/_site /usr/share/nginx/html +RUN apk add --no-cache php84 php84-fpm \ + && sed -i 's/^listen = .*/listen = 127.0.0.1:9000/' /etc/php84/php-fpm.d/www.conf \ + && sed -i 's/^user = .*/user = nginx/;s/^group = .*/group = nginx/' /etc/php84/php-fpm.d/www.conf + +RUN rm -f /usr/share/nginx/html/index.html /usr/share/nginx/html/50x.html + COPY html /usr/share/nginx/html COPY nginx.conf /etc/nginx/conf.d/default.conf EXPOSE 80 -CMD ["nginx", "-g", "daemon off;"] +CMD ["sh", "-c", "php-fpm84 -D && nginx -g 'daemon off;'"] diff --git a/html/index.html b/html/index.html deleted file mode 100644 index 58f0f88..0000000 --- a/html/index.html +++ /dev/null @@ -1,142 +0,0 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -<meta charset="UTF-8"> -<meta name="viewport" content="width=device-width, initial-scale=1.0"> -<link rel="icon" href="https://adelie.liz.coffee/img/favicon.ico" /> -<title>liz.coffee</title> -<style> - :root { - --bg: black; - --fg: white; - --a: #c4d0c8; - --h: #7d978c; - } - * { - cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 24" width="32" height="24"><path d="M1 3h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v2H9v1h1v2h1v2h-1v1H8v-1H7v-2H6v-2H5v1H4v1H3v1H1" fill="%23ff69b4" stroke="%23b19cd9" stroke-width="0.5"/><path d="M2 5h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1H8v2h1v2h1v2H8v-2H7v-2H6v-1H5v1H4v1H3v1H2" fill="white" stroke="%23ff69b4" stroke-width="0.5"/></svg>') - 0 0, auto !important; - } - - body { - max-width: 800px; - background-color: var(--bg); - color: var(--fg); - } - - h1, - h2, - h3, - h4, - h5, - h6 { - color: var(--h); - margin-bottom: 20px; - } - - a { - color: var(--a); - text-decoration: underline; - } - .pro { - text-decoration: underline dotted; - } -</style> -</head> -<body> - <h1><a class="pro">Elizabeth</a> Hunt (<a class="pro">she</a>) (ca 2003)</h1> - <div> - [me at <a href="https://en.wikipedia.org/wiki/Logarithmic_integral_function" target="_blank">Li(z)</a> dot coffee (<a class="tt" href="mailto:me@liz.coffee">mailto</a>)] · - [<a href="https://code.liz.coffee">git hub</a>] · - [<a href="https://linkedin.com/in/emprespresso">linkedin</a>] · - [<a href="https://instagram.com/emprespresso">instagram</a>] · - [<a href="https://x.com/emprespresso">twitter</a>] - </div> - - <marquee>If you <a href="https://web.archive.org/web/20260720071542/https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/marquee">don't like the marquee tag</a> then <a class="pro">she</a> will find you and <a class="pro">she</a> will blast you to smithereens.</marquee> - <hr /> - - <div><p><a class="pro">She</a> is not particularly exceptional at anything, but can functionally do a fair bit of stuff, of which extremely variable ability perhaps is the only exceptional thing about <a class="pro">her</a>.</p></div> - <div style="margin-right: 10px; max-width: 200px; float:left; text-align: center"><img src="assets/coffee-koupen.jpg" width="100%"><br><i>Koupenchan becomes the color of what it drinks</i></div> - - <div><p><a class="pro">She</a> is a programmer at a Big Ol' Tech™ company in Seattle (unfortunately, probably the one you're thinking of). And will continue to refer to <a class="pro">her</a>self in the third person for the remainder of this World Wide Web document, which you find yourself laying your eyes on. And in so doing, probably don't yet understand the context of the next words you are about to read. Except, that they are there. They take up space. And reading through them consumes YOUR oh-so-precious time - of which sup ∈ ℝ<sup>+</sup>, need <a class="pro">she</a> remind you.</p><div> - <div><p id="genpenguin">penguin slop that would be populated if you had your EPIC JAVASCRIPT enabled</p></div> - - <p><a class="pro">She</a> enjoys recreational programming and searching the space of math and CS outside of work; some of <a class="pro">her</a> current interests are in PLs, type theory, game programming (<3 pico8), and homelab stuff. <a class="pro">She</a> was an advocate of LISPy stuff while president of the <a href="https://linux.usu.edu">USU Free Software and Linux Club</a>, <a class="pro">she</a> still can't shake off Emacs and probably should augment <a class="pro">her</a> <a href="assets/emacs.png">hand accordingly</a>.</p> - - <p>When not doing computer stuff, <a class="pro">she</a> runs, bikes, watches anime, rides trains, reads, or bakes bread. <a class="pro">She</a> may be heard practicing violin or speedcubing. Penguins are absolutely fascinating to <a class="pro">her</a>, and <a class="pro">she</a> collects books on said species as well as plenty of stuffed animals, and visits them when possible. Maybe <a class="pro">she</a> will one day <span style="display: none">(soon?) </span>reincarnate to be one.</p> - - <p><a class="pro">She</a> is a vegetarian (except for when it comes to billionaires) arch user (you know because <a class="pro">she</a> just told you), bicycle, poly, and a bit fucked up.</p> - - <p>Gus! Bread!</p> - <div><img src="assets/gus.jpeg" width="300"> <img src="assets/bread.jpeg" width="300"></div> - <div style="display: flex; align-items: center; justify-content: center;"><img width="100" src="assets/penguin.gif"><a href="https://liz.coffee"><img src="https://adelie.liz.coffee/img/blinkies/liz--coffee.gif" width="150" height="20"></a></div> - <hr> - - <br> - <div> - <p>I jam to this so hard so I'm putting it on my website:</p> - <iframe width="280" height="auto" src="https://www.youtube.com/embed/JimUMZTiAjo?si=WTerhBRHan-5IcuG" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> - </div> - - <script> - const words = { - article: ["the", "a", "every", "some", "one", "that"], - adjective: ["cute", "waterproof", "fluffy", "yellow-eyed", "sleepy", "enormous", "polite", - "damp", "well-loved", "smug", "round", "salty", "windswept", "tiny"], - species: ["fairy", "rockhopper", "adelie", "gentoo", "emperor", "chinstrap", "king", - "macaroni", "little blue"], - subject: ["penguin", "chick", "colony", "creche", "huddle", "raft", "Pen Pen", - "Koupenchan", "flipper", "beak", "egg", "nest"], - adverb: ["quietly", "eagerly", "rarely", "sideways", "smugly", "almost", "solemnly", - "briskly", "suspiciously", "twice"], - verb: ["waddles", "toboggans", "steals", "polishes", "guards", "misplaces", "pecks at", - "preens", "dives for", "cuddles", "counts", "hoards", "trades"], - object: ["a pebble", "the nest", "three krill", "a shiny fish", "its egg", "the whole colony", - "a stray feather", "a spare flipper", "the last herring", "someone's chick", - "a very good rock", "the ice shelf"], - ending: ["after the endless summer", "on the ice shelf", "without warning", "in the huddle", - "for no reason", "under a glacier", "beneath the waves", - "at the rookery", "during the blizzard", "again"], - end: ["Squawk.", "Noot?", "Gak!", "Shuffle.", "Waddle."], - }; - - const rand = (list) => list[Math.floor(Math.random() * list.length)]; - - const patterns = [ - ["article", "adjective", "species", "subject", "adverb", "verb", "object"], - ["article", "species", "subject", "verb", "object", "ending"], - ["article", "adjective", "subject", "verb", "object", "ending"], - ["article", "subject", "adverb", "verb", "object"], - ["article", "adjective", "subject", "adverb", "verb", "object", "ending"], - ]; - - const gen = () => { - const text = rand(patterns).map((cat) => rand(words[cat])).join(" "); - const out = text[0].toUpperCase() + text.slice(1) + "."; - return Math.random() < 0.25 ? out + " " + rand(words.end) : out; - } - const n = 5 + Math.floor(Math.random() * 6); - document.getElementById("genpenguin").textContent = ""; - for (let i = 0; i < n; i++) document.getElementById("genpenguin").textContent += gen() + (i === n - 1 ? "" : " "); - - const copyCase = (fro, to) => { - if (fro.toLowerCase() === fro) return to.toLowerCase(); - const froUpper = fro.toUpperCase(); - if (froUpper === fro) return to.toUpperCase(); - if (froUpper[0] !== fro[0]) throw Error('fuck you <3'); - return to[0].toUpperCase() + to.slice(1); - }; - - let p = 1; - // This is not correct. e.g. "of which his" != "of which hers". - const pros = [['he', 'she'], ['him', 'her'], ['his', 'hers'], ['alexander', 'elizabeth']]; - const proElements = () => document.querySelectorAll('.pro'); - proElements().forEach(pro => pro.addEventListener('click', () => { - const pSet = [1, 0][p]; - proElements().forEach(pro => pro.textContent = copyCase(pro.textContent, pros.find(ipro => ipro[p] === pro.textContent.toLowerCase())[pSet])); - p = pSet; - })); - </script> - <script src="assets/oneko.js"></script> -</body> -</html> diff --git a/html/index.php b/html/index.php new file mode 100644 index 0000000..12660e8 --- /dev/null +++ b/html/index.php @@ -0,0 +1,141 @@ +<?php +$p = isset($_GET['p']) && $_GET['p'] === '1' ? 1 : 0; + +$pronounCount = 0; +function pronoun(...$forms) { + global $p, $pronounCount; + $id = 'p' . $pronounCount++; + $next = ($p + 1) % count($forms); + return sprintf( + '<a class="pro" id="%s" href="?p=%d#%s">%s</a>', + $id, $next, $id, htmlspecialchars($forms[$p], ENT_QUOTES) + ); +} + +$words = [ + 'article' => ['the', 'a', 'every', 'some', 'one', 'that'], + 'adjective' => ['cute', 'waterproof', 'fluffy', 'yellow-eyed', 'sleepy', 'enormous', 'polite', + 'damp', 'well-loved', 'smug', 'round', 'salty', 'windswept', 'tiny'], + 'species' => ['fairy', 'rockhopper', 'adelie', 'gentoo', 'emperor', 'chinstrap', 'king', + 'macaroni', 'little blue'], + 'subject' => ['penguin', 'chick', 'colony', 'creche', 'huddle', 'raft', 'Pen Pen', + 'Koupenchan', 'flipper', 'beak', 'egg', 'nest'], + 'adverb' => ['quietly', 'eagerly', 'rarely', 'sideways', 'smugly', 'almost', 'solemnly', + 'briskly', 'suspiciously', 'twice'], + 'verb' => ['waddles', 'toboggans', 'steals', 'polishes', 'guards', 'misplaces', 'pecks at', + 'preens', 'dives for', 'cuddles', 'counts', 'hoards', 'trades'], + 'object' => ['a pebble', 'the nest', 'three krill', 'a shiny fish', 'its egg', 'the whole colony', + 'a stray feather', 'a spare flipper', 'the last herring', "someone's chick", + 'a very good rock', 'the ice shelf'], + 'ending' => ['after the endless summer', 'on the ice shelf', 'without warning', 'in the huddle', + 'for no reason', 'under a glacier', 'beneath the waves', + 'at the rookery', 'during the blizzard', 'again'], + 'end' => ['Squawk.', 'Noot?', 'Gak!', 'Shuffle.', 'Waddle.'], +]; + +$patterns = [ + ['article', 'adjective', 'species', 'subject', 'adverb', 'verb', 'object'], + ['article', 'species', 'subject', 'verb', 'object', 'ending'], + ['article', 'adjective', 'subject', 'verb', 'object', 'ending'], + ['article', 'subject', 'adverb', 'verb', 'object'], + ['article', 'adjective', 'subject', 'adverb', 'verb', 'object', 'ending'], +]; + +$rand = fn(array $list) => $list[array_rand($list)]; + +$gen = function () use ($words, $patterns, $rand) { + $text = implode(' ', array_map(fn($cat) => $rand($words[$cat]), $rand($patterns))); + $out = ucfirst($text) . '.'; + return mt_rand(0, 3) === 0 ? $out . ' ' . $rand($words['end']) : $out; +}; + +$n = 5 + mt_rand(0, 5); +$penguin = implode(' ', array_map($gen, range(1, $n))); +?> +<!DOCTYPE html> +<html lang="en"> +<head> +<meta charset="UTF-8"> +<meta name="viewport" content="width=device-width, initial-scale=1.0"> +<link rel="icon" href="https://adelie.liz.coffee/img/favicon.ico" /> +<title>liz.coffee</title> +<style> + :root { + --bg: black; + --fg: white; + --a: #c4d0c8; + --h: #7d978c; + } + * { + cursor: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 24" width="32" height="24"><path d="M1 3h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v2H9v1h1v2h1v2h-1v1H8v-1H7v-2H6v-2H5v1H4v1H3v1H1" fill="%23ff69b4" stroke="%23b19cd9" stroke-width="0.5"/><path d="M2 5h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1h1v1H8v2h1v2h1v2H8v-2H7v-2H6v-1H5v1H4v1H3v1H2" fill="white" stroke="%23ff69b4" stroke-width="0.5"/></svg>') + 0 0, auto !important; + } + + body { + max-width: 800px; + background-color: var(--bg); + color: var(--fg); + } + + h1, + h2, + h3, + h4, + h5, + h6 { + color: var(--h); + margin-bottom: 20px; + } + + a { + color: var(--a); + text-decoration: underline; + } + .pro { + color: inherit; + text-decoration: underline dotted; + } + .pro:target { + scroll-margin-top: 40vh; + } +</style> +</head> +<body> + <h1><?= pronoun('Elizabeth', 'Alexander') ?> Hunt (<?= pronoun('she', 'he') ?>) (ca 2003)</h1> + <div> + [me at <a href="https://en.wikipedia.org/wiki/Logarithmic_integral_function" target="_blank">Li(z)</a> dot coffee (<a class="tt" href="mailto:me@liz.coffee">mailto</a>)] · + [<a href="https://code.liz.coffee">git hub</a>] · + [<a href="https://linkedin.com/in/emprespresso">linkedin</a>] · + [<a href="https://instagram.com/emprespresso">instagram</a>] · + [<a href="https://x.com/emprespresso">twitter</a>] + </div> + + <marquee>If you <a href="https://web.archive.org/web/20260720071542/https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/marquee">don't like the marquee tag</a> then <?= pronoun('she', 'he') ?> will find you and <?= pronoun('she', 'he') ?> will blast you to smithereens.</marquee> + <hr /> + + <div><p><?= pronoun('She', 'He') ?> is not particularly exceptional at anything, but can functionally do a fair bit of stuff, of which extremely variable ability perhaps is the only exceptional thing about <?= pronoun('her', 'him') ?>.</p></div> + <div style="margin-right: 10px; max-width: 200px; float:left; text-align: center"><img src="assets/coffee-koupen.jpg" width="100%"><br><i>Koupenchan becomes the color of what it drinks</i></div> + + <div><p><?= pronoun('She', 'He') ?> is a programmer at a Big Ol' Tech™ company in Seattle (unfortunately, probably the one you're thinking of). And will continue to refer to <?= pronoun('her', 'him') ?>self in the third person for the remainder of this World Wide Web document, which you find yourself laying your eyes on. And in so doing, probably don't yet understand the context of the next words you are about to read. Except, that they are there. They take up space. And reading through them consumes YOUR oh-so-precious time - of which sup ∈ ℝ<sup>+</sup>, need <?= pronoun('she', 'he') ?> remind you.</p><div> + <div><p id="genpenguin"><?= htmlspecialchars($penguin) ?></p></div> + + <p><?= pronoun('She', 'He') ?> enjoys recreational programming and searching the space of math and CS outside of work; some of <?= pronoun('her', 'his') ?> current interests are in PLs, type theory, game programming (<3 pico8), and homelab stuff. <?= pronoun('She', 'He') ?> was an advocate of LISPy stuff while president of the <a href="https://linux.usu.edu">USU Free Software and Linux Club</a>, <?= pronoun('she', 'he') ?> still can't shake off Emacs and probably should augment <?= pronoun('her', 'his') ?> <a href="assets/emacs.png">hand accordingly</a>.</p> + + <p>When not doing computer stuff, <?= pronoun('she', 'he') ?> runs, bikes, watches anime, rides trains, reads, or bakes bread. <?= pronoun('She', 'He') ?> may be heard practicing violin or speedcubing. Penguins are absolutely fascinating to <?= pronoun('her', 'him') ?>, and <?= pronoun('she', 'he') ?> collects books on said species as well as plenty of stuffed animals, and visits them when possible. Maybe <?= pronoun('she', 'he') ?> will one day <span style="display: none">(soon?) </span>reincarnate to be one.</p> + + <p><?= pronoun('She', 'He') ?> is a vegetarian (except for when it comes to billionaires) arch user (you know because <?= pronoun('she', 'he') ?> just told you), bicycle, poly, and a bit fucked up.</p> + + <p>Gus! Bread!</p> + <div><img src="assets/gus.jpeg" width="300"> <img src="assets/bread.jpeg" width="300"></div> + <div style="display: flex; align-items: center; justify-content: center;"><img width="100" src="assets/penguin.gif"><a href="https://liz.coffee"><img src="https://adelie.liz.coffee/img/blinkies/liz--coffee.gif" width="150" height="20"></a></div> + <hr> + + <br> + <div> + <p>I jam to this so hard so I'm putting it on my website:</p> + <iframe width="280" height="auto" src="https://www.youtube.com/embed/JimUMZTiAjo?si=WTerhBRHan-5IcuG" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen></iframe> + </div> + + <script src="assets/oneko.js"></script> +</body> +</html> @@ -2,7 +2,7 @@ server { listen 80; server_name _; root /usr/share/nginx/html; - index index.html; + index index.php index.html; location ~* \.html$ { add_header Cache-Control "no-cache, no-store, must-revalidate"; @@ -10,11 +10,26 @@ server { add_header Expires "0"; } + location ~* \.php$ { + add_header Cache-Control "no-cache, no-store, must-revalidate"; + add_header Pragma "no-cache"; + add_header Expires "0"; + + try_files $uri =404; + fastcgi_pass 127.0.0.1:9000; + fastcgi_index index.php; + fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name; + include fastcgi_params; + } + location = / { add_header Cache-Control "no-cache, no-store, must-revalidate"; add_header Pragma "no-cache"; add_header Expires "0"; - try_files /index.html =404; + + fastcgi_pass 127.0.0.1:9000; + fastcgi_param SCRIPT_FILENAME $document_root/index.php; + include fastcgi_params; } location ~* \.(jpg|jpeg|png|gif|ico|css|js|svg|woff|woff2|ttf|eot|mp4|webm)$ { |
