diff options
| author | Ahmed <git@gumx.cc> | 2026-06-18 01:06:23 +0300 |
|---|---|---|
| committer | Ahmed <git@gumx.cc> | 2026-06-18 01:06:23 +0300 |
| commit | fa78d49b8d3534e457333043e87509dbc5ff8abe (patch) | |
| tree | 3467d87c5be37b1890744635252230058a6244ec | |
| parent | 4e4667870ea44a385400c1d1f49f92376875396f (diff) | |
fix: style and diff coffee deployment
| -rw-r--r-- | ccc.html | 8 | ||||
| -rw-r--r-- | hooks/post-receive | 25 |
2 files changed, 21 insertions, 12 deletions
@@ -32,8 +32,8 @@ <main> - <div id="static-notice" style="display:none"> - <span class="static-notice">static site mode — read-only</span> + <div id="ccc-intro"> + <p>A minimal coffee tracker. Log your daily cups and track your habits. Data lives in your browser — no account needed.</p> </div> <div class="heatmap-wrap"> @@ -82,8 +82,7 @@ <a href="https://vpn.gumx.cc">vpn</a> / <a href="https://pgp.gumx.cc">pgp</a> / <a href="https://demo.gumx.cc">demo</a> / - <a href="https://wk.fo">wk.fo</a> - <br> + <a href="https://wk.fo">wk.fo</a> / <a href="https://git.gumx.cc/ccc">source</a> </footer> @@ -622,7 +621,6 @@ // ── Init ────────────────────────────────────────────────────── async function init() { if (isStaticMode) { - document.getElementById("static-notice").style.display = "block"; document.getElementById("controls").style.display = "none"; await loadRemoteData(); } else { diff --git a/hooks/post-receive b/hooks/post-receive index f0418ba..d78cdf6 100644 --- a/hooks/post-receive +++ b/hooks/post-receive @@ -6,7 +6,13 @@ DEMO=/var/www/demo.gumx.cc # ── coffee.gumx.cc (personal log: DATA_URL=data.json, with footer) ────────── mkdir -p "$COFFEE/styles" "$COFFEE/fonts" -cp "$WORK/ccc.html" "$COFFEE/index.html" +python3 - "$WORK/ccc.html" "$COFFEE/index.html" <<'PYEOF' +import sys, re +src, dst = sys.argv[1], sys.argv[2] +html = open(src).read() +html = re.sub(r'\n\n <div id="ccc-intro">.*?</div>', '', html, flags=re.DOTALL) +open(dst, 'w').write(html) +PYEOF cp "$WORK/favicon.svg" "$COFFEE/favicon.svg" cp "$WORK/styles/main.css" "$COFFEE/styles/main.css" cp "$WORK/styles/ccc.css" "$COFFEE/styles/ccc.css" @@ -22,25 +28,30 @@ cat > "$COFFEE/404.html" <<'HTMLEOF' <style> @font-face { font-family: "Kawkab Mono"; src: url(/fonts/KawkabMono-Regular.woff2); font-weight: normal; } @font-face { font-family: "Kawkab Mono"; src: url(/fonts/KawkabMono-Bold.woff2); font-weight: bold; } -* { unicode-bidi: plaintext; box-sizing: border-box; } +@font-face { font-family: "Kawkab Mono"; src: url(/fonts/KawkabMono-Light.woff2); font-weight: light; } +* { unicode-bidi: plaintext; } html { color: black; background-color: white; } body { font-family: "Kawkab Mono"; font-size: 16px; line-height: 1.4; margin: 0; padding: 4rem 0; min-height: 100%; overflow-wrap: break-word; } -main, header, footer { max-width: 800px; margin-inline: auto; padding: 0 2rem; } h1, header, footer { text-align: center; } +nav { text-align: start; } +main { text-align: justify; } +main, header, footer { max-width: 800px; margin-inline: auto; padding: 0 2rem; } +p, h2, h3, h4 { margin: 1em 0 0 0; } hr { border: none; border-top: thin solid; margin: 1.25rem 0; } header { margin-bottom: 1em; } footer { margin-top: 3em; } -a { color: inherit; } -@media (max-width: 600px) { body { font-size: 0.9em; } } +@media (max-width: 600px) { body { font-size: 0.9em; } h1 { font-size: 1.8em; } } +@media (max-width: 400px) { body { font-size: 0.8em; } h1 { font-size: 1.6em; } } @media (prefers-color-scheme: dark) { html { filter: invert(1); } img { filter: invert(1); } } </style> </head> <body> <header> -<h1><a href="https://gumx.cc">gumx</a></h1> +<nav><strong><a href="https://gumx.cc">gumx</a></strong></nav> </header> <main> -<p>404 not found.</p> +<h1>404</h1> +<p>not found.</p> </main> <footer> <hr> |
