summaryrefslogtreecommitdiff
path: root/internal/generator/templates/themes/brutalist
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2026-04-25 22:13:32 +0300
committerPaul Buetow <paul@buetow.org>2026-04-25 22:13:32 +0300
commita5cb9f7ad4b2bcb7ac367854147f661ab83c5ec1 (patch)
tree96db490ed72dec49c4bc2aba8539fd57f3246f47 /internal/generator/templates/themes/brutalist
parentcc9c69ce748416ad1d9b28592ec463434023d63c (diff)
can swap themes dynamicallyv0.12.0
Diffstat (limited to 'internal/generator/templates/themes/brutalist')
-rw-r--r--internal/generator/templates/themes/brutalist/meta.json7
-rw-r--r--internal/generator/templates/themes/brutalist/theme.css65
-rw-r--r--internal/generator/templates/themes/brutalist/theme.js132
3 files changed, 204 insertions, 0 deletions
diff --git a/internal/generator/templates/themes/brutalist/meta.json b/internal/generator/templates/themes/brutalist/meta.json
new file mode 100644
index 0000000..b6dee75
--- /dev/null
+++ b/internal/generator/templates/themes/brutalist/meta.json
@@ -0,0 +1,7 @@
+{
+ "title": "SNONUX.FOO",
+ "header_html": "\u003cdiv class=\"logo\"\u003e\n \u003cspan class=\"logo-mark\"\u003eSN\u003c/span\u003e\n \u003cdiv class=\"logo-title\"\u003e\n \u003ch1\u003eSNONUX.FOO\u003c/h1\u003e\n \u003cp class=\"subtitle\"\u003eMICROBLOG \u0026mdash; \u003ca href=\"https://foo.zone\"\u003eFOO.ZONE\u003c/a\u003e IS THE REAL BLOG\u003c/p\u003e\n \u003cp class=\"logo-host\"\u003eServed by NetBSD on a Raspberry Pi 3\u003c/p\u003e\n \u003c/div\u003e\n \u003c/div\u003e\n \u003cdiv class=\"nav\"\u003e\n \u003ca href=\"atom.xml\" class=\"header-feed-link\" rel=\"alternate\" title=\"Atom feed\" type=\"application/atom+xml\"\u003eAtom feed\u003c/a\u003e\n \u003ca href=\"https://foo.zone/about\" class=\"transmit-btn\"\u003eTRANSMIT\u003c/a\u003e\n \u003c/div\u003e",
+ "splash_inner_html": "\u003ccanvas class=\"splash-gl-canvas\" id=\"splash-gl-canvas\" aria-hidden=\"true\"\u003e\u003c/canvas\u003e\n \u003cdiv class=\"splash-inner splash-frame\"\u003e\n \u003cdiv class=\"splash-title\"\u003eSNONUX.FOO\u003c/div\u003e\n \u003cdiv class=\"splash-tag\"\u003eBrutalist theme\u003c/div\u003e\n \u003cdiv class=\"splash-hint\"\u003e[ CLICK OR ENTER TO TRANSMIT ]\u003c/div\u003e\n \u003c/div\u003e",
+ "prev_page_text": "\u0026larr; NEWER",
+ "next_page_text": "OLDER \u0026rarr;"
+}
diff --git a/internal/generator/templates/themes/brutalist/theme.css b/internal/generator/templates/themes/brutalist/theme.css
new file mode 100644
index 0000000..4c8dac5
--- /dev/null
+++ b/internal/generator/templates/themes/brutalist/theme.css
@@ -0,0 +1,65 @@
+ :root { --red:#ff2200; }
+ * { margin:0; padding:0; box-sizing:border-box; }
+ body { font-family:Impact,'Arial Narrow',Arial,sans-serif;
+ background:#000; color:#fff; overflow:hidden; height:100vh; }
+ #three-canvas { position:fixed; top:0; left:0; width:100%; height:100%; z-index:1; }
+ .overlay { height:100vh; display:flex; flex-direction:column; position:relative; z-index:10; }
+ header { padding:14px 24px; background:#000; border-bottom:4px solid #fff;
+ display:flex; align-items:center; justify-content:space-between; }
+ .logo { display:flex; align-items:center; gap:16px; }
+ .logo-mark { font-size:2.8rem; color:var(--red); line-height:1; }
+ .logo-title h1 { font-size:2rem; color:#fff; letter-spacing:0; line-height:1; }
+ .logo-title .subtitle { font-size:0.78rem; color:#888; margin-top:3px;
+ font-family:'Courier New',monospace; }
+ .logo-title .subtitle a { color:var(--red); text-decoration:none; }
+ .logo-title .subtitle a:hover { text-decoration:underline; }
+ .transmit-btn { border:3px solid var(--red); color:var(--red); padding:10px 20px;
+ border-radius:0; text-decoration:none; font-family:Impact; font-size:1.05rem;
+ letter-spacing:2px; transition:all 0.1s; }
+ .transmit-btn:hover { background:var(--red); color:#000; }
+ a.header-feed-link { color:#aaa; font-family:'Courier New',monospace; font-size:0.78rem; }
+ a.header-feed-link:hover { color:var(--red); }
+ .nav-hints { background:#111; border-bottom:2px solid #333; color:#888;
+ padding:5px 24px; display:flex; gap:18px; font-family:'Courier New',monospace;
+ font-size:0.7rem; flex-wrap:wrap; }
+ .nav-hints kbd { background:#000; border:1px solid #555; color:#fff;
+ border-radius:0; padding:0 5px; margin:0 2px; font-size:0.7rem; }
+ .content { flex:1; overflow-y:auto; padding:20px 24px;
+ scrollbar-width:thin; scrollbar-color:#fff #000; }
+ .page-nav { display:flex; justify-content:center; margin:14px 0; }
+ .page-nav a { border:3px solid #fff; color:#fff; padding:9px 22px;
+ border-radius:0; text-decoration:none; font-family:Impact;
+ font-size:1rem; letter-spacing:2px; }
+ .page-nav a:hover { background:#fff; color:#000; }
+ .page-nav-footer { flex-shrink:0; padding:6px 24px; display:flex; justify-content:center;
+ background:#000; border-top:4px solid #fff; }
+ .post { background:#000; border:3px solid #fff; border-radius:0;
+ padding:20px 22px; margin-bottom:14px; cursor:pointer;
+ transition:border-color 0.1s,background 0.1s; }
+ .post:hover { border-color:var(--red); }
+ .post-active { border-color:var(--red) !important; background:#0d0000 !important;
+ border-left-width:8px !important; box-shadow:none !important; }
+ .post-header { display:flex; justify-content:space-between; margin-bottom:12px; }
+ .post-time { color:#aaa; font-family:'Courier New',monospace; font-size:0.82rem; }
+ .post-text { font-family:'Arial',sans-serif; font-size:1rem; line-height:1.5; }
+ .post-text a { color:var(--red); text-decoration:underline; }
+ .post-audio { width:100%; margin-top:10px; }
+ .post-modal { display:none; position:fixed; inset:0; z-index:100;
+ background:rgba(0,0,0,0.98); overflow-y:auto; padding:40px 20px; }
+ .post-modal.active { display:block; }
+ .modal-inner { max-width:780px; margin:0 auto; background:#000;
+ border:4px solid #fff; border-radius:0; padding:38px;
+ box-shadow:8px 8px 0 var(--red); }
+ .modal-close { float:right; background:none; border:none; color:var(--red);
+ font-family:Impact; font-size:1.3rem; cursor:pointer; letter-spacing:2px; }
+ @media(max-width:640px) { .nav-hints{display:none;} header{padding:10px 16px;} .logo-mark{font-size:2rem;} }
+ [data-sno-theme="brutalist"] .splash-overlay { background:#000; }
+ [data-sno-theme="brutalist"] .splash-frame {
+ border:6px solid #fff; padding:clamp(1.5rem,5vw,2.5rem) clamp(1.25rem,4vw,2rem);
+ box-shadow: 12px 12px 0 var(--red); animation: splashBrutalJolt 3s steps(2,end) infinite;
+ }
+ @keyframes splashBrutalJolt { 0%,100% { transform: translate(0,0); } 50% { transform: translate(2px,-2px); } }
+ [data-sno-theme="brutalist"] .splash-title { font-family:Impact,sans-serif; font-size:clamp(1.8rem,6vw,2.8rem); color:#fff; }
+ [data-sno-theme="brutalist"] .splash-tag { font-family:'Courier New',monospace; color:var(--red); }
+ [data-sno-theme="brutalist"] .splash-hint { font-family:'Courier New',monospace; color:#c8c8c8; }
+ [data-sno-theme="brutalist"] .splash-inner { text-shadow: 0 0 12px #000, 0 2px 8px #000; }
diff --git a/internal/generator/templates/themes/brutalist/theme.js b/internal/generator/templates/themes/brutalist/theme.js
new file mode 100644
index 0000000..227763a
--- /dev/null
+++ b/internal/generator/templates/themes/brutalist/theme.js
@@ -0,0 +1,132 @@
+
+ (function(){
+ if(document.documentElement.classList.contains('sno-splash-skip'))return;
+ var cv=document.getElementById('splash-gl-canvas');
+ if(!cv||typeof THREE==='undefined')return;
+ var raf,ren,sc,ca,g=new THREE.Group(),t0=performance.now();
+ function cleanup(){window.removeEventListener('resize',sz);if(raf)cancelAnimationFrame(raf);raf=null;if(ren)ren.dispose();ren=null;window._snonuxSplashWebGLCleanup=null;}
+ window._snonuxSplashWebGLCleanup=cleanup;
+ function sz(){var w=cv.clientWidth||2,h=cv.clientHeight||2;if(ren)ren.setSize(w,h,false);if(ca){ca.aspect=w/h;ca.updateProjectionMatrix();}}
+ ren=new THREE.WebGLRenderer({canvas:cv,antialias:true,alpha:true});ren.setClearColor(0,0);ren.setPixelRatio(Math.min(window.devicePixelRatio||1,2));
+ sc=new THREE.Scene();ca=new THREE.PerspectiveCamera(50,1,0.1,80);ca.position.z=8;
+ var b1=new THREE.LineSegments(new THREE.EdgesGeometry(new THREE.BoxGeometry(3.4,2.4,2.4)),new THREE.LineBasicMaterial({color:0xffffff}));
+ var b2=new THREE.LineSegments(new THREE.EdgesGeometry(new THREE.BoxGeometry(2.2,1.6,1.6)),new THREE.LineBasicMaterial({color:0xff2200}));
+ b2.position.set(0.3,0.2,0.5);g.add(b1);g.add(b2);sc.add(g);sz();window.addEventListener('resize',sz);
+ function loop(now){raf=requestAnimationFrame(loop);var t=(now-t0)*0.001;g.rotation.x=t*0.51;g.rotation.y=t*0.73;ren.render(sc,ca);}
+ raf=requestAnimationFrame(loop);
+ })();
+
+
+ // Brutalist WebGL: harsh slowly-rotating boxes — solid white and wireframe red.
+ // No fog, no softness. Pure geometric violence against the black void.
+ (function() {
+ var _wild = false;
+ var scene, camera, renderer, clock;
+ var boxes = [];
+
+ function initThree() {
+ scene = new THREE.Scene();
+ scene.background = new THREE.Color(0x000000);
+
+ camera = new THREE.PerspectiveCamera(60, window.innerWidth/window.innerHeight, 0.1, 200);
+ camera.position.set(0, 0, 40);
+
+ renderer = new THREE.WebGLRenderer({ canvas: document.getElementById('three-canvas'), antialias: false });
+ renderer.setSize(window.innerWidth, window.innerHeight);
+ renderer.setPixelRatio(Math.min(window.devicePixelRatio, 2));
+ clock = new THREE.Clock();
+
+ // Box configurations: [size, posX, posY, posZ, rotSpeedX, rotSpeedY, wireframe, color]
+ var configs = [
+ [10, 0, 0, 0, 0.002, 0.005, false, 0xffffff],
+ [6, 18, -6, -8, 0.004, 0.003, true, 0xff2200],
+ [7, -16, 5, -10, 0.003, 0.006, true, 0xff2200],
+ [5, 8, 12, -5, 0.006, 0.002, false, 0xff2200],
+ [4, -10,-10, -3, 0.005, 0.004, false, 0xffffff],
+ ];
+
+ configs.forEach(function(c) {
+ var geo = new THREE.BoxGeometry(c[0], c[0], c[0]);
+ var mat = new THREE.MeshBasicMaterial({ color: c[7], wireframe: c[6] });
+ var mesh = new THREE.Mesh(geo, mat);
+ mesh.position.set(c[1], c[2], c[3]);
+ boxes.push({ mesh: mesh, rx: c[4], ry: c[5] });
+ scene.add(mesh);
+ });
+
+ window.addEventListener('resize', onResize);
+ animate();
+ }
+
+ function onResize() {
+ camera.aspect = window.innerWidth / window.innerHeight;
+ camera.updateProjectionMatrix();
+ renderer.setSize(window.innerWidth, window.innerHeight);
+ }
+
+ function animate() {
+ requestAnimationFrame(animate);
+ var sm = _wild ? 15 : 1;
+ boxes.forEach(function(b) {
+ b.mesh.rotation.x += b.rx * sm;
+ b.mesh.rotation.y += b.ry * sm;
+ // Wild mode: random jitter on positions
+ if (_wild) { b.mesh.position.x += (Math.random()-0.5)*0.4; b.mesh.position.y += (Math.random()-0.5)*0.4; }
+ });
+ renderer.render(scene, camera);
+ }
+
+ initThree();
+
+ // Brutalist nav/wild effects — violent shake on navigate, geometric chaos on wild
+ window.snonuxOpenEffect = function() {
+ // Expand violently from nothing — pure brutalist impact
+ var modal = document.getElementById('post-modal');
+ if (modal) { modal.classList.add('sno-modal-expand'); setTimeout(function() { modal.classList.remove('sno-modal-expand'); }, 420); }
+ var d = document.createElement('div');
+ d.style.cssText = 'position:fixed;inset:0;z-index:997;pointer-events:none;background:rgba(255,34,0,0.22);transition:opacity 0.14s';
+ document.body.appendChild(d);
+ setTimeout(function() { d.style.opacity='0'; setTimeout(function() { d.remove(); }, 170); }, 15);
+ };
+ window.snonuxCloseEffect = function() {
+ var ov = document.querySelector('.overlay');
+ if (ov) { ov.classList.add('sno-fx-shake'); setTimeout(function() { ov.classList.remove('sno-fx-shake'); }, 360); }
+ };
+ window.snonuxScrollEffect = function(dir) {
+ var isDown = dir === 'down';
+ var thick = _wild ? '14px' : '5px';
+ var d = document.createElement('div');
+ // Brutalist: harsh black-and-white hard edge
+ d.style.cssText = 'position:fixed;left:0;right:0;height:' + thick + ';z-index:9000;pointer-events:none;' +
+ 'background:linear-gradient(90deg,rgba(0,0,0,0.95),rgba(255,255,255,0.95),rgba(0,0,0,0.95));' +
+ (isDown ? 'top:0;' : 'bottom:0;') +
+ 'transition:transform 0.25s ease,opacity 0.25s ease;';
+ document.body.appendChild(d);
+ setTimeout(function() { d.style.transform = isDown ? 'translateY(100vh)' : 'translateY(-100vh)'; d.style.opacity='0'; }, 16);
+ setTimeout(function() { d.remove(); }, 320);
+ };
+ window.snonuxWildToggle = function() {
+ _wild = !_wild;
+ var b = document.getElementById('sno-wild-badge');
+ if (b) b.classList.toggle('sno-wild-on', _wild);
+ };
+ window.snonuxNavEffect = function() {
+ // Violent double shake + red flash
+ var ov = document.querySelector('.overlay');
+ if (ov) {
+ ov.classList.add('sno-fx-shake');
+ setTimeout(function() { ov.classList.remove('sno-fx-shake'); setTimeout(function() { ov.classList.add('sno-fx-shake'); setTimeout(function() { ov.classList.remove('sno-fx-shake'); }, 380); }, 50); }, 400);
+ }
+ var d = document.createElement('div');
+ d.style.cssText = 'position:fixed;inset:0;z-index:998;pointer-events:none;background:rgba(255,34,0,0.28);transition:opacity 0.18s';
+ document.body.appendChild(d);
+ setTimeout(function() { d.style.opacity='0'; setTimeout(function() { d.remove(); }, 200); }, 25);
+ };
+ window.snonuxPageEffect = function() {
+ // Color inversion flash
+ var d = document.createElement('div');
+ d.style.cssText = 'position:fixed;inset:0;z-index:998;pointer-events:none;background:#fff;mix-blend-mode:difference;transition:opacity 0.15s';
+ document.body.appendChild(d);
+ setTimeout(function() { d.style.opacity='0'; setTimeout(function() { d.remove(); }, 180); }, 20);
+ };
+ })();