Turn the home cover into a two-tone street poster: stacked-letter title band, manga panels, graffiti and drip lettering, speech bubbles and fold creases. Add a live ASCII canvas, Tag and PosterBand components, graffiti fonts, and jsr / popart / ascii presets to tools/fx.py.
No files matched your search
@@ -19,6 +19,9 @@
|
|||||||
"@fontsource/dela-gothic-one": "^5.3.0",
|
"@fontsource/dela-gothic-one": "^5.3.0",
|
||||||
"@fontsource/dotgothic16": "^5.3.0",
|
"@fontsource/dotgothic16": "^5.3.0",
|
||||||
"@fontsource/ibm-plex-mono": "^5.3.0",
|
"@fontsource/ibm-plex-mono": "^5.3.0",
|
||||||
|
"@fontsource/rubik-mono-one": "^5.3.0",
|
||||||
|
"@fontsource/rubik-wet-paint": "^5.3.0",
|
||||||
|
"@fontsource/sedgwick-ave-display": "^5.3.0",
|
||||||
"@fontsource/vt323": "^5.3.0",
|
"@fontsource/vt323": "^5.3.0",
|
||||||
"@google/model-viewer": "^4.3.1",
|
"@google/model-viewer": "^4.3.1",
|
||||||
"astro": "^7.3.7",
|
"astro": "^7.3.7",
|
||||||
@@ -1317,6 +1320,33 @@
|
|||||||
"url": "https://github.com/sponsors/ayuhito"
|
"url": "https://github.com/sponsors/ayuhito"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"node_modules/@fontsource/rubik-mono-one": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@fontsource/rubik-mono-one/-/rubik-mono-one-5.3.0.tgz",
|
||||||
|
"integrity": "sha512-ReaCXaIKJAFdJAUaw8Gq3qXC9od7JotgqZFsVnwp06KqnBFtrX9qdeUvBdL+7avyUTic20gmzSH0NtEC6xAbDQ==",
|
||||||
|
"license": "OFL-1.1",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ayuhito"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@fontsource/rubik-wet-paint": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@fontsource/rubik-wet-paint/-/rubik-wet-paint-5.3.0.tgz",
|
||||||
|
"integrity": "sha512-nPEMWjlPzZgXd8E1N5zXJuIYfjjuKEa209rhEaTLlVZJAklmtGOPIauUuTT0U0m4nDPR8BOFd0WZoaru8plTMg==",
|
||||||
|
"license": "OFL-1.1",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ayuhito"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"node_modules/@fontsource/sedgwick-ave-display": {
|
||||||
|
"version": "5.3.0",
|
||||||
|
"resolved": "https://registry.npmjs.org/@fontsource/sedgwick-ave-display/-/sedgwick-ave-display-5.3.0.tgz",
|
||||||
|
"integrity": "sha512-dMK26R4CmjHERtZlgwwZP/qQ68lGmF0WhM2AOxMo6E0WUR05CftL1pvFQzHRwVNeg4NParh2i/2B/Nia/+vPzg==",
|
||||||
|
"license": "OFL-1.1",
|
||||||
|
"funding": {
|
||||||
|
"url": "https://github.com/sponsors/ayuhito"
|
||||||
|
}
|
||||||
|
},
|
||||||
"node_modules/@fontsource/vt323": {
|
"node_modules/@fontsource/vt323": {
|
||||||
"version": "5.3.0",
|
"version": "5.3.0",
|
||||||
"resolved": "https://registry.npmjs.org/@fontsource/vt323/-/vt323-5.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/@fontsource/vt323/-/vt323-5.3.0.tgz",
|
||||||
|
|||||||
@@ -25,6 +25,9 @@
|
|||||||
"@fontsource/dela-gothic-one": "^5.3.0",
|
"@fontsource/dela-gothic-one": "^5.3.0",
|
||||||
"@fontsource/dotgothic16": "^5.3.0",
|
"@fontsource/dotgothic16": "^5.3.0",
|
||||||
"@fontsource/ibm-plex-mono": "^5.3.0",
|
"@fontsource/ibm-plex-mono": "^5.3.0",
|
||||||
|
"@fontsource/rubik-mono-one": "^5.3.0",
|
||||||
|
"@fontsource/rubik-wet-paint": "^5.3.0",
|
||||||
|
"@fontsource/sedgwick-ave-display": "^5.3.0",
|
||||||
"@fontsource/vt323": "^5.3.0",
|
"@fontsource/vt323": "^5.3.0",
|
||||||
"@google/model-viewer": "^4.3.1",
|
"@google/model-viewer": "^4.3.1",
|
||||||
"astro": "^7.3.7",
|
"astro": "^7.3.7",
|
||||||
|
|||||||
|
After Width: | Height: | Size: 55 KiB |
|
After Width: | Height: | Size: 229 KiB |
|
Before Width: | Height: | Size: 422 KiB After Width: | Height: | Size: 421 KiB |
|
After Width: | Height: | Size: 217 KiB |
|
After Width: | Height: | Size: 173 KiB |
|
After Width: | Height: | Size: 265 KiB |
|
After Width: | Height: | Size: 245 KiB |
|
Before Width: | Height: | Size: 185 KiB After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 61 KiB |
|
Before Width: | Height: | Size: 183 KiB After Width: | Height: | Size: 185 KiB |
@@ -0,0 +1,166 @@
|
|||||||
|
import { useEffect, useRef } from 'react';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Live ASCII rendering of an image. Characters flicker like a noisy terminal
|
||||||
|
* and scramble around the pointer / finger. Pauses off-screen; static for
|
||||||
|
* reduced motion.
|
||||||
|
*/
|
||||||
|
interface Props {
|
||||||
|
src: string;
|
||||||
|
cols?: number;
|
||||||
|
fg?: string;
|
||||||
|
bg?: string;
|
||||||
|
ramp?: string;
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const NOISE = '01#%@$&*+=?<>/\\';
|
||||||
|
|
||||||
|
export default function AsciiCanvas({
|
||||||
|
src,
|
||||||
|
cols = 64,
|
||||||
|
fg = '#78ffa0',
|
||||||
|
bg = '#06100a',
|
||||||
|
ramp = ' .:-=+*#%@',
|
||||||
|
className = '',
|
||||||
|
}: Props) {
|
||||||
|
const ref = useRef<HTMLCanvasElement>(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const canvas = ref.current;
|
||||||
|
if (!canvas) return;
|
||||||
|
const ctx = canvas.getContext('2d');
|
||||||
|
if (!ctx) return;
|
||||||
|
const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||||
|
const lightBg = parseInt(bg.slice(1, 3), 16) + parseInt(bg.slice(3, 5), 16) + parseInt(bg.slice(5, 7), 16) > 382;
|
||||||
|
|
||||||
|
let lum: Float32Array | null = null;
|
||||||
|
let rows = 0;
|
||||||
|
let cw = 0;
|
||||||
|
let ch = 0;
|
||||||
|
let raf = 0;
|
||||||
|
let visible = false;
|
||||||
|
let last = 0;
|
||||||
|
const pointer = { x: -1e4, y: -1e4 };
|
||||||
|
|
||||||
|
const layout = () => {
|
||||||
|
const dpr = Math.min(window.devicePixelRatio || 1, 1.5);
|
||||||
|
const { width } = canvas.getBoundingClientRect();
|
||||||
|
cw = width / cols;
|
||||||
|
ch = cw * 1.7;
|
||||||
|
canvas.width = Math.round(width * dpr);
|
||||||
|
canvas.height = Math.round(rows * ch * dpr);
|
||||||
|
canvas.style.height = `${rows * ch}px`;
|
||||||
|
ctx.setTransform(dpr, 0, 0, dpr, 0, 0);
|
||||||
|
ctx.font = `700 ${ch * 0.86}px ui-monospace, 'IBM Plex Mono', monospace`;
|
||||||
|
ctx.textBaseline = 'top';
|
||||||
|
};
|
||||||
|
|
||||||
|
const draw = (t: number) => {
|
||||||
|
if (!lum) return;
|
||||||
|
ctx.fillStyle = bg;
|
||||||
|
ctx.fillRect(0, 0, cols * cw, rows * ch);
|
||||||
|
ctx.fillStyle = fg;
|
||||||
|
const n = ramp.length - 1;
|
||||||
|
const rad = cw * 7;
|
||||||
|
for (let r = 0; r < rows; r++) {
|
||||||
|
for (let c = 0; c < cols; c++) {
|
||||||
|
let v = lum[r * cols + c];
|
||||||
|
if (lightBg) v = 1 - v;
|
||||||
|
let char = ramp[Math.round(v * n)];
|
||||||
|
const dx = c * cw - pointer.x;
|
||||||
|
const dy = r * ch - pointer.y;
|
||||||
|
const near = dx * dx + dy * dy < rad * rad;
|
||||||
|
if (!reduce && (near || Math.random() < 0.012) && v > 0.08) {
|
||||||
|
char = NOISE[(Math.random() * NOISE.length) | 0];
|
||||||
|
}
|
||||||
|
if (char !== ' ') ctx.fillText(char, c * cw, r * ch);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// slow scanning bar
|
||||||
|
if (!reduce) {
|
||||||
|
const y = ((t / 40) % (rows * ch + 40)) - 20;
|
||||||
|
ctx.fillStyle = lightBg ? 'rgba(0,0,0,0.06)' : 'rgba(120,255,160,0.07)';
|
||||||
|
ctx.fillRect(0, y, cols * cw, 20);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const loop = (t: number) => {
|
||||||
|
if (t - last > 70) {
|
||||||
|
draw(t);
|
||||||
|
last = t;
|
||||||
|
}
|
||||||
|
raf = visible && !document.documentElement.classList.contains('menu-open') ? requestAnimationFrame(loop) : 0;
|
||||||
|
};
|
||||||
|
const kick = () => {
|
||||||
|
if (reduce) return draw(0);
|
||||||
|
if (!raf && visible && lum) raf = requestAnimationFrame(loop);
|
||||||
|
};
|
||||||
|
|
||||||
|
const img = new Image();
|
||||||
|
img.onload = () => {
|
||||||
|
const { width } = canvas.getBoundingClientRect();
|
||||||
|
rows = Math.max(1, Math.round((cols * img.naturalHeight) / img.naturalWidth / 1.7));
|
||||||
|
const off = document.createElement('canvas');
|
||||||
|
off.width = cols;
|
||||||
|
off.height = rows;
|
||||||
|
const octx = off.getContext('2d', { willReadFrequently: true })!;
|
||||||
|
octx.drawImage(img, 0, 0, cols, rows);
|
||||||
|
const data = octx.getImageData(0, 0, cols, rows).data;
|
||||||
|
lum = new Float32Array(cols * rows);
|
||||||
|
let lo = 1;
|
||||||
|
let hi = 0;
|
||||||
|
for (let i = 0; i < cols * rows; i++) {
|
||||||
|
const a = data[i * 4 + 3] / 255;
|
||||||
|
const l = ((0.299 * data[i * 4] + 0.587 * data[i * 4 + 1] + 0.114 * data[i * 4 + 2]) / 255) * a;
|
||||||
|
lum[i] = l;
|
||||||
|
lo = Math.min(lo, l);
|
||||||
|
hi = Math.max(hi, l);
|
||||||
|
}
|
||||||
|
for (let i = 0; i < lum.length; i++) lum[i] = (lum[i] - lo) / Math.max(0.001, hi - lo);
|
||||||
|
if (width) layout();
|
||||||
|
canvas.dataset.ready = 'true';
|
||||||
|
draw(0);
|
||||||
|
kick();
|
||||||
|
};
|
||||||
|
img.src = src;
|
||||||
|
|
||||||
|
const ro = new ResizeObserver(() => {
|
||||||
|
if (lum) {
|
||||||
|
layout();
|
||||||
|
draw(performance.now());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
ro.observe(canvas);
|
||||||
|
const io = new IntersectionObserver(([e]) => {
|
||||||
|
visible = e.isIntersecting;
|
||||||
|
kick();
|
||||||
|
});
|
||||||
|
io.observe(canvas);
|
||||||
|
const move = (e: PointerEvent) => {
|
||||||
|
const r = canvas.getBoundingClientRect();
|
||||||
|
pointer.x = e.clientX - r.left;
|
||||||
|
pointer.y = e.clientY - r.top;
|
||||||
|
};
|
||||||
|
const leave = () => {
|
||||||
|
pointer.x = pointer.y = -1e4;
|
||||||
|
};
|
||||||
|
canvas.addEventListener('pointermove', move);
|
||||||
|
canvas.addEventListener('pointerleave', leave);
|
||||||
|
canvas.addEventListener('pointerup', leave);
|
||||||
|
const mo = new MutationObserver(kick);
|
||||||
|
mo.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
cancelAnimationFrame(raf);
|
||||||
|
ro.disconnect();
|
||||||
|
io.disconnect();
|
||||||
|
mo.disconnect();
|
||||||
|
canvas.removeEventListener('pointermove', move);
|
||||||
|
canvas.removeEventListener('pointerleave', leave);
|
||||||
|
canvas.removeEventListener('pointerup', leave);
|
||||||
|
};
|
||||||
|
}, [src, cols, fg, bg, ramp]);
|
||||||
|
|
||||||
|
return <canvas ref={ref} className={`ascii-canvas ${className}`} aria-hidden="true" style={{ display: 'block', width: '100%', touchAction: 'pan-y' }} />;
|
||||||
|
}
|
||||||
@@ -0,0 +1,83 @@
|
|||||||
|
---
|
||||||
|
/**
|
||||||
|
* Vertical street-poster title band: big stacked letters with small captions
|
||||||
|
* between them, a spiral at the bottom. Ink/paper colours come from props.
|
||||||
|
*/
|
||||||
|
interface Props {
|
||||||
|
word: string;
|
||||||
|
captions?: string[];
|
||||||
|
ink?: string;
|
||||||
|
paper?: string;
|
||||||
|
class?: string;
|
||||||
|
}
|
||||||
|
const { word, captions = [], ink = 'var(--jsr-ink)', paper = 'var(--jsr-paper)', class: cls } = Astro.props;
|
||||||
|
const letters = [...word];
|
||||||
|
---
|
||||||
|
|
||||||
|
<aside class:list={['band', cls]} style={`--ink:${ink};--paper:${paper}`} aria-hidden="true">
|
||||||
|
<span class="rule"></span>
|
||||||
|
{
|
||||||
|
letters.map((l, i) => (
|
||||||
|
<>
|
||||||
|
<span class="letter" style={`--i:${i}`}>{l}</span>
|
||||||
|
{captions[i] && <span class="cap">{captions[i]}</span>}
|
||||||
|
</>
|
||||||
|
))
|
||||||
|
}
|
||||||
|
<svg class="spiral" viewBox="0 0 100 100">
|
||||||
|
<path
|
||||||
|
d="M50 50 m0 -4 a4 4 0 1 1 -4 4 a8 8 0 0 1 8 -8 a12 12 0 1 1 -12 12 a16 16 0 0 1 16 -16 a20 20 0 1 1 -20 20 a24 24 0 0 1 24 -24 a28 28 0 1 1 -28 28 a32 32 0 0 1 32 -32"
|
||||||
|
fill="none"
|
||||||
|
stroke="currentColor"
|
||||||
|
stroke-width="7"
|
||||||
|
stroke-linecap="round"></path>
|
||||||
|
</svg>
|
||||||
|
</aside>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.band {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.15em;
|
||||||
|
padding: 0.6em 0.3em;
|
||||||
|
background: var(--ink);
|
||||||
|
color: var(--paper);
|
||||||
|
font-family: var(--ff-poster);
|
||||||
|
font-size: clamp(2.6rem, 13vw, 6rem);
|
||||||
|
line-height: 0.92;
|
||||||
|
text-transform: uppercase;
|
||||||
|
user-select: none;
|
||||||
|
}
|
||||||
|
.rule {
|
||||||
|
width: 70%;
|
||||||
|
height: 0.08em;
|
||||||
|
margin-bottom: 0.15em;
|
||||||
|
background: currentColor;
|
||||||
|
box-shadow: 0 0.14em 0 currentColor;
|
||||||
|
}
|
||||||
|
.letter {
|
||||||
|
display: block;
|
||||||
|
animation: stamp 0.5s calc(var(--i) * 70ms + 0.2s) cubic-bezier(0.3, 1.5, 0.5, 1) both;
|
||||||
|
}
|
||||||
|
.cap {
|
||||||
|
font-family: var(--ff-grotesk);
|
||||||
|
font-weight: 800;
|
||||||
|
font-size: 0.17em;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
margin: -0.1em 0 0.2em;
|
||||||
|
}
|
||||||
|
.spiral {
|
||||||
|
width: 0.9em;
|
||||||
|
height: 0.9em;
|
||||||
|
margin-top: auto;
|
||||||
|
padding-top: 0.2em;
|
||||||
|
animation: spin-slow 12s linear infinite;
|
||||||
|
}
|
||||||
|
@keyframes stamp {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(1.8) rotate(-8deg);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,53 @@
|
|||||||
|
---
|
||||||
|
// Graffiti tag: spray-paint lettering with an outline and drop shadow.
|
||||||
|
interface Props {
|
||||||
|
text: string;
|
||||||
|
color?: string;
|
||||||
|
outline?: string;
|
||||||
|
shadow?: string;
|
||||||
|
size?: string;
|
||||||
|
rotate?: number;
|
||||||
|
font?: 'tag' | 'drip';
|
||||||
|
as?: 'span' | 'p' | 'h1' | 'h2';
|
||||||
|
class?: string;
|
||||||
|
}
|
||||||
|
const {
|
||||||
|
text,
|
||||||
|
color = 'var(--cta-yellow)',
|
||||||
|
outline = 'var(--ink)',
|
||||||
|
shadow = 'var(--cta-red)',
|
||||||
|
size = '4rem',
|
||||||
|
rotate = -6,
|
||||||
|
font = 'tag',
|
||||||
|
as: El = 'span',
|
||||||
|
class: cls,
|
||||||
|
} = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<El class:list={['tag-graffiti', `f-${font}`, cls]} style={`--c:${color};--o:${outline};--sh:${shadow};--sz:${size};--rot:${rotate}deg`}>
|
||||||
|
{text}
|
||||||
|
</El>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.tag-graffiti {
|
||||||
|
display: inline-block;
|
||||||
|
font-size: var(--sz);
|
||||||
|
line-height: 0.95;
|
||||||
|
color: var(--c);
|
||||||
|
-webkit-text-stroke: calc(var(--sz) * 0.045) var(--o);
|
||||||
|
paint-order: stroke fill;
|
||||||
|
text-shadow:
|
||||||
|
calc(var(--sz) * 0.05) calc(var(--sz) * 0.06) 0 var(--sh),
|
||||||
|
calc(var(--sz) * 0.08) calc(var(--sz) * 0.1) 0 var(--o);
|
||||||
|
rotate: var(--rot);
|
||||||
|
white-space: nowrap;
|
||||||
|
text-transform: none;
|
||||||
|
letter-spacing: 0;
|
||||||
|
}
|
||||||
|
.f-tag {
|
||||||
|
font-family: var(--ff-tag);
|
||||||
|
}
|
||||||
|
.f-drip {
|
||||||
|
font-family: var(--ff-drip);
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -5,6 +5,10 @@ import Base from '../layouts/Base.astro';
|
|||||||
import ProjectCard from '../components/ProjectCard.astro';
|
import ProjectCard from '../components/ProjectCard.astro';
|
||||||
import LineBadge from '../components/LineBadge.astro';
|
import LineBadge from '../components/LineBadge.astro';
|
||||||
import FxImage from '../components/FxImage.astro';
|
import FxImage from '../components/FxImage.astro';
|
||||||
|
import PosterBand from '../components/deco/PosterBand.astro';
|
||||||
|
import Tag from '../components/deco/Tag.astro';
|
||||||
|
import AsciiCanvas from '../components/AsciiCanvas';
|
||||||
|
import { Image } from 'astro:assets';
|
||||||
import Starburst from '../components/deco/Starburst.astro';
|
import Starburst from '../components/deco/Starburst.astro';
|
||||||
import Barcode from '../components/deco/Barcode.astro';
|
import Barcode from '../components/deco/Barcode.astro';
|
||||||
import Clipping from '../components/deco/Clipping.astro';
|
import Clipping from '../components/deco/Clipping.astro';
|
||||||
@@ -15,7 +19,9 @@ import StickerPeel from '../components/bits/StickerPeel';
|
|||||||
import { SITE } from '../lib/site';
|
import { SITE } from '../lib/site';
|
||||||
import { DISCIPLINES, LINES } from '../lib/disciplines';
|
import { DISCIPLINES, LINES } from '../lib/disciplines';
|
||||||
|
|
||||||
import motoToon from '../assets/fx/motorcycle-toon.webp';
|
import motoJsr from '../assets/fx/motorcycle-jsr.webp';
|
||||||
|
import guitarPop from '../assets/fx/guitar-strat-popart.webp';
|
||||||
|
import cassettePhoto from '../assets/photos/cassette.jpg';
|
||||||
import motoPixel from '../assets/fx/motorcycle-pixel.webp';
|
import motoPixel from '../assets/fx/motorcycle-pixel.webp';
|
||||||
import cassette from '../assets/fx/cassette-vintage.webp';
|
import cassette from '../assets/fx/cassette-vintage.webp';
|
||||||
import tv from '../assets/fx/tv-vintage.webp';
|
import tv from '../assets/fx/tv-vintage.webp';
|
||||||
@@ -26,6 +32,7 @@ import floppies from '../assets/photos/floppies-sticker.png';
|
|||||||
|
|
||||||
const gbaSticker = await getImage({ src: gba, width: 360, format: 'webp' });
|
const gbaSticker = await getImage({ src: gba, width: 360, format: 'webp' });
|
||||||
const floppySticker = await getImage({ src: floppies, width: 320, format: 'webp' });
|
const floppySticker = await getImage({ src: floppies, width: 320, format: 'webp' });
|
||||||
|
const asciiSrc = await getImage({ src: cassettePhoto, width: 400, format: 'webp' });
|
||||||
|
|
||||||
const work = (await getCollection('work')).sort(
|
const work = (await getCollection('work')).sort(
|
||||||
(a, b) => Number(b.data.featured) - Number(a.data.featured) || +b.data.date - +a.data.date,
|
(a, b) => Number(b.data.featured) - Number(a.data.featured) || +b.data.date - +a.data.date,
|
||||||
@@ -41,7 +48,6 @@ const fmt = (d: Date) => d.toLocaleDateString('en-US', { month: 'short', day: 'n
|
|||||||
const now = new Date();
|
const now = new Date();
|
||||||
const season = ['Winter', 'Spring', 'Summer', 'Fall'][Math.floor(((now.getMonth() + 1) % 12) / 3)];
|
const season = ['Winter', 'Spring', 'Summer', 'Fall'][Math.floor(((now.getMonth() + 1) % 12) / 3)];
|
||||||
const issue = String(now.getMonth() + 1).padStart(2, '0');
|
const issue = String(now.getMonth() + 1).padStart(2, '0');
|
||||||
const osdDate = now.toLocaleDateString('en-US', { month: 'short', day: '2-digit', year: 'numeric' }).toUpperCase().replace(',', '');
|
|
||||||
---
|
---
|
||||||
|
|
||||||
<Base>
|
<Base>
|
||||||
@@ -49,54 +55,44 @@ const osdDate = now.toLocaleDateString('en-US', { month: 'short', day: '2-digit'
|
|||||||
<section class="cover">
|
<section class="cover">
|
||||||
<div class="speedlines" aria-hidden="true"></div>
|
<div class="speedlines" aria-hidden="true"></div>
|
||||||
<div class="wrap cover-in">
|
<div class="wrap cover-in">
|
||||||
<header class="masthead">
|
<div class="poster">
|
||||||
<p class="logo glitch" data-text="YOYOS" aria-hidden="true">YOYOS</p>
|
<PosterBand word="YOYOS" captions={['TOOLS', 'WEB', 'GAMES', '3D', 'MUSIC']} />
|
||||||
<div class="issue">
|
|
||||||
<span>Vol.{issue}</span>
|
|
||||||
<span>{season} {now.getFullYear()}</span>
|
|
||||||
<span class="price">Free</span>
|
|
||||||
</div>
|
|
||||||
</header>
|
|
||||||
|
|
||||||
<div class="hero">
|
<div class="panels">
|
||||||
<div class="screen hover-glitch">
|
<p class="plabel top">Software engineer ✦ Vol.{issue} {season} {now.getFullYear()}</p>
|
||||||
<FxImage
|
|
||||||
src={motoToon}
|
<figure class="p p1 hover-glitch">
|
||||||
mode="vhs"
|
<Image src={motoJsr} alt="Cafe racer motorcycle printed as a two-tone street poster" widths={[400, 700, 960]} sizes="(min-width: 60rem) 40vw, 72vw" loading="eager" />
|
||||||
amount={0.9}
|
</figure>
|
||||||
ratio="4 / 3.3"
|
<figure class="p p2">
|
||||||
loading="eager"
|
<AsciiCanvas client:visible src={asciiSrc.src} cols={34} fg="#e2e996" bg="#16261a" />
|
||||||
sizes="(min-width: 60rem) 55vw, 100vw"
|
<span class="plabel in">ASCII.EXE</span>
|
||||||
alt="Cafe racer motorcycle, cel-shaded"
|
</figure>
|
||||||
/>
|
<figure class="p p3 hover-glitch">
|
||||||
<div class="osd" aria-hidden="true">
|
<Image src={guitarPop} alt="Electric guitar in pop-art dots" widths={[300, 500]} sizes="36vw" />
|
||||||
<span>▶ PLAY</span>
|
</figure>
|
||||||
<span class="rec">REC</span>
|
|
||||||
|
<h1 class="tags">
|
||||||
|
<Tag text="Johan" size="clamp(2.8rem, 14.5vw, 7.5rem)" color="var(--jsr-paper)" shadow="var(--cta-red)" rotate={-8} />
|
||||||
|
<Tag text="Sandoval" font="drip" size="clamp(1.9rem, 9.6vw, 4.8rem)" color="var(--cta-yellow)" shadow="var(--jsr-ink)" rotate={-3} />
|
||||||
|
</h1>
|
||||||
|
|
||||||
|
<p class="bubble say" aria-hidden="true">I build the tools teams run on!</p>
|
||||||
|
<p class="bubble dots" aria-hidden="true">· · · !</p>
|
||||||
|
|
||||||
|
<div class="badge" aria-hidden="true">
|
||||||
|
<CircularText client:visible text="OPEN TO WORK ✦ SOFTWARE ENGINEER ✦ " spinDuration={16} onHover="speedUp" className="badge-ring" />
|
||||||
|
<span class="sparkle" style="--s:2rem;--c:var(--cta-yellow)"></span>
|
||||||
</div>
|
</div>
|
||||||
<div class="osd osd-bottom" aria-hidden="true">
|
|
||||||
<span>SP</span>
|
<div class="sticker sticker-gba" aria-hidden="true">
|
||||||
<span>{osdDate} <span class="tc" data-timecode>00:00:00</span></span>
|
<StickerPeel client:visible imageSrc={gbaSticker.src} width={120} rotate={-10} peelDirection={20} shadowIntensity={0.45} lightingIntensity={0.08} />
|
||||||
</div>
|
</div>
|
||||||
|
<span class="sparkle s1" style="--s:1.5rem;--c:#fff;--d:1.8s" aria-hidden="true"></span>
|
||||||
|
<span class="sparkle s2" style="--s:1.1rem;--c:var(--cta-pink);--d:2.6s" aria-hidden="true"></span>
|
||||||
|
|
||||||
|
<p class="plabel bottom">yoyos.sh</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<h1 class="name">
|
|
||||||
<span class="first glitch" data-text="Johan">Johan</span>
|
|
||||||
<span class="last">Sandoval</span>
|
|
||||||
</h1>
|
|
||||||
|
|
||||||
<p class="role-tag">Software Engineer</p>
|
|
||||||
<p class="bubble say" aria-hidden="true">I build the tools teams run on!</p>
|
|
||||||
|
|
||||||
<div class="badge" aria-hidden="true">
|
|
||||||
<CircularText client:visible text="OPEN TO WORK ✦ SOFTWARE ENGINEER ✦ " spinDuration={16} onHover="speedUp" className="badge-ring" />
|
|
||||||
<span class="sparkle" style="--s:2.2rem;--c:var(--cta-yellow)"></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="sticker sticker-gba" aria-hidden="true">
|
|
||||||
<StickerPeel client:visible imageSrc={gbaSticker.src} width={150} rotate={-8} peelDirection={20} shadowIntensity={0.45} lightingIntensity={0.08} />
|
|
||||||
</div>
|
|
||||||
<span class="sparkle s1" style="--s:1.6rem;--c:#fff;--d:1.8s" aria-hidden="true"></span>
|
|
||||||
<span class="sparkle s2" style="--s:1.1rem;--c:var(--cta-pink);--d:2.6s" aria-hidden="true"></span>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="deck">
|
<div class="deck">
|
||||||
@@ -248,36 +244,21 @@ const osdDate = now.toLocaleDateString('en-US', { month: 'short', day: '2-digit'
|
|||||||
</section>
|
</section>
|
||||||
</Base>
|
</Base>
|
||||||
|
|
||||||
<script>
|
|
||||||
// Camcorder timecode on the cover.
|
|
||||||
function timecode() {
|
|
||||||
const el = document.querySelector<HTMLElement>('[data-timecode]');
|
|
||||||
if (!el || matchMedia('(prefers-reduced-motion: reduce)').matches) return;
|
|
||||||
const start = Date.now();
|
|
||||||
const pad = (n: number) => String(n).padStart(2, '0');
|
|
||||||
const id = setInterval(() => {
|
|
||||||
if (!el.isConnected) return clearInterval(id);
|
|
||||||
const s = Math.floor((Date.now() - start) / 1000);
|
|
||||||
el.textContent = `${pad(Math.floor(s / 3600))}:${pad(Math.floor(s / 60) % 60)}:${pad(s % 60)}`;
|
|
||||||
}, 1000);
|
|
||||||
}
|
|
||||||
document.addEventListener('astro:page-load', timecode);
|
|
||||||
</script>
|
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
/* ============ cover (mobile first) ============ */
|
/* ============ cover: street poster (mobile first) ============ */
|
||||||
.cover {
|
.cover {
|
||||||
position: relative;
|
position: relative;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
padding-block: var(--space-4) var(--space-7);
|
padding-block: var(--space-4) var(--space-7);
|
||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
background:
|
background:
|
||||||
radial-gradient(circle, color-mix(in oklab, var(--cta-red) 22%, transparent) 1.2px, transparent 1.6px) 0 0 / 10px 10px,
|
radial-gradient(circle, color-mix(in oklab, var(--jsr-ink) 25%, transparent) 1.2px, transparent 1.6px) 0 0 / 9px 9px,
|
||||||
var(--paper);
|
var(--paper);
|
||||||
border-bottom: 3px solid var(--ink);
|
border-bottom: 3px solid var(--ink);
|
||||||
}
|
}
|
||||||
.cover > .speedlines {
|
.cover > .speedlines {
|
||||||
color: var(--ink);
|
color: var(--jsr-ink);
|
||||||
}
|
}
|
||||||
.cover-in {
|
.cover-in {
|
||||||
position: relative;
|
position: relative;
|
||||||
@@ -285,119 +266,123 @@ const osdDate = now.toLocaleDateString('en-US', { month: 'short', day: '2-digit'
|
|||||||
grid-template-columns: minmax(0, 1fr);
|
grid-template-columns: minmax(0, 1fr);
|
||||||
gap: var(--space-5);
|
gap: var(--space-5);
|
||||||
}
|
}
|
||||||
.masthead {
|
|
||||||
display: flex;
|
.poster {
|
||||||
align-items: flex-end;
|
position: relative;
|
||||||
justify-content: space-between;
|
display: grid;
|
||||||
gap: var(--space-3);
|
grid-template-columns: auto minmax(0, 1fr);
|
||||||
padding-bottom: var(--space-2);
|
border: 3px solid var(--ink);
|
||||||
border-bottom: 4px solid var(--ink);
|
background: var(--jsr-paper);
|
||||||
animation: drop 0.7s var(--ease) both;
|
box-shadow: 7px 7px 0 var(--ink);
|
||||||
|
/* fold creases across the whole poster */
|
||||||
|
background-image:
|
||||||
|
linear-gradient(90deg, transparent calc(50% - 1px), rgb(255 255 255 / 0.35) calc(50% - 1px) 50%, rgb(0 0 0 / 0.12) 50% calc(50% + 2px), transparent calc(50% + 2px)),
|
||||||
|
linear-gradient(transparent calc(40% - 1px), rgb(255 255 255 / 0.35) calc(40% - 1px) 40%, rgb(0 0 0 / 0.12) 40% calc(40% + 2px), transparent calc(40% + 2px));
|
||||||
|
animation: rise 0.8s var(--ease) both;
|
||||||
}
|
}
|
||||||
.logo {
|
.poster :global(.band) {
|
||||||
font-family: var(--ff-mag);
|
font-size: clamp(2.5rem, 12.5vw, 5.6rem);
|
||||||
font-size: clamp(3.2rem, 17vw, 9.5rem);
|
border-right: 3px solid var(--ink);
|
||||||
line-height: 0.82;
|
}
|
||||||
letter-spacing: -0.05em;
|
.panels {
|
||||||
color: var(--cta-red);
|
position: relative;
|
||||||
-webkit-text-stroke: 2px var(--ink);
|
display: grid;
|
||||||
paint-order: stroke fill;
|
grid-template-columns: 1fr 1fr;
|
||||||
text-shadow: 4px 4px 0 var(--ink);
|
grid-template-rows: auto auto 1fr auto auto;
|
||||||
white-space: nowrap;
|
grid-template-areas:
|
||||||
|
'top top'
|
||||||
|
'p1 p1'
|
||||||
|
'p2 p3'
|
||||||
|
'tags tags'
|
||||||
|
'bottom bottom';
|
||||||
|
gap: 6px;
|
||||||
|
padding: 8px;
|
||||||
min-width: 0;
|
min-width: 0;
|
||||||
}
|
}
|
||||||
.logo::before,
|
.plabel {
|
||||||
.logo::after,
|
font-family: var(--ff-poster);
|
||||||
.first::before,
|
font-size: clamp(0.55rem, 2.4vw, 0.85rem);
|
||||||
.first::after {
|
|
||||||
-webkit-text-stroke: 0;
|
|
||||||
text-shadow: none;
|
|
||||||
}
|
|
||||||
.issue {
|
|
||||||
flex: none;
|
|
||||||
display: grid;
|
|
||||||
justify-items: end;
|
|
||||||
gap: 2px;
|
|
||||||
font-family: var(--ff-grotesk);
|
|
||||||
font-weight: 800;
|
|
||||||
font-size: 0.72rem;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.05em;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
.price {
|
|
||||||
padding: 0.05em 0.5em;
|
|
||||||
background: var(--ink);
|
|
||||||
color: var(--cta-yellow);
|
|
||||||
}
|
|
||||||
|
|
||||||
.hero {
|
|
||||||
position: relative;
|
|
||||||
}
|
|
||||||
.screen {
|
|
||||||
position: relative;
|
|
||||||
border: 3px solid var(--ink);
|
|
||||||
box-shadow: 6px 6px 0 var(--ink);
|
|
||||||
rotate: -1.2deg;
|
|
||||||
animation: rise 0.9s 0.1s var(--ease) both;
|
|
||||||
}
|
|
||||||
.tc {
|
|
||||||
margin-left: 0.4em;
|
|
||||||
}
|
|
||||||
.name {
|
|
||||||
position: relative;
|
|
||||||
z-index: 2;
|
|
||||||
display: grid;
|
|
||||||
margin-top: -2.6rem;
|
|
||||||
padding-inline: 0.2rem;
|
|
||||||
font-family: var(--ff-mag);
|
|
||||||
font-weight: 400;
|
|
||||||
font-size: clamp(3.1rem, 15.5vw, 8.5rem);
|
|
||||||
line-height: 0.86;
|
|
||||||
letter-spacing: -0.045em;
|
|
||||||
text-transform: none;
|
|
||||||
animation: rise 0.8s 0.25s var(--ease) both;
|
|
||||||
}
|
|
||||||
.first {
|
|
||||||
color: #fffdf7;
|
|
||||||
-webkit-text-stroke: 2.5px var(--ink);
|
|
||||||
paint-order: stroke fill;
|
|
||||||
text-shadow: 5px 5px 0 var(--ink);
|
|
||||||
}
|
|
||||||
.last {
|
|
||||||
color: var(--ink);
|
|
||||||
text-shadow:
|
|
||||||
5px 5px 0 var(--cta-yellow),
|
|
||||||
-2px 0 0 rgb(0 229 255 / 0.6),
|
|
||||||
2px 0 0 rgb(255 42 109 / 0.6);
|
|
||||||
}
|
|
||||||
.role-tag {
|
|
||||||
position: absolute;
|
|
||||||
z-index: 3;
|
|
||||||
top: 2.6rem;
|
|
||||||
left: -0.4rem;
|
|
||||||
padding: 0.3rem 0.7rem;
|
|
||||||
background: var(--cta-blue);
|
|
||||||
color: #fff;
|
|
||||||
border: 2px solid var(--ink);
|
|
||||||
font-family: var(--ff-grotesk);
|
|
||||||
font-weight: 800;
|
|
||||||
font-size: 0.9rem;
|
|
||||||
text-transform: uppercase;
|
|
||||||
letter-spacing: 0.04em;
|
letter-spacing: 0.04em;
|
||||||
rotate: -4deg;
|
text-transform: uppercase;
|
||||||
box-shadow: 3px 3px 0 var(--ink);
|
color: var(--jsr-ink);
|
||||||
|
}
|
||||||
|
.plabel.top {
|
||||||
|
grid-area: top;
|
||||||
|
}
|
||||||
|
.plabel.bottom {
|
||||||
|
grid-area: bottom;
|
||||||
|
justify-self: end;
|
||||||
|
}
|
||||||
|
.p {
|
||||||
|
position: relative;
|
||||||
|
margin: 0;
|
||||||
|
overflow: hidden;
|
||||||
|
border: 3px solid var(--jsr-ink);
|
||||||
|
background: var(--jsr-ink);
|
||||||
|
}
|
||||||
|
.p :global(img) {
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
}
|
||||||
|
.p1 {
|
||||||
|
grid-area: p1;
|
||||||
|
aspect-ratio: 4 / 3;
|
||||||
|
clip-path: polygon(0 0, 100% 0, 100% 88%, 0 100%);
|
||||||
|
}
|
||||||
|
.p2 {
|
||||||
|
grid-area: p2;
|
||||||
|
align-self: start;
|
||||||
|
rotate: -1.5deg;
|
||||||
|
}
|
||||||
|
.p3 {
|
||||||
|
grid-area: p3;
|
||||||
|
aspect-ratio: 1;
|
||||||
|
rotate: 2deg;
|
||||||
|
}
|
||||||
|
.plabel.in {
|
||||||
|
position: absolute;
|
||||||
|
left: 4px;
|
||||||
|
bottom: 3px;
|
||||||
|
padding: 0 4px;
|
||||||
|
background: var(--jsr-ink);
|
||||||
|
color: var(--jsr-paper);
|
||||||
|
font-size: 0.55rem;
|
||||||
|
}
|
||||||
|
.tags {
|
||||||
|
grid-area: tags;
|
||||||
|
position: relative;
|
||||||
|
z-index: 3;
|
||||||
|
display: grid;
|
||||||
|
justify-items: start;
|
||||||
|
margin-top: clamp(-7.5rem, -24vw, -4.5rem);
|
||||||
|
font-weight: 400;
|
||||||
|
}
|
||||||
|
.tags :global(.tag-graffiti:last-child) {
|
||||||
|
margin: -0.35em 0 0 0.6em;
|
||||||
|
animation: rise 0.7s 0.45s var(--ease) both;
|
||||||
|
}
|
||||||
|
.tags :global(.tag-graffiti:first-child) {
|
||||||
|
animation: rise 0.7s 0.3s var(--ease) both;
|
||||||
}
|
}
|
||||||
.say {
|
.say {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 3;
|
z-index: 4;
|
||||||
top: 5.2rem;
|
top: 2.2rem;
|
||||||
left: 0.6rem;
|
right: 0.5rem;
|
||||||
max-width: 11rem;
|
max-width: 9.5rem;
|
||||||
font-size: 0.85rem;
|
font-size: 0.78rem;
|
||||||
rotate: -3deg;
|
rotate: 3deg;
|
||||||
animation: pop 0.5s 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) both;
|
animation: pop 0.5s 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) both;
|
||||||
}
|
}
|
||||||
|
.dots {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 4;
|
||||||
|
right: 0.6rem;
|
||||||
|
top: 58%;
|
||||||
|
font-size: 0.8rem;
|
||||||
|
animation: pop 0.5s 1.1s cubic-bezier(0.3, 1.6, 0.5, 1) both;
|
||||||
|
}
|
||||||
@keyframes pop {
|
@keyframes pop {
|
||||||
from {
|
from {
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -406,13 +391,13 @@ const osdDate = now.toLocaleDateString('en-US', { month: 'short', day: '2-digit'
|
|||||||
}
|
}
|
||||||
.badge {
|
.badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 3;
|
z-index: 5;
|
||||||
top: -0.8rem;
|
top: 2rem;
|
||||||
right: -0.4rem;
|
left: -0.4rem;
|
||||||
display: grid;
|
display: grid;
|
||||||
place-items: center;
|
place-items: center;
|
||||||
width: 6.6rem;
|
width: 4.8rem;
|
||||||
height: 6.6rem;
|
height: 4.8rem;
|
||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--ink);
|
background: var(--ink);
|
||||||
color: var(--paper);
|
color: var(--paper);
|
||||||
@@ -429,30 +414,30 @@ const osdDate = now.toLocaleDateString('en-US', { month: 'short', day: '2-digit'
|
|||||||
color: var(--paper);
|
color: var(--paper);
|
||||||
}
|
}
|
||||||
.badge :global(.badge-ring span) {
|
.badge :global(.badge-ring span) {
|
||||||
font-size: 0.62rem;
|
font-size: 0.5rem;
|
||||||
inset: 0.25rem;
|
inset: 0.18rem;
|
||||||
}
|
}
|
||||||
.sticker {
|
.sticker {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
.sticker-gba {
|
.sticker-gba {
|
||||||
right: -0.5rem;
|
left: 34%;
|
||||||
bottom: 5.5rem;
|
top: 46%;
|
||||||
width: 150px;
|
width: 120px;
|
||||||
height: 110px;
|
height: 90px;
|
||||||
}
|
}
|
||||||
.hero > .sparkle {
|
.panels > .sparkle {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 4;
|
z-index: 4;
|
||||||
}
|
}
|
||||||
.s1 {
|
.s1 {
|
||||||
top: 42%;
|
top: 30%;
|
||||||
left: 8%;
|
left: 6%;
|
||||||
}
|
}
|
||||||
.s2 {
|
.s2 {
|
||||||
top: 18%;
|
top: 12%;
|
||||||
right: 34%;
|
right: 40%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.deck {
|
.deck {
|
||||||
@@ -517,26 +502,28 @@ const osdDate = now.toLocaleDateString('en-US', { month: 'short', day: '2-digit'
|
|||||||
}
|
}
|
||||||
.cl .big {
|
.cl .big {
|
||||||
display: block;
|
display: block;
|
||||||
font-family: var(--ff-mag);
|
font-family: var(--ff-tag);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
font-size: 1.7rem;
|
font-size: 1.9rem;
|
||||||
line-height: 1.05;
|
line-height: 1;
|
||||||
}
|
}
|
||||||
.cl-1 {
|
.cl-1 {
|
||||||
background: var(--cta-pink);
|
background: var(--cta-pink);
|
||||||
rotate: -1.2deg;
|
rotate: -1.2deg;
|
||||||
}
|
}
|
||||||
.cl-2 {
|
.cl-2 {
|
||||||
background: #fffdf7;
|
background: var(--jsr-paper);
|
||||||
rotate: 0.8deg;
|
rotate: 0.8deg;
|
||||||
}
|
}
|
||||||
.cl-3 {
|
.cl-3 {
|
||||||
background: var(--cta-green);
|
background: var(--jsr-ink);
|
||||||
color: #fff;
|
color: var(--jsr-paper);
|
||||||
rotate: -0.6deg;
|
rotate: -0.6deg;
|
||||||
}
|
}
|
||||||
.strip {
|
.strip {
|
||||||
border: 2px solid var(--ink);
|
border: 2px solid var(--ink);
|
||||||
|
--a: var(--jsr-ink);
|
||||||
|
--b: var(--jsr-paper);
|
||||||
}
|
}
|
||||||
.cover :global(.burst) {
|
.cover :global(.burst) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -555,12 +542,6 @@ const osdDate = now.toLocaleDateString('en-US', { month: 'short', day: '2-digit'
|
|||||||
transform: translateY(28px);
|
transform: translateY(28px);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@keyframes drop {
|
|
||||||
from {
|
|
||||||
opacity: 0;
|
|
||||||
transform: translateY(-16px);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/* ============ cover (desktop) ============ */
|
/* ============ cover (desktop) ============ */
|
||||||
@media (min-width: 60rem) {
|
@media (min-width: 60rem) {
|
||||||
@@ -568,21 +549,17 @@ const osdDate = now.toLocaleDateString('en-US', { month: 'short', day: '2-digit'
|
|||||||
padding-block: var(--space-6) var(--space-8);
|
padding-block: var(--space-6) var(--space-8);
|
||||||
}
|
}
|
||||||
.cover-in {
|
.cover-in {
|
||||||
grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
|
grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
|
||||||
grid-template-areas:
|
grid-template-areas:
|
||||||
'mast mast'
|
'poster deck'
|
||||||
'hero deck'
|
'poster lines'
|
||||||
'hero lines'
|
'poster strip'
|
||||||
'hero strip'
|
'poster code';
|
||||||
'hero code';
|
|
||||||
column-gap: var(--space-7);
|
column-gap: var(--space-7);
|
||||||
align-items: start;
|
align-items: start;
|
||||||
}
|
}
|
||||||
.masthead {
|
.poster {
|
||||||
grid-area: mast;
|
grid-area: poster;
|
||||||
}
|
|
||||||
.hero {
|
|
||||||
grid-area: hero;
|
|
||||||
}
|
}
|
||||||
.deck {
|
.deck {
|
||||||
grid-area: deck;
|
grid-area: deck;
|
||||||
@@ -596,32 +573,26 @@ const osdDate = now.toLocaleDateString('en-US', { month: 'short', day: '2-digit'
|
|||||||
.barcode-wrap {
|
.barcode-wrap {
|
||||||
grid-area: code;
|
grid-area: code;
|
||||||
}
|
}
|
||||||
.issue {
|
.poster :global(.band) {
|
||||||
font-size: 0.95rem;
|
font-size: 5.4rem;
|
||||||
}
|
|
||||||
.name {
|
|
||||||
margin-top: -4.5rem;
|
|
||||||
}
|
}
|
||||||
.lede {
|
.lede {
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
}
|
}
|
||||||
.say {
|
.say {
|
||||||
top: 4rem;
|
max-width: 13rem;
|
||||||
left: 1.2rem;
|
font-size: 0.95rem;
|
||||||
max-width: 14rem;
|
|
||||||
font-size: 1rem;
|
|
||||||
}
|
}
|
||||||
.badge {
|
.badge {
|
||||||
width: 8.5rem;
|
width: 7.5rem;
|
||||||
height: 8.5rem;
|
height: 7.5rem;
|
||||||
|
top: auto;
|
||||||
|
left: auto;
|
||||||
|
bottom: 3rem;
|
||||||
right: -1.5rem;
|
right: -1.5rem;
|
||||||
}
|
}
|
||||||
.badge :global(.badge-ring span) {
|
.badge :global(.badge-ring span) {
|
||||||
font-size: 0.78rem;
|
font-size: 0.72rem;
|
||||||
}
|
|
||||||
.sticker-gba {
|
|
||||||
right: -3rem;
|
|
||||||
bottom: 8rem;
|
|
||||||
}
|
}
|
||||||
.cover :global(.burst) {
|
.cover :global(.burst) {
|
||||||
right: 2rem;
|
right: 2rem;
|
||||||
|
|||||||
@@ -3,6 +3,9 @@
|
|||||||
@import '@fontsource/dela-gothic-one';
|
@import '@fontsource/dela-gothic-one';
|
||||||
@import '@fontsource/dotgothic16';
|
@import '@fontsource/dotgothic16';
|
||||||
@import '@fontsource/vt323';
|
@import '@fontsource/vt323';
|
||||||
|
@import '@fontsource/sedgwick-ave-display';
|
||||||
|
@import '@fontsource/rubik-mono-one';
|
||||||
|
@import '@fontsource/rubik-wet-paint';
|
||||||
@import '@fontsource-variable/doto';
|
@import '@fontsource-variable/doto';
|
||||||
@import '@fontsource-variable/archivo/wdth.css';
|
@import '@fontsource-variable/archivo/wdth.css';
|
||||||
@import '@fontsource-variable/ibm-plex-sans';
|
@import '@fontsource-variable/ibm-plex-sans';
|
||||||
|
|||||||
@@ -59,6 +59,13 @@
|
|||||||
--ff-pixel: 'DotGothic16', ui-monospace, monospace;
|
--ff-pixel: 'DotGothic16', ui-monospace, monospace;
|
||||||
--ff-dot: 'Doto Variable', ui-monospace, monospace;
|
--ff-dot: 'Doto Variable', ui-monospace, monospace;
|
||||||
--ff-crt: 'VT323', ui-monospace, monospace;
|
--ff-crt: 'VT323', ui-monospace, monospace;
|
||||||
|
--ff-tag: 'Sedgwick Ave Display', 'Permanent Marker', cursive;
|
||||||
|
--ff-poster: 'Rubik Mono One', 'Arial Black', sans-serif;
|
||||||
|
--ff-drip: 'Rubik Wet Paint', 'Arial Black', sans-serif;
|
||||||
|
|
||||||
|
/* street-poster inks */
|
||||||
|
--jsr-ink: #2e5c2c;
|
||||||
|
--jsr-paper: #e2e996;
|
||||||
--ff-sans: 'IBM Plex Sans Variable', system-ui, sans-serif;
|
--ff-sans: 'IBM Plex Sans Variable', system-ui, sans-serif;
|
||||||
--ff-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
|
--ff-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
|
||||||
|
|
||||||
|
|||||||
@@ -164,7 +164,133 @@ def vintage(img):
|
|||||||
return dust(vignette(grain(out, 16), 0.6), specks=700, scratches=10)
|
return dust(vignette(grain(out, 16), 0.6), specks=700, scratches=10)
|
||||||
|
|
||||||
|
|
||||||
LOOKS = {'toon': toon, 'pixel': pixel, 'xerox': xerox, 'riso': riso, 'vintage': vintage}
|
|
||||||
|
# ---------- poster / comic / terminal looks ----------
|
||||||
|
def _halftone_mask(density, cell=7, angle=45):
|
||||||
|
"""Return a boolean ink mask: round dots whose size follows density (0..1)."""
|
||||||
|
h, w = density.shape
|
||||||
|
y, x = np.mgrid[0:h, 0:w].astype(np.float32)
|
||||||
|
a = np.deg2rad(angle)
|
||||||
|
u = x * np.cos(a) + y * np.sin(a)
|
||||||
|
v = -x * np.sin(a) + y * np.cos(a)
|
||||||
|
fu = (u / cell) % 1 - 0.5
|
||||||
|
fv = (v / cell) % 1 - 0.5
|
||||||
|
dist = np.sqrt(fu * fu + fv * fv)
|
||||||
|
radius = np.sqrt(np.clip(density, 0, 1)) * 0.62
|
||||||
|
return dist < radius
|
||||||
|
|
||||||
|
|
||||||
|
def _ink_edges(img, thresh=22, thick=3):
|
||||||
|
g = img.convert('L').filter(ImageFilter.GaussianBlur(1.2))
|
||||||
|
e = g.filter(ImageFilter.FIND_EDGES).point(lambda v: 255 if v > thresh else 0)
|
||||||
|
if thick > 1:
|
||||||
|
e = e.filter(ImageFilter.MaxFilter(thick | 1))
|
||||||
|
return np.asarray(e) > 0
|
||||||
|
|
||||||
|
|
||||||
|
def creases(img, folds=((0.5, 'v'), (0.33, 'h'), (0.66, 'h')), strength=0.18):
|
||||||
|
"""Paper fold lines: a bright ridge next to a dark valley."""
|
||||||
|
a = np.asarray(img, dtype=np.float32).copy()
|
||||||
|
h, w = a.shape[:2]
|
||||||
|
for pos, d in folds:
|
||||||
|
if d == 'v':
|
||||||
|
c = int(w * pos)
|
||||||
|
for off, k in ((-2, 1 + strength), (-1, 1 + strength * 0.6), (1, 1 - strength), (2, 1 - strength * 0.6)):
|
||||||
|
if 0 <= c + off < w:
|
||||||
|
a[:, c + off] *= k
|
||||||
|
else:
|
||||||
|
c = int(h * pos)
|
||||||
|
for off, k in ((-2, 1 + strength), (-1, 1 + strength * 0.6), (1, 1 - strength), (2, 1 - strength * 0.6)):
|
||||||
|
if 0 <= c + off < h:
|
||||||
|
a[c + off, :] *= k
|
||||||
|
return Image.fromarray(np.clip(a, 0, 255).astype(np.uint8))
|
||||||
|
|
||||||
|
|
||||||
|
def jsr(img, ink=(46, 92, 44), paper=(226, 233, 150), cell=6, outline=True):
|
||||||
|
"""Two-tone street poster: one ink on coloured stock, halftone mid-tones,
|
||||||
|
solid shadows, ink outlines, fold creases, speckle and wear."""
|
||||||
|
g = ImageOps.autocontrast(img.convert('L'), cutoff=2)
|
||||||
|
g = ImageEnhance.Contrast(g).enhance(1.25)
|
||||||
|
g = ImageEnhance.Brightness(g).enhance(1.12)
|
||||||
|
d = 1 - np.asarray(g, dtype=np.float32) / 255
|
||||||
|
ink_mask = _halftone_mask(np.clip((d - 0.28) / 0.55, 0, 1) ** 1.2, cell=cell)
|
||||||
|
ink_mask |= d > 0.84
|
||||||
|
if outline:
|
||||||
|
ink_mask |= _ink_edges(img, thresh=26, thick=3)
|
||||||
|
# speckle: lost ink and stray ink, like a worn print
|
||||||
|
noise = RNG.random(d.shape)
|
||||||
|
ink_mask = (ink_mask & (noise > 0.035)) | (noise < 0.004)
|
||||||
|
paper_c, ink_c = np.array(paper, np.float32), np.array(ink, np.float32)
|
||||||
|
out = np.where(ink_mask[..., None], ink_c, paper_c)
|
||||||
|
out = Image.fromarray(out.astype(np.uint8)).filter(ImageFilter.GaussianBlur(0.35))
|
||||||
|
out = paper_tex(out, 0.5)
|
||||||
|
out = creases(out)
|
||||||
|
return grain(out, 9)
|
||||||
|
|
||||||
|
|
||||||
|
def paper_tex(img, amount=0.5):
|
||||||
|
tex = Image.open(SRC / 'paper-crumpled.jpg').convert('L').resize(img.size)
|
||||||
|
tex = ImageOps.autocontrast(tex)
|
||||||
|
t = np.asarray(tex, dtype=np.float32) / 255
|
||||||
|
t = 1 - (1 - t) * amount
|
||||||
|
a = np.asarray(img, dtype=np.float32) * t[..., None]
|
||||||
|
return Image.fromarray(np.clip(a, 0, 255).astype(np.uint8))
|
||||||
|
|
||||||
|
|
||||||
|
def popart(img, colors=((230, 40, 45), (255, 214, 0), (0, 160, 220), (250, 245, 230)), cell=8):
|
||||||
|
"""Comic pop-art: flat colour zones, Ben-Day dots, heavy black outlines."""
|
||||||
|
base = img.filter(ImageFilter.MedianFilter(5))
|
||||||
|
base = ImageEnhance.Color(base).enhance(1.6)
|
||||||
|
pal = np.array(colors, dtype=np.float32)
|
||||||
|
a = np.asarray(base, dtype=np.float32)
|
||||||
|
idx = ((a[:, :, None, :] - pal[None, None]) ** 2).sum(-1).argmin(-1)
|
||||||
|
flat = pal[idx]
|
||||||
|
lum = np.asarray(img.convert('L'), dtype=np.float32) / 255
|
||||||
|
dots = _halftone_mask(np.clip((0.75 - lum) * 1.4, 0, 1), cell=cell, angle=15)
|
||||||
|
flat = np.where(dots[..., None], flat * 0.55, flat)
|
||||||
|
flat = np.where((lum < 0.16)[..., None], 20, flat)
|
||||||
|
edges = _ink_edges(img, thresh=20, thick=5)
|
||||||
|
flat = np.where(edges[..., None], 18, flat)
|
||||||
|
return grain(Image.fromarray(np.clip(flat, 0, 255).astype(np.uint8)), 6)
|
||||||
|
|
||||||
|
|
||||||
|
ASCII_RAMP = ' .:-=+*#%@'
|
||||||
|
|
||||||
|
|
||||||
|
def ascii_art(img, cols=72, fg=(120, 255, 160), bg=(6, 14, 9), font_px=14, ramp=ASCII_RAMP, color=False):
|
||||||
|
"""Redraw the photo as monospaced characters (terminal style)."""
|
||||||
|
from PIL import ImageDraw, ImageFont
|
||||||
|
font = None
|
||||||
|
for f in ('/usr/share/fonts/truetype/liberation/LiberationMono-Bold.ttf',
|
||||||
|
'/Library/Fonts/Menlo.ttc', '/System/Library/Fonts/Menlo.ttc', 'C:/Windows/Fonts/consolab.ttf'):
|
||||||
|
if Path(f).exists():
|
||||||
|
font = ImageFont.truetype(f, font_px)
|
||||||
|
break
|
||||||
|
font = font or ImageFont.load_default(size=font_px)
|
||||||
|
cw = font.getbbox('M')[2]
|
||||||
|
ch = int(font_px * 1.15)
|
||||||
|
rows = max(1, int(cols * img.height / img.width * cw / ch))
|
||||||
|
small = ImageOps.autocontrast(img.resize((cols, rows), Image.BOX), cutoff=2)
|
||||||
|
small = ImageEnhance.Contrast(small).enhance(1.4)
|
||||||
|
lum = np.asarray(small.convert('L'), dtype=np.float32) / 255
|
||||||
|
rgb = np.asarray(small, dtype=np.uint8)
|
||||||
|
out = Image.new('RGB', (cols * cw, rows * ch), bg)
|
||||||
|
draw = ImageDraw.Draw(out)
|
||||||
|
n = len(ramp) - 1
|
||||||
|
if sum(bg) > 382: # light paper: dark ink should mark the dark areas
|
||||||
|
lum = 1 - lum
|
||||||
|
for r in range(rows):
|
||||||
|
for c in range(cols):
|
||||||
|
v = lum[r, c]
|
||||||
|
char = ramp[int(v * n)]
|
||||||
|
if char != ' ':
|
||||||
|
col = tuple(int(x) for x in rgb[r, c]) if color else fg
|
||||||
|
draw.text((c * cw, r * ch), char, font=font, fill=col)
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
LOOKS = {'toon': toon, 'pixel': pixel, 'xerox': xerox, 'riso': riso, 'vintage': vintage,
|
||||||
|
'jsr': jsr, 'popart': popart, 'ascii': ascii_art}
|
||||||
|
|
||||||
# (source, look, width, kwargs)
|
# (source, look, width, kwargs)
|
||||||
RECIPES = [
|
RECIPES = [
|
||||||
@@ -187,6 +313,14 @@ RECIPES = [
|
|||||||
('cta-sign', 'vintage', 1400, {}),
|
('cta-sign', 'vintage', 1400, {}),
|
||||||
('pedalboard', 'riso', 1000, {'ink_a': (226, 126, 166), 'ink_b': (20, 20, 18)}),
|
('pedalboard', 'riso', 1000, {'ink_a': (226, 126, 166), 'ink_b': (20, 20, 18)}),
|
||||||
('cloud', 'xerox', 700, {}),
|
('cloud', 'xerox', 700, {}),
|
||||||
|
# street-poster set (stand-ins until the new stock photos are sourced)
|
||||||
|
('motorcycle', 'jsr', 1100, {}),
|
||||||
|
('guitar-strat', 'jsr', 900, {'ink': (30, 60, 140), 'paper': (240, 228, 200)}),
|
||||||
|
('cta-sign', 'popart', 900, {}),
|
||||||
|
('guitar-strat', 'popart', 900, {}),
|
||||||
|
('synth', 'jsr', 900, {'ink': (150, 30, 40), 'paper': (245, 222, 180)}),
|
||||||
|
('cassette', 'ascii', 900, {}),
|
||||||
|
('tv', 'ascii', 800, {'fg': (46, 92, 44), 'bg': (226, 233, 150)}),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|||||||