Bake grungy treatments into photos (toon/cel shading with ink outlines, dithered pixel art, photocopy, riso misprint, faded vintage with dust and scratches) via tools/fx.py, and add a live WebGL shader (CRT, VHS, pixel-resolve, toon) used on hero images. Add glitch and RGB-split type, camcorder OSD, manga speed lines, sparkles, speech bubbles, checker strips, TV test-pattern placeholders and a CRT power-off/on page transition. Keep the L-train menu and line colors but drop the other Chicago references (star logo, skyline hero, flag footer, Chicago postcard). Fix menu lag: grain overlay no longer uses a blend mode, the header drops its backdrop blur, menu layers are GPU-promoted, and background effects pause while the menu is open.
No files matched your search
|
After Width: | Height: | Size: 26 KiB |
|
After Width: | Height: | Size: 257 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 42 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 43 KiB |
|
After Width: | Height: | Size: 422 KiB |
|
After Width: | Height: | Size: 1.9 KiB |
|
After Width: | Height: | Size: 209 KiB |
|
After Width: | Height: | Size: 2.0 KiB |
|
After Width: | Height: | Size: 164 KiB |
|
After Width: | Height: | Size: 209 KiB |
|
After Width: | Height: | Size: 193 KiB |
|
After Width: | Height: | Size: 1.1 KiB |
|
After Width: | Height: | Size: 3.8 KiB |
|
After Width: | Height: | Size: 224 KiB |
|
After Width: | Height: | Size: 219 KiB |
|
After Width: | Height: | Size: 340 KiB |
|
After Width: | Height: | Size: 185 KiB |
|
After Width: | Height: | Size: 183 KiB |
@@ -1,18 +0,0 @@
|
|||||||
---
|
|
||||||
// Six-pointed star from the Chicago flag.
|
|
||||||
interface Props {
|
|
||||||
size?: string;
|
|
||||||
color?: string;
|
|
||||||
class?: string;
|
|
||||||
}
|
|
||||||
const { size = '1.6rem', color = 'var(--chicago-star)', class: cls } = Astro.props;
|
|
||||||
const pts = Array.from({ length: 12 }, (_, i) => {
|
|
||||||
const r = i % 2 === 0 ? 50 : 26;
|
|
||||||
const a = (Math.PI / 6) * i - Math.PI / 2;
|
|
||||||
return `${(50 + r * Math.cos(a)).toFixed(2)},${(50 + r * Math.sin(a)).toFixed(2)}`;
|
|
||||||
}).join(' ');
|
|
||||||
---
|
|
||||||
|
|
||||||
<svg class={cls} viewBox="0 0 100 100" width={size} height={size} aria-hidden="true" style={`flex:none;width:${size};height:${size}`}>
|
|
||||||
<polygon points={pts} fill={color} />
|
|
||||||
</svg>
|
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
---
|
---
|
||||||
import { SITE } from '../lib/site';
|
import { SITE } from '../lib/site';
|
||||||
import ChicagoStar from './ChicagoStar.astro';
|
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
const links = Object.entries(SITE.links).filter(([, href]) => !href.includes('PLACEHOLDER'));
|
const links = Object.entries(SITE.links).filter(([, href]) => !href.includes('PLACEHOLDER'));
|
||||||
const lines = ['--cta-red', '--cta-blue', '--cta-brown', '--cta-green', '--cta-orange', '--cta-purple', '--cta-pink', '--cta-yellow'];
|
const lines = ['--cta-red', '--cta-blue', '--cta-brown', '--cta-green', '--cta-orange', '--cta-purple', '--cta-pink', '--cta-yellow'];
|
||||||
@@ -38,14 +37,10 @@ const lines = ['--cta-red', '--cta-blue', '--cta-brown', '--cta-green', '--cta-o
|
|||||||
</dl>
|
</dl>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="flag" aria-hidden="true">
|
<div class="checker" style="--h:16px;--a:#141412;--b:#fffdf7" aria-hidden="true"></div>
|
||||||
<span class="stripe"></span>
|
|
||||||
<span class="stars">{[0, 1, 2, 3].map(() => <ChicagoStar size="clamp(1.6rem, 6vw, 2.6rem)" />)}</span>
|
|
||||||
<span class="stripe"></span>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="wrap base">
|
<div class="wrap base">
|
||||||
<span>© {year} {SITE.name} · Chicago, IL</span>
|
<span>© {year} {SITE.name}</span>
|
||||||
<a href="/credits">Photo credits</a>
|
<a href="/credits">Photo credits</a>
|
||||||
<span>Self-hosted · Built with Astro</span>
|
<span>Self-hosted · Built with Astro</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -91,21 +86,8 @@ const lines = ['--cta-red', '--cta-blue', '--cta-brown', '--cta-green', '--cta-o
|
|||||||
.readout dd {
|
.readout dd {
|
||||||
overflow-wrap: anywhere;
|
overflow-wrap: anywhere;
|
||||||
}
|
}
|
||||||
.flag {
|
.checker {
|
||||||
display: grid;
|
|
||||||
gap: 0.6rem;
|
|
||||||
margin-top: var(--space-8);
|
margin-top: var(--space-8);
|
||||||
padding-block: 0.9rem;
|
|
||||||
background: #fff;
|
|
||||||
}
|
|
||||||
.stripe {
|
|
||||||
height: clamp(10px, 2.2vw, 18px);
|
|
||||||
background: var(--chicago-blue);
|
|
||||||
}
|
|
||||||
.stars {
|
|
||||||
display: flex;
|
|
||||||
justify-content: center;
|
|
||||||
gap: clamp(1rem, 6vw, 3.5rem);
|
|
||||||
}
|
}
|
||||||
.base {
|
.base {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|||||||
@@ -0,0 +1,225 @@
|
|||||||
|
import { useEffect, useRef } from 'react';
|
||||||
|
import { Renderer, Program, Mesh, Triangle, Texture } from 'ogl';
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Live retro shader over an image. Sits on top of a normal <img> (the
|
||||||
|
* fallback) and fades in once the first frame is drawn.
|
||||||
|
*
|
||||||
|
* crt – barrel curve, scanlines, RGB aperture mask, flicker, vignette
|
||||||
|
* vhs – tracking band, line wobble, chroma shift, static, tape jumps
|
||||||
|
* pixel – starts chunky and resolves into the photo; hover re-pixelates
|
||||||
|
* toon – live cel shading: posterised colour + Sobel ink outlines
|
||||||
|
*
|
||||||
|
* Renders only while on screen, at device-pixel-ratio 1, and draws a single
|
||||||
|
* still frame for visitors who prefer reduced motion.
|
||||||
|
*/
|
||||||
|
export type FxMode = 'crt' | 'vhs' | 'pixel' | 'toon';
|
||||||
|
const MODES: Record<FxMode, number> = { crt: 0, vhs: 1, pixel: 2, toon: 3 };
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
src: string;
|
||||||
|
mode?: FxMode;
|
||||||
|
amount?: number;
|
||||||
|
className?: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const vertex = /* glsl */ `
|
||||||
|
attribute vec2 uv;
|
||||||
|
attribute vec2 position;
|
||||||
|
varying vec2 vUv;
|
||||||
|
void main() { vUv = uv; gl_Position = vec4(position, 0.0, 1.0); }
|
||||||
|
`;
|
||||||
|
|
||||||
|
const fragment = /* glsl */ `
|
||||||
|
precision highp float;
|
||||||
|
uniform sampler2D tMap;
|
||||||
|
uniform vec2 uRes;
|
||||||
|
uniform vec2 uImg;
|
||||||
|
uniform float uTime;
|
||||||
|
uniform int uMode;
|
||||||
|
uniform float uAmt;
|
||||||
|
uniform float uHover;
|
||||||
|
uniform float uReveal;
|
||||||
|
varying vec2 vUv;
|
||||||
|
|
||||||
|
vec2 cover(vec2 uv) {
|
||||||
|
float rs = uRes.x / uRes.y;
|
||||||
|
float ri = uImg.x / uImg.y;
|
||||||
|
vec2 s = rs > ri ? vec2(1.0, ri / rs) : vec2(rs / ri, 1.0);
|
||||||
|
return (uv - 0.5) * s + 0.5;
|
||||||
|
}
|
||||||
|
float rand(vec2 c) { return fract(sin(dot(c, vec2(12.9898, 78.233))) * 43758.5453); }
|
||||||
|
float lum(vec3 c) { return dot(c, vec3(0.299, 0.587, 0.114)); }
|
||||||
|
vec3 tex(vec2 uv) { return texture2D(tMap, cover(uv)).rgb; }
|
||||||
|
vec2 barrel(vec2 uv, float k) { vec2 c = uv * 2.0 - 1.0; c *= 1.0 + k * dot(c, c); return c * 0.5 + 0.5; }
|
||||||
|
|
||||||
|
void main() {
|
||||||
|
vec2 uv = vUv;
|
||||||
|
vec3 col;
|
||||||
|
|
||||||
|
if (uMode == 0) {
|
||||||
|
vec2 b = barrel(uv, 0.1 * uAmt);
|
||||||
|
if (b.x < 0.0 || b.x > 1.0 || b.y < 0.0 || b.y > 1.0) { gl_FragColor = vec4(0.0, 0.0, 0.0, 1.0); return; }
|
||||||
|
float ab = 0.0025 * uAmt + 0.006 * uHover;
|
||||||
|
col = vec3(tex(b + vec2(ab, 0.0)).r, tex(b).g, tex(b - vec2(ab, 0.0)).b);
|
||||||
|
float sl = 0.5 + 0.5 * sin(b.y * uRes.y * 1.5);
|
||||||
|
col *= mix(1.0, 0.7 + 0.3 * sl, 0.7 * uAmt);
|
||||||
|
float m = mod(gl_FragCoord.x, 3.0);
|
||||||
|
vec3 mask = vec3(m < 1.0 ? 1.0 : 0.72, (m >= 1.0 && m < 2.0) ? 1.0 : 0.72, m >= 2.0 ? 1.0 : 0.72);
|
||||||
|
col *= mix(vec3(1.0), mask, 0.4 * uAmt);
|
||||||
|
col *= 0.95 + 0.05 * sin(uTime * 50.0);
|
||||||
|
float roll = smoothstep(0.0, 0.08, abs(fract(b.y - uTime * 0.12) - 0.5));
|
||||||
|
col += (1.0 - roll) * 0.06;
|
||||||
|
col *= mix(0.55, 1.15, smoothstep(0.85, 0.15, length(b - 0.5)));
|
||||||
|
col += (rand(uv * uRes + uTime) - 0.5) * 0.07 * uAmt;
|
||||||
|
} else if (uMode == 1) {
|
||||||
|
float t = uTime;
|
||||||
|
float band = smoothstep(0.0, 0.03, abs(fract(uv.y * 0.6 - t * 0.07) - 0.5) - 0.44);
|
||||||
|
float line = floor(uv.y * 220.0);
|
||||||
|
float wob = (rand(vec2(line, floor(t * 20.0))) - 0.5) * 0.004 * uAmt;
|
||||||
|
float jump = step(0.97, rand(vec2(floor(t * 4.0), 7.0))) * 0.025 * uAmt;
|
||||||
|
vec2 u = uv + vec2(wob + (1.0 - band) * 0.018 * uAmt + jump * sin(uv.y * 30.0 + t * 20.0), 0.0);
|
||||||
|
float ab = 0.005 * uAmt + 0.012 * uHover;
|
||||||
|
col = vec3(tex(u + vec2(ab, 0.0)).r, tex(u).g, tex(u - vec2(ab * 1.6, 0.0)).b);
|
||||||
|
col = mix(vec3(lum(col)), col, 0.8) * vec3(1.04, 0.98, 1.06);
|
||||||
|
col += (rand(uv * vec2(3.0, uRes.y) + t) - 0.5) * 0.14 * uAmt;
|
||||||
|
col += (1.0 - band) * 0.14;
|
||||||
|
col *= 0.9 + 0.1 * sin(uv.y * uRes.y * 0.8);
|
||||||
|
col = mix(col, vec3(0.06, 0.04, 0.1), smoothstep(0.55, 1.0, length(uv - 0.5)) * 0.6);
|
||||||
|
} else if (uMode == 2) {
|
||||||
|
float size = mix(56.0, 1.0, uReveal);
|
||||||
|
size = max(size, 1.0 + 7.0 * uAmt * uHover);
|
||||||
|
vec2 cell = (floor(gl_FragCoord.xy / size) + 0.5) * size / uRes;
|
||||||
|
col = tex(cell);
|
||||||
|
if (size > 1.5) col = floor(col * 7.0 + 0.5) / 7.0;
|
||||||
|
} else {
|
||||||
|
vec2 px = 1.5 / uRes;
|
||||||
|
vec3 c = tex(uv);
|
||||||
|
float tl = lum(tex(uv + px * vec2(-1.0, 1.0))), t0 = lum(tex(uv + px * vec2(0.0, 1.0))), tr = lum(tex(uv + px * vec2(1.0, 1.0)));
|
||||||
|
float l0 = lum(tex(uv + px * vec2(-1.0, 0.0))), r0 = lum(tex(uv + px * vec2(1.0, 0.0)));
|
||||||
|
float bl = lum(tex(uv + px * vec2(-1.0, -1.0))), b0 = lum(tex(uv + px * vec2(0.0, -1.0))), br = lum(tex(uv + px * vec2(1.0, -1.0)));
|
||||||
|
float gx = -tl - 2.0 * l0 - bl + tr + 2.0 * r0 + br;
|
||||||
|
float gy = -tl - 2.0 * t0 - tr + bl + 2.0 * b0 + br;
|
||||||
|
float edge = smoothstep(0.18, 0.4, length(vec2(gx, gy)) * uAmt);
|
||||||
|
float levels = 5.0;
|
||||||
|
vec3 flat_ = floor(c * levels + 0.5) / levels;
|
||||||
|
flat_ = mix(vec3(lum(flat_)), flat_, 1.35);
|
||||||
|
col = mix(flat_, vec3(0.07, 0.06, 0.08), edge);
|
||||||
|
col += (rand(uv * uRes) - 0.5) * 0.04;
|
||||||
|
}
|
||||||
|
|
||||||
|
gl_FragColor = vec4(clamp(col, 0.0, 1.0), 1.0);
|
||||||
|
}
|
||||||
|
`;
|
||||||
|
|
||||||
|
export default function FxCanvas({ src, mode = 'crt', amount = 1, className = '' }: Props) {
|
||||||
|
const ref = useRef<HTMLDivElement>(null);
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
const host = ref.current;
|
||||||
|
if (!host) return;
|
||||||
|
const reduce = window.matchMedia('(prefers-reduced-motion: reduce)').matches;
|
||||||
|
|
||||||
|
let renderer: Renderer;
|
||||||
|
try {
|
||||||
|
renderer = new Renderer({ dpr: 1, alpha: false, antialias: false });
|
||||||
|
} catch {
|
||||||
|
return; // no WebGL: the plain image underneath stays visible
|
||||||
|
}
|
||||||
|
const gl = renderer.gl;
|
||||||
|
const canvas = gl.canvas as HTMLCanvasElement;
|
||||||
|
host.appendChild(canvas);
|
||||||
|
|
||||||
|
const texture = new Texture(gl, { generateMipmaps: false });
|
||||||
|
const uniforms = {
|
||||||
|
tMap: { value: texture },
|
||||||
|
uRes: { value: [1, 1] },
|
||||||
|
uImg: { value: [1, 1] },
|
||||||
|
uTime: { value: 0 },
|
||||||
|
uMode: { value: MODES[mode] },
|
||||||
|
uAmt: { value: amount },
|
||||||
|
uHover: { value: 0 },
|
||||||
|
uReveal: { value: mode === 'pixel' && !reduce ? 0 : 1 },
|
||||||
|
};
|
||||||
|
const program = new Program(gl, { vertex, fragment, uniforms });
|
||||||
|
const mesh = new Mesh(gl, { geometry: new Triangle(gl), program });
|
||||||
|
|
||||||
|
const resize = () => {
|
||||||
|
const { width, height } = host.getBoundingClientRect();
|
||||||
|
renderer.setSize(Math.max(1, width), Math.max(1, height));
|
||||||
|
uniforms.uRes.value = [gl.drawingBufferWidth, gl.drawingBufferHeight];
|
||||||
|
};
|
||||||
|
const ro = new ResizeObserver(resize);
|
||||||
|
ro.observe(host);
|
||||||
|
resize();
|
||||||
|
|
||||||
|
let raf = 0;
|
||||||
|
let visible = false;
|
||||||
|
let ready = false;
|
||||||
|
let hoverTarget = 0;
|
||||||
|
let revealStart = 0;
|
||||||
|
const start = performance.now();
|
||||||
|
|
||||||
|
const draw = (now: number) => {
|
||||||
|
const t = (now - start) / 1000;
|
||||||
|
uniforms.uTime.value = t;
|
||||||
|
uniforms.uHover.value += (hoverTarget - uniforms.uHover.value) * 0.12;
|
||||||
|
if (mode === 'pixel' && revealStart) {
|
||||||
|
uniforms.uReveal.value = Math.min(1, (now - revealStart) / 1400);
|
||||||
|
}
|
||||||
|
renderer.render({ scene: mesh });
|
||||||
|
};
|
||||||
|
const loop = (now: number) => {
|
||||||
|
draw(now);
|
||||||
|
if (visible && !document.documentElement.classList.contains('menu-open')) raf = requestAnimationFrame(loop);
|
||||||
|
else raf = 0;
|
||||||
|
};
|
||||||
|
const kick = () => {
|
||||||
|
if (!ready) return;
|
||||||
|
if (reduce) return draw(performance.now());
|
||||||
|
if (!raf && visible) raf = requestAnimationFrame(loop);
|
||||||
|
};
|
||||||
|
|
||||||
|
const img = new Image();
|
||||||
|
img.decoding = 'async';
|
||||||
|
img.onload = () => {
|
||||||
|
texture.image = img;
|
||||||
|
uniforms.uImg.value = [img.naturalWidth, img.naturalHeight];
|
||||||
|
ready = true;
|
||||||
|
host.dataset.ready = 'true';
|
||||||
|
kick();
|
||||||
|
};
|
||||||
|
img.src = src;
|
||||||
|
|
||||||
|
const io = new IntersectionObserver(([entry]) => {
|
||||||
|
visible = entry.isIntersecting;
|
||||||
|
if (visible && mode === 'pixel' && !revealStart && !reduce) revealStart = performance.now();
|
||||||
|
kick();
|
||||||
|
});
|
||||||
|
io.observe(host);
|
||||||
|
|
||||||
|
const onEnter = () => {
|
||||||
|
hoverTarget = 1;
|
||||||
|
kick();
|
||||||
|
};
|
||||||
|
const onLeave = () => (hoverTarget = 0);
|
||||||
|
host.addEventListener('pointerenter', onEnter);
|
||||||
|
host.addEventListener('pointerleave', onLeave);
|
||||||
|
// resume after the mobile menu closes
|
||||||
|
const mo = new MutationObserver(kick);
|
||||||
|
mo.observe(document.documentElement, { attributes: true, attributeFilter: ['class'] });
|
||||||
|
|
||||||
|
return () => {
|
||||||
|
cancelAnimationFrame(raf);
|
||||||
|
io.disconnect();
|
||||||
|
ro.disconnect();
|
||||||
|
mo.disconnect();
|
||||||
|
host.removeEventListener('pointerenter', onEnter);
|
||||||
|
host.removeEventListener('pointerleave', onLeave);
|
||||||
|
gl.getExtension('WEBGL_lose_context')?.loseContext();
|
||||||
|
canvas.remove();
|
||||||
|
};
|
||||||
|
}, [src, mode, amount]);
|
||||||
|
|
||||||
|
return <div ref={ref} className={`fx-canvas ${className}`} aria-hidden="true" />;
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
---
|
||||||
|
/**
|
||||||
|
* An optimized image with a live retro shader on top (see FxCanvas.tsx).
|
||||||
|
* The plain <img> renders first (fast LCP, no-JS, SEO); the shader fades in.
|
||||||
|
*/
|
||||||
|
import { Image, getImage } from 'astro:assets';
|
||||||
|
import type { ImageMetadata } from 'astro';
|
||||||
|
import FxCanvas, { type FxMode } from './FxCanvas';
|
||||||
|
|
||||||
|
interface Props {
|
||||||
|
src: ImageMetadata;
|
||||||
|
alt?: string;
|
||||||
|
mode?: FxMode;
|
||||||
|
amount?: number;
|
||||||
|
ratio?: string;
|
||||||
|
position?: string;
|
||||||
|
loading?: 'lazy' | 'eager';
|
||||||
|
sizes?: string;
|
||||||
|
class?: string;
|
||||||
|
[attr: string]: unknown;
|
||||||
|
}
|
||||||
|
const {
|
||||||
|
src,
|
||||||
|
alt = '',
|
||||||
|
mode = 'crt',
|
||||||
|
amount = 1,
|
||||||
|
ratio,
|
||||||
|
position = 'center',
|
||||||
|
loading = 'lazy',
|
||||||
|
sizes = '(min-width: 60rem) 50vw, 100vw',
|
||||||
|
class: cls,
|
||||||
|
...rest
|
||||||
|
} = Astro.props;
|
||||||
|
const tex = await getImage({ src, width: Math.min(src.width, 1100), format: 'webp' });
|
||||||
|
---
|
||||||
|
|
||||||
|
<div {...rest} class:list={['fx', `fx-${mode}`, cls]} style={`${ratio ? `--ratio:${ratio};` : ''}--pos:${position}`}>
|
||||||
|
<Image src={src} alt={alt} widths={[480, 800, 1100].filter((w) => w <= src.width)} sizes={sizes} loading={loading} />
|
||||||
|
<FxCanvas client:visible src={tex.src} mode={mode} amount={amount} />
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.fx {
|
||||||
|
position: relative;
|
||||||
|
overflow: hidden;
|
||||||
|
background: #000;
|
||||||
|
aspect-ratio: var(--ratio, auto);
|
||||||
|
}
|
||||||
|
.fx > :global(img) {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
object-fit: cover;
|
||||||
|
object-position: var(--pos);
|
||||||
|
}
|
||||||
|
.fx :global(.fx-canvas) {
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
opacity: 0;
|
||||||
|
transition: opacity 0.5s ease;
|
||||||
|
}
|
||||||
|
.fx :global(.fx-canvas[data-ready]) {
|
||||||
|
opacity: 1;
|
||||||
|
}
|
||||||
|
.fx :global(.fx-canvas canvas) {
|
||||||
|
display: block;
|
||||||
|
width: 100% !important;
|
||||||
|
height: 100% !important;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
---
|
||||||
|
// Brand mark: a red "yo" sticker with a sparkle.
|
||||||
|
interface Props {
|
||||||
|
size?: string;
|
||||||
|
}
|
||||||
|
const { size = '2.3rem' } = Astro.props;
|
||||||
|
---
|
||||||
|
|
||||||
|
<span class="mark" style={`--s:${size}`} aria-hidden="true">
|
||||||
|
<span class="yo">yo</span>
|
||||||
|
<span class="sparkle" style="--s:0.9em;--c:var(--cta-yellow)"></span>
|
||||||
|
</span>
|
||||||
|
|
||||||
|
<style>
|
||||||
|
.mark {
|
||||||
|
position: relative;
|
||||||
|
display: inline-grid;
|
||||||
|
place-items: center;
|
||||||
|
flex: none;
|
||||||
|
width: var(--s);
|
||||||
|
height: var(--s);
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--cta-red);
|
||||||
|
border: 2px solid var(--ink);
|
||||||
|
box-shadow: 2px 2px 0 var(--ink);
|
||||||
|
font-size: calc(var(--s) * 0.42);
|
||||||
|
rotate: -8deg;
|
||||||
|
transition: rotate 0.4s var(--ease);
|
||||||
|
}
|
||||||
|
.yo {
|
||||||
|
font-family: var(--ff-mag);
|
||||||
|
color: #fff;
|
||||||
|
letter-spacing: -0.06em;
|
||||||
|
line-height: 1;
|
||||||
|
-webkit-text-stroke: 1px var(--ink);
|
||||||
|
paint-order: stroke fill;
|
||||||
|
}
|
||||||
|
.sparkle {
|
||||||
|
position: absolute;
|
||||||
|
top: -0.35em;
|
||||||
|
right: -0.4em;
|
||||||
|
filter: drop-shadow(1px 1px 0 var(--ink));
|
||||||
|
}
|
||||||
|
</style>
|
||||||
@@ -23,6 +23,17 @@
|
|||||||
.yo-menu .staggered-menu-panel {
|
.yo-menu .staggered-menu-panel {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
/* promote the sliding layers up front so the first frame doesn't stutter */
|
||||||
|
.yo-menu .sm-prelayer,
|
||||||
|
.yo-menu .staggered-menu-panel,
|
||||||
|
.yo-menu .sm-panel-itemLabel {
|
||||||
|
will-change: transform;
|
||||||
|
backface-visibility: hidden;
|
||||||
|
}
|
||||||
|
/* pause decorative motion behind the open menu */
|
||||||
|
html.menu-open main * {
|
||||||
|
animation-play-state: paused !important;
|
||||||
|
}
|
||||||
.yo-menu .staggered-menu-panel {
|
.yo-menu .staggered-menu-panel {
|
||||||
background: #f4f1e8;
|
background: #f4f1e8;
|
||||||
padding: 5.5rem var(--gutter) 2rem;
|
padding: 5.5rem var(--gutter) 2rem;
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export default function MobileMenu({ items, current, email, status }: Props) {
|
|||||||
className="yo-menu"
|
className="yo-menu"
|
||||||
position="right"
|
position="right"
|
||||||
isFixed
|
isFixed
|
||||||
colors={['#c60c30', '#f9e300', '#009b3a', '#00a1de']}
|
colors={['#c60c30', '#f9e300']}
|
||||||
accentColor="#c60c30"
|
accentColor="#c60c30"
|
||||||
menuButtonColor="#141412"
|
menuButtonColor="#141412"
|
||||||
openMenuButtonColor="#141412"
|
openMenuButtonColor="#141412"
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
import { NAV, SITE } from '../lib/site';
|
import { NAV, SITE } from '../lib/site';
|
||||||
import ChicagoStar from './ChicagoStar.astro';
|
import Logo from './Logo.astro';
|
||||||
import MobileMenu from './MobileMenu';
|
import MobileMenu from './MobileMenu';
|
||||||
const path = Astro.url.pathname.replace(/\/$/, '') || '/';
|
const path = Astro.url.pathname.replace(/\/$/, '') || '/';
|
||||||
const isActive = (href: string) => path === href || path.startsWith(href + '/');
|
const isActive = (href: string) => path === href || path.startsWith(href + '/');
|
||||||
@@ -9,7 +9,7 @@ const isActive = (href: string) => path === href || path.startsWith(href + '/');
|
|||||||
<header class="bar">
|
<header class="bar">
|
||||||
<div class="wrap row">
|
<div class="wrap row">
|
||||||
<a class="brand" href="/" aria-label={`${SITE.name}, home`}>
|
<a class="brand" href="/" aria-label={`${SITE.name}, home`}>
|
||||||
<ChicagoStar size="1.9rem" />
|
<Logo />
|
||||||
<span class="name">yoyos<span class="tld">.sh</span></span>
|
<span class="name">yoyos<span class="tld">.sh</span></span>
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
@@ -47,9 +47,7 @@ const isActive = (href: string) => path === href || path.startsWith(href + '/');
|
|||||||
position: sticky;
|
position: sticky;
|
||||||
top: 0;
|
top: 0;
|
||||||
z-index: 100;
|
z-index: 100;
|
||||||
background: color-mix(in oklab, var(--bg) 92%, transparent);
|
background: var(--bg);
|
||||||
backdrop-filter: blur(10px);
|
|
||||||
-webkit-backdrop-filter: blur(10px);
|
|
||||||
border-bottom: var(--border-w) solid var(--line-strong);
|
border-bottom: var(--border-w) solid var(--line-strong);
|
||||||
}
|
}
|
||||||
.row {
|
.row {
|
||||||
@@ -71,11 +69,8 @@ const isActive = (href: string) => path === href || path.startsWith(href + '/');
|
|||||||
letter-spacing: -0.03em;
|
letter-spacing: -0.03em;
|
||||||
color: var(--fg);
|
color: var(--fg);
|
||||||
}
|
}
|
||||||
.brand :global(svg) {
|
.brand:hover :global(.mark) {
|
||||||
transition: rotate 0.6s var(--ease);
|
rotate: 12deg;
|
||||||
}
|
|
||||||
.brand:hover :global(svg) {
|
|
||||||
rotate: 60deg;
|
|
||||||
}
|
}
|
||||||
.tld {
|
.tld {
|
||||||
color: var(--fg-muted);
|
color: var(--fg-muted);
|
||||||
|
|||||||
@@ -31,7 +31,9 @@ const statusLabel = { live: 'Live', shipped: 'Shipped', 'in-progress': 'In progr
|
|||||||
transition:name={`cover-${project.id}`}
|
transition:name={`cover-${project.id}`}
|
||||||
/>
|
/>
|
||||||
) : (
|
) : (
|
||||||
<div class="placeholder">Images coming soon</div>
|
<div class="bars" role="img" aria-label="Images coming soon">
|
||||||
|
<span class="ns">NO SIGNAL</span>
|
||||||
|
</div>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@@ -97,16 +99,43 @@ const statusLabel = { live: 'Live', shipped: 'Shipped', 'in-progress': 'In progr
|
|||||||
background: #e8e3d4;
|
background: #e8e3d4;
|
||||||
}
|
}
|
||||||
.media :global(img),
|
.media :global(img),
|
||||||
.placeholder {
|
.bars {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
aspect-ratio: 16 / 10;
|
aspect-ratio: 16 / 10;
|
||||||
object-fit: cover;
|
object-fit: cover;
|
||||||
object-position: top left;
|
object-position: top left;
|
||||||
}
|
}
|
||||||
.placeholder {
|
/* 90s TV test pattern for projects without images yet */
|
||||||
--fg: var(--ink);
|
.bars {
|
||||||
--fg-muted: #6b675d;
|
position: relative;
|
||||||
--bg-sunken: #ebe6d6;
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
background:
|
||||||
|
linear-gradient(to bottom, transparent 72%, #141412 72% 78%, transparent 78%),
|
||||||
|
linear-gradient(90deg, #c0c0c0 0 14.28%, #c0c000 0 28.57%, #00c0c0 0 42.85%, #00c000 0 57.14%, #c000c0 0 71.42%, #c00000 0 85.71%, #0000c0 0);
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
.bars::before {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
background:
|
||||||
|
url('/fx/grain.png') 0 0 / 96px 96px,
|
||||||
|
repeating-linear-gradient(to bottom, rgb(0 0 0 / 0.18) 0 1px, transparent 1px 3px);
|
||||||
|
opacity: 0.8;
|
||||||
|
}
|
||||||
|
.ns {
|
||||||
|
position: relative;
|
||||||
|
padding: 0.15rem 0.6rem;
|
||||||
|
background: #141412;
|
||||||
|
color: #fff;
|
||||||
|
font-family: var(--ff-crt);
|
||||||
|
font-size: 1.4rem;
|
||||||
|
letter-spacing: 0.08em;
|
||||||
|
animation: blink 1.4s steps(1) infinite;
|
||||||
|
}
|
||||||
|
.card:hover .bars::before {
|
||||||
|
animation: grain-jitter 0.3s steps(1) infinite;
|
||||||
}
|
}
|
||||||
.body {
|
.body {
|
||||||
display: grid;
|
display: grid;
|
||||||
|
|||||||
@@ -43,6 +43,8 @@ const {
|
|||||||
caption,
|
caption,
|
||||||
...rest
|
...rest
|
||||||
} = Astro.props;
|
} = Astro.props;
|
||||||
|
// Pixel art (tools/fx.py *-pixel) is tiny: serve it losslessly at native size.
|
||||||
|
const isPixel = src.src.includes('-pixel');
|
||||||
---
|
---
|
||||||
|
|
||||||
<figure
|
<figure
|
||||||
@@ -51,7 +53,13 @@ const {
|
|||||||
style={`--rot:${rotate}deg;--ink:${ink};${ratio ? `--ratio:${ratio};` : ''}--pos:${position}`}
|
style={`--rot:${rotate}deg;--ink:${ink};${ratio ? `--ratio:${ratio};` : ''}--pos:${position}`}
|
||||||
>
|
>
|
||||||
<div class="frame">
|
<div class="frame">
|
||||||
|
{
|
||||||
|
isPixel ? (
|
||||||
|
<Image src={src} alt={alt} format="png" loading={loading} />
|
||||||
|
) : (
|
||||||
<Image src={src} alt={alt} widths={widths} sizes={sizes} loading={loading} />
|
<Image src={src} alt={alt} widths={widths} sizes={sizes} loading={loading} />
|
||||||
|
)
|
||||||
|
}
|
||||||
</div>
|
</div>
|
||||||
{caption && <figcaption>{caption}</figcaption>}
|
{caption && <figcaption>{caption}</figcaption>}
|
||||||
</figure>
|
</figure>
|
||||||
|
|||||||
@@ -26,6 +26,11 @@ const {
|
|||||||
type = 'website',
|
type = 'website',
|
||||||
} = Astro.props;
|
} = Astro.props;
|
||||||
|
|
||||||
|
// Page change = old CRT switching off, new one switching on.
|
||||||
|
const crtOff = { name: 'crt-off', duration: '0.32s', easing: 'cubic-bezier(0.7, 0, 0.84, 0)', fillMode: 'both' };
|
||||||
|
const crtOn = { name: 'crt-on', duration: '0.42s', delay: '0.1s', easing: 'cubic-bezier(0.16, 1, 0.3, 1)', fillMode: 'both' };
|
||||||
|
const crt = { forwards: { old: crtOff, new: crtOn }, backwards: { old: crtOff, new: crtOn } };
|
||||||
|
|
||||||
const fullTitle = title ? `${title} · ${SITE.name}` : SITE.title;
|
const fullTitle = title ? `${title} · ${SITE.name}` : SITE.title;
|
||||||
const canonical = new URL(Astro.url.pathname, Astro.site);
|
const canonical = new URL(Astro.url.pathname, Astro.site);
|
||||||
const ogImage = image ? new URL(image, Astro.site) : undefined;
|
const ogImage = image ? new URL(image, Astro.site) : undefined;
|
||||||
@@ -43,7 +48,7 @@ const person = {
|
|||||||
---
|
---
|
||||||
|
|
||||||
<!doctype html>
|
<!doctype html>
|
||||||
<html lang="en" data-theme={theme}>
|
<html lang="en" data-theme={theme} transition:animate={crt}>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8" />
|
<meta charset="utf-8" />
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
<meta name="viewport" content="width=device-width, initial-scale=1, viewport-fit=cover" />
|
||||||
|
|||||||
@@ -3,13 +3,14 @@ import Base from '../layouts/Base.astro';
|
|||||||
import { SITE } from '../lib/site';
|
import { SITE } from '../lib/site';
|
||||||
import { Image } from 'astro:assets';
|
import { Image } from 'astro:assets';
|
||||||
import Clipping from '../components/deco/Clipping.astro';
|
import Clipping from '../components/deco/Clipping.astro';
|
||||||
import daisies from '../assets/photos/daisies.jpg';
|
import FxImage from '../components/FxImage.astro';
|
||||||
import grassTop from '../assets/photos/grass-top.jpg';
|
import daisies from '../assets/fx/daisies-toon.webp';
|
||||||
import botanical from '../assets/photos/botanical.jpg';
|
import grassTop from '../assets/fx/grass-top-pixel.webp';
|
||||||
import lily from '../assets/photos/lily.jpg';
|
import botanical from '../assets/fx/botanical-riso.webp';
|
||||||
import marinaRiver from '../assets/photos/marina-city-river.jpg';
|
import lily from '../assets/fx/lily-pixel.webp';
|
||||||
import serverRack from '../assets/photos/server-rack.jpg';
|
import guitar from '../assets/fx/guitar-hollow-toon.webp';
|
||||||
import computers from '../assets/photos/computers-room.jpg';
|
import serverRack from '../assets/fx/server-rack-toon.webp';
|
||||||
|
import computers from '../assets/fx/computers-room-xerox.webp';
|
||||||
|
|
||||||
const packetPhotos = [grassTop, computers, serverRack, botanical, lily];
|
const packetPhotos = [grassTop, computers, serverRack, botanical, lily];
|
||||||
|
|
||||||
@@ -66,17 +67,17 @@ const timeline = [
|
|||||||
|
|
||||||
<Base title="About" description="About Johan Sandoval: background, skills and experience." theme="garden">
|
<Base title="About" description="About Johan Sandoval: background, skills and experience." theme="garden">
|
||||||
<section class="hero">
|
<section class="hero">
|
||||||
<Image class="hero-img" src={daisies} alt="" widths={[640, 960]} sizes="100vw" loading="eager" />
|
<FxImage class="hero-img" src={daisies} mode="pixel" amount={1} position="center 60%" sizes="100vw" loading="eager" />
|
||||||
<div class="wrap intro">
|
<div class="wrap intro">
|
||||||
<h1>about me<sup>*</sup></h1>
|
<h1 class="rgb">about me<sup>*</sup></h1>
|
||||||
<p class="tagline">software engineer in chicago. i like building useful things.</p>
|
<p class="tagline">software engineer. i like building useful things.</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<div class="strip"><div class="wrap">Automation, internal tools and web apps, plus games, 3D, hardware and music on the side.</div></div>
|
<div class="strip"><div class="wrap">Automation, internal tools and web apps, plus games, 3D, hardware and music on the side.</div></div>
|
||||||
|
|
||||||
<section class="wrap section intro-grid">
|
<section class="wrap section intro-grid">
|
||||||
<Clipping class="polaroid" src={marinaRiver} alt="Marina City and the Chicago River" ratio="1 / 1" rotate={4} tape="top" caption="Home base: Chicago, IL" widths={[300, 500]} sizes="(min-width: 52rem) 18rem, 60vw" />
|
<Clipping class="polaroid hover-glitch" src={guitar} alt="" ratio="1 / 1" rotate={4} tape="top" caption="Off the clock: guitar, games, 3D" widths={[300, 500]} sizes="(min-width: 52rem) 18rem, 60vw" />
|
||||||
<div class="blob prose" data-reveal>
|
<div class="blob prose" data-reveal>
|
||||||
<p>
|
<p>
|
||||||
I'm a deployment technical lead who builds the tooling the deployments run on. Over two
|
I'm a deployment technical lead who builds the tooling the deployments run on. Over two
|
||||||
@@ -106,7 +107,11 @@ const timeline = [
|
|||||||
skills.map((s, i) => (
|
skills.map((s, i) => (
|
||||||
<li class="packet" style={`--rot:${[-2, 1.5, -1, 2, -1.5][i % 5]}deg`}>
|
<li class="packet" style={`--rot:${[-2, 1.5, -1, 2, -1.5][i % 5]}deg`}>
|
||||||
<span class="kit">skill set · no.{String(i + 1).padStart(2, '0')}</span>
|
<span class="kit">skill set · no.{String(i + 1).padStart(2, '0')}</span>
|
||||||
|
{packetPhotos[i % packetPhotos.length].src.includes('-pixel') ? (
|
||||||
|
<Image class="window" src={packetPhotos[i % packetPhotos.length]} alt="" format="png" />
|
||||||
|
) : (
|
||||||
<Image class="window" src={packetPhotos[i % packetPhotos.length]} alt="" widths={[240, 400]} sizes="(min-width: 52rem) 14rem, 80vw" />
|
<Image class="window" src={packetPhotos[i % packetPhotos.length]} alt="" widths={[240, 400]} sizes="(min-width: 52rem) 14rem, 80vw" />
|
||||||
|
)}
|
||||||
<h3>{s.k}</h3>
|
<h3>{s.k}</h3>
|
||||||
<ul>
|
<ul>
|
||||||
{s.v.map((v) => (
|
{s.v.map((v) => (
|
||||||
@@ -156,20 +161,11 @@ const timeline = [
|
|||||||
.hero :global(.hero-img) {
|
.hero :global(.hero-img) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: center 60%;
|
|
||||||
animation: zoom 14s ease-out both;
|
|
||||||
}
|
|
||||||
@keyframes zoom {
|
|
||||||
from {
|
|
||||||
transform: scale(1.12);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.hero::after {
|
.hero::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
pointer-events: none;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: linear-gradient(to top, rgb(10 30 5 / 0.55), transparent 65%);
|
background: linear-gradient(to top, rgb(10 30 5 / 0.55), transparent 65%);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import Window from '../../components/deco/Window.astro';
|
|||||||
import Clipping from '../../components/deco/Clipping.astro';
|
import Clipping from '../../components/deco/Clipping.astro';
|
||||||
import ScrambledText from '../../components/bits/ScrambledText';
|
import ScrambledText from '../../components/bits/ScrambledText';
|
||||||
import forest from '../../assets/photos/forest.jpg';
|
import forest from '../../assets/photos/forest.jpg';
|
||||||
import tv from '../../assets/photos/tv.jpg';
|
import tv from '../../assets/fx/tv-vintage.webp';
|
||||||
import floppies from '../../assets/photos/floppies-sticker.png';
|
import floppies from '../../assets/photos/floppies-sticker.png';
|
||||||
|
|
||||||
// Tiny version of a real photo, scaled up with crisp pixels = instant pixel art.
|
// Tiny version of a real photo, scaled up with crisp pixels = instant pixel art.
|
||||||
@@ -23,12 +23,12 @@ const fmt = (d: Date) => d.toLocaleDateString('en-US', { month: 'short', day: 'n
|
|||||||
<section class="wrap section desk">
|
<section class="wrap section desk">
|
||||||
<div class="hero">
|
<div class="hero">
|
||||||
<Window title="yoyos.sh — Blog" class="wall-win">
|
<Window title="yoyos.sh — Blog" class="wall-win">
|
||||||
<div class="wall" style={`background-image:url(${pixelForest.src})`}>
|
<div class="wall crt-overlay" style={`background-image:url(${pixelForest.src})`}>
|
||||||
<div class="loading" aria-hidden="true">
|
<div class="loading" aria-hidden="true">
|
||||||
<span class="bar"><i></i></span>
|
<span class="bar"><i></i></span>
|
||||||
<span>Loading…</span>
|
<span>Loading…</span>
|
||||||
</div>
|
</div>
|
||||||
<h1>Blog</h1>
|
<h1 class="glitch" data-text="Blog">Blog</h1>
|
||||||
<div class="note">
|
<div class="note">
|
||||||
<p class="note-title">Note</p>
|
<p class="note-title">Note</p>
|
||||||
<ScrambledText client:visible className="note-text" radius={70} duration={1} speed={0.4} scrambleChars="░▒▓">
|
<ScrambledText client:visible className="note-text" radius={70} duration={1} speed={0.4} scrambleChars="░▒▓">
|
||||||
@@ -40,7 +40,7 @@ const fmt = (d: Date) => d.toLocaleDateString('en-US', { month: 'short', day: 'n
|
|||||||
</Window>
|
</Window>
|
||||||
|
|
||||||
<div class="props" aria-hidden="true">
|
<div class="props" aria-hidden="true">
|
||||||
<Clipping src={tv} ratio="1 / 1" position="center 70%" rotate={4} tape="top" widths={[260, 420]} sizes="40vw" class="tv" />
|
<Clipping src={tv} ratio="1 / 1" position="center 70%" rotate={4} tape="top" widths={[260, 420]} sizes="40vw" class="tv hover-glitch" />
|
||||||
<img class="floppy" src={floppy.src} width={floppy.attributes.width} height={floppy.attributes.height} alt="" loading="lazy" />
|
<img class="floppy" src={floppy.src} width={floppy.attributes.width} height={floppy.attributes.height} alt="" loading="lazy" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -98,6 +98,7 @@ const fmt = (d: Date) => d.toLocaleDateString('en-US', { month: 'short', day: 'n
|
|||||||
image-rendering: pixelated;
|
image-rendering: pixelated;
|
||||||
}
|
}
|
||||||
.loading {
|
.loading {
|
||||||
|
z-index: 4;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: var(--space-4);
|
top: var(--space-4);
|
||||||
left: var(--space-4);
|
left: var(--space-4);
|
||||||
@@ -130,6 +131,8 @@ const fmt = (d: Date) => d.toLocaleDateString('en-US', { month: 'short', day: 'n
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
h1 {
|
h1 {
|
||||||
|
position: relative;
|
||||||
|
z-index: 4;
|
||||||
font-size: clamp(4.5rem, 24vw, 10rem);
|
font-size: clamp(4.5rem, 24vw, 10rem);
|
||||||
line-height: 0.85;
|
line-height: 0.85;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
@@ -138,6 +141,8 @@ const fmt = (d: Date) => d.toLocaleDateString('en-US', { month: 'short', day: 'n
|
|||||||
8px 8px 0 #10172e;
|
8px 8px 0 #10172e;
|
||||||
}
|
}
|
||||||
.note {
|
.note {
|
||||||
|
position: relative;
|
||||||
|
z-index: 4;
|
||||||
max-width: 30rem;
|
max-width: 30rem;
|
||||||
padding: 0.75rem 0.9rem;
|
padding: 0.75rem 0.9rem;
|
||||||
background: #fbfcf6;
|
background: #fbfcf6;
|
||||||
|
|||||||
@@ -3,11 +3,11 @@ import Base from '../layouts/Base.astro';
|
|||||||
import Stamp from '../components/deco/Stamp.astro';
|
import Stamp from '../components/deco/Stamp.astro';
|
||||||
import { SITE } from '../lib/site';
|
import { SITE } from '../lib/site';
|
||||||
import { Image, getImage } from 'astro:assets';
|
import { Image, getImage } from 'astro:assets';
|
||||||
import aerial from '../assets/photos/chicago-aerial.jpg';
|
import hibiscus from '../assets/fx/hibiscus-toon.webp';
|
||||||
import botanical from '../assets/photos/botanical.jpg';
|
import botanical from '../assets/fx/botanical-riso.webp';
|
||||||
import back from '../assets/photos/postcard-back.jpg';
|
import back from '../assets/photos/postcard-back.jpg';
|
||||||
const year = new Date().getFullYear();
|
const year = new Date().getFullYear();
|
||||||
const aerialBg = await getImage({ src: aerial, width: 900, format: 'webp' });
|
const fillBg = await getImage({ src: hibiscus, width: 900, format: 'webp' });
|
||||||
const backBg = await getImage({ src: back, width: 1200, format: 'webp' });
|
const backBg = await getImage({ src: back, width: 1200, format: 'webp' });
|
||||||
---
|
---
|
||||||
|
|
||||||
@@ -15,10 +15,12 @@ const backBg = await getImage({ src: back, width: 1200, format: 'webp' });
|
|||||||
<section class="wrap section layout">
|
<section class="wrap section layout">
|
||||||
<div class="side stack">
|
<div class="side stack">
|
||||||
<div class="greetings" aria-hidden="true" data-reveal="tilt">
|
<div class="greetings" aria-hidden="true" data-reveal="tilt">
|
||||||
<span class="from">Greetings from</span>
|
<span class="from">Say hello!</span>
|
||||||
<span class="city" style={`background-image:url(${aerialBg.src})`}>Chicago</span>
|
<span class="city" style={`background-image:url(${fillBg.src})`}>Hi there</span>
|
||||||
|
<span class="sparkle sp1" style="--s:1.4rem;--c:var(--yellow)"></span>
|
||||||
|
<span class="sparkle sp2" style="--s:1rem;--c:var(--red);--d:1.9s"></span>
|
||||||
</div>
|
</div>
|
||||||
<h1>Get in touch</h1>
|
<h1 class="glitch" data-text="Get in touch">Get in touch</h1>
|
||||||
<p class="lead">
|
<p class="lead">
|
||||||
Hiring, freelance work, collaborations, or you want to talk about a game, a 3D model or a
|
Hiring, freelance work, collaborations, or you want to talk about a game, a 3D model or a
|
||||||
riff. I read everything and usually reply within a couple of days.
|
riff. I read everything and usually reply within a couple of days.
|
||||||
@@ -48,7 +50,7 @@ const backBg = await getImage({ src: back, width: 1200, format: 'webp' });
|
|||||||
<div class="address">
|
<div class="address">
|
||||||
<div class="top">
|
<div class="top">
|
||||||
<div class="postmark" aria-hidden="true">
|
<div class="postmark" aria-hidden="true">
|
||||||
<span>Chicago IL</span>
|
<span>Air mail</span>
|
||||||
<b>{year}</b>
|
<b>{year}</b>
|
||||||
<span>yoyos.sh</span>
|
<span>yoyos.sh</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -127,6 +129,17 @@ const backBg = await getImage({ src: back, width: 1200, format: 'webp' });
|
|||||||
rotate: -3deg;
|
rotate: -3deg;
|
||||||
z-index: 1;
|
z-index: 1;
|
||||||
}
|
}
|
||||||
|
.greetings .sparkle {
|
||||||
|
position: absolute;
|
||||||
|
}
|
||||||
|
.sp1 {
|
||||||
|
top: 0.6rem;
|
||||||
|
right: 1rem;
|
||||||
|
}
|
||||||
|
.sp2 {
|
||||||
|
bottom: 0.7rem;
|
||||||
|
left: 1.2rem;
|
||||||
|
}
|
||||||
.city {
|
.city {
|
||||||
font-family: var(--ff-mag);
|
font-family: var(--ff-mag);
|
||||||
font-size: clamp(2.5rem, 13.5vw, 6.4rem);
|
font-size: clamp(2.5rem, 13.5vw, 6.4rem);
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ import { getImage } from 'astro:assets';
|
|||||||
import Base from '../layouts/Base.astro';
|
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 ChicagoStar from '../components/ChicagoStar.astro';
|
import FxImage from '../components/FxImage.astro';
|
||||||
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,12 +15,12 @@ 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 skyline from '../assets/photos/chicago-skyline-red.jpg';
|
import motoToon from '../assets/fx/motorcycle-toon.webp';
|
||||||
import ctaSign from '../assets/photos/cta-sign.jpg';
|
import motoPixel from '../assets/fx/motorcycle-pixel.webp';
|
||||||
import marina from '../assets/photos/marina-city.jpg';
|
import cassette from '../assets/fx/cassette-vintage.webp';
|
||||||
import cassette from '../assets/photos/cassette.jpg';
|
import tv from '../assets/fx/tv-vintage.webp';
|
||||||
import guitar from '../assets/photos/guitar-strat.jpg';
|
import pile from '../assets/fx/computers-pile-pixel.webp';
|
||||||
import moto from '../assets/photos/motorcycle.jpg';
|
import guitar from '../assets/fx/guitar-strat-riso.webp';
|
||||||
import gba from '../assets/photos/gba-sticker.png';
|
import gba from '../assets/photos/gba-sticker.png';
|
||||||
import floppies from '../assets/photos/floppies-sticker.png';
|
import floppies from '../assets/photos/floppies-sticker.png';
|
||||||
|
|
||||||
@@ -41,50 +41,62 @@ 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>
|
||||||
<!-- ================= COVER ================= -->
|
<!-- ================= COVER ================= -->
|
||||||
<section class="cover">
|
<section class="cover">
|
||||||
|
<div class="speedlines" aria-hidden="true"></div>
|
||||||
<div class="wrap cover-in">
|
<div class="wrap cover-in">
|
||||||
<header class="masthead">
|
<header class="masthead">
|
||||||
<p class="logo" aria-hidden="true">YOYOS<span>.sh</span></p>
|
<p class="logo glitch" data-text="YOYOS" aria-hidden="true">YOYOS</p>
|
||||||
<div class="issue">
|
<div class="issue">
|
||||||
<span>No.{issue}</span>
|
<span>Vol.{issue}</span>
|
||||||
<span>{season} {now.getFullYear()}</span>
|
<span>{season} {now.getFullYear()}</span>
|
||||||
<span class="price">Free</span>
|
<span class="price">Free</span>
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
<div class="hero">
|
<div class="hero">
|
||||||
<Clipping
|
<div class="screen hover-glitch">
|
||||||
class="hero-photo"
|
<FxImage
|
||||||
src={skyline}
|
src={motoToon}
|
||||||
alt="Chicago skyline silhouetted against a red sunset"
|
mode="vhs"
|
||||||
ratio="4 / 3.4"
|
amount={0.9}
|
||||||
position="center 40%"
|
ratio="4 / 3.3"
|
||||||
loading="eager"
|
loading="eager"
|
||||||
widths={[480, 800, 1200]}
|
|
||||||
sizes="(min-width: 60rem) 55vw, 100vw"
|
sizes="(min-width: 60rem) 55vw, 100vw"
|
||||||
rotate={-1.5}
|
alt="Cafe racer motorcycle, cel-shaded"
|
||||||
tape="top"
|
|
||||||
/>
|
/>
|
||||||
|
<div class="osd" aria-hidden="true">
|
||||||
|
<span>▶ PLAY</span>
|
||||||
|
<span class="rec">REC</span>
|
||||||
|
</div>
|
||||||
|
<div class="osd osd-bottom" aria-hidden="true">
|
||||||
|
<span>SP</span>
|
||||||
|
<span>{osdDate} <span class="tc" data-timecode>00:00:00</span></span>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<h1 class="name">
|
<h1 class="name">
|
||||||
<span class="first">Johan</span>
|
<span class="first glitch" data-text="Johan">Johan</span>
|
||||||
<span class="last">Sandoval</span>
|
<span class="last">Sandoval</span>
|
||||||
</h1>
|
</h1>
|
||||||
|
|
||||||
<p class="role-tag">Software Engineer</p>
|
<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">
|
<div class="badge" aria-hidden="true">
|
||||||
<CircularText client:visible text="OPEN TO WORK ★ CHICAGO IL ★ " spinDuration={18} onHover="speedUp" className="badge-ring" />
|
<CircularText client:visible text="OPEN TO WORK ✦ SOFTWARE ENGINEER ✦ " spinDuration={16} onHover="speedUp" className="badge-ring" />
|
||||||
<ChicagoStar size="2.4rem" class="badge-star" />
|
<span class="sparkle" style="--s:2.2rem;--c:var(--cta-yellow)"></span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="sticker sticker-gba" aria-hidden="true">
|
<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} />
|
<StickerPeel client:visible imageSrc={gbaSticker.src} width={150} rotate={-8} peelDirection={20} shadowIntensity={0.45} lightingIntensity={0.08} />
|
||||||
</div>
|
</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">
|
||||||
@@ -102,22 +114,29 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
<ul class="coverlines">
|
<ul class="coverlines">
|
||||||
<li class="cl cl-1">
|
<li class="cl cl-1">
|
||||||
<a href="/work/usmt-dash">
|
<a href="/work/usmt-dash">
|
||||||
|
<span class="num">01</span>
|
||||||
<span class="big">10 → 25</span>
|
<span class="big">10 → 25</span>
|
||||||
daily builds after shipping USMT Dash
|
daily builds after shipping USMT Dash
|
||||||
<span class="pg">p.01</span>
|
|
||||||
</a>
|
</a>
|
||||||
</li>
|
</li>
|
||||||
<li class="cl cl-2">
|
<li class="cl cl-2">
|
||||||
<span class="big">Self-hosted</span>
|
<span class="num">02</span>
|
||||||
|
<span class="big">Self-hosted!</span>
|
||||||
this site runs on my own servers, deployed from git
|
this site runs on my own servers, deployed from git
|
||||||
</li>
|
</li>
|
||||||
<li class="cl cl-3">
|
<li class="cl cl-3">
|
||||||
<a href="/music"><span class="big">Also inside</span> games, 3D, hardware & guitar <span class="pg">p.04</span></a>
|
<a href="/music">
|
||||||
|
<span class="num">03</span>
|
||||||
|
<span class="big">Also inside</span>
|
||||||
|
games, 3D, hardware & guitar
|
||||||
|
</a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
|
||||||
|
<div class="checker strip" style="--h:14px" aria-hidden="true"></div>
|
||||||
|
|
||||||
<Starburst class="burst" color="var(--cta-yellow)" size="clamp(6.5rem, 22vw, 9.5rem)" rotate={10}>
|
<Starburst class="burst" color="var(--cta-yellow)" size="clamp(6.5rem, 22vw, 9.5rem)" rotate={10}>
|
||||||
{SITE.availability.open ? 'Now hiring me!' : 'Say hi!'}
|
{SITE.availability.open ? 'Open to work!' : 'Say hi!'}
|
||||||
</Starburst>
|
</Starburst>
|
||||||
|
|
||||||
<div class="barcode-wrap"><Barcode value="YOYOS.SH-2026" /></div>
|
<div class="barcode-wrap"><Barcode value="YOYOS.SH-2026" /></div>
|
||||||
@@ -130,7 +149,7 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
client:visible
|
client:visible
|
||||||
velocity={45}
|
velocity={45}
|
||||||
numCopies={4}
|
numCopies={4}
|
||||||
texts={['Software Engineer ★ Internal Tools ★ Automation ★ Web Apps ★ ', 'Games ★ 3D ★ Hardware ★ Music ★ Chicago ★ ']}
|
texts={['Software Engineer ✦ Internal Tools ✦ Automation ✦ Web Apps ✦ ', 'Games ✦ 3D ✦ Hardware ✦ Music ✦ Homelab ✦ ']}
|
||||||
className="ticker-text"
|
className="ticker-text"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
@@ -138,12 +157,16 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
<!-- ================= STATS + COLLAGE ================= -->
|
<!-- ================= STATS + COLLAGE ================= -->
|
||||||
<section class="wrap section stats-wrap">
|
<section class="wrap section stats-wrap">
|
||||||
<div class="collage" aria-hidden="true">
|
<div class="collage" aria-hidden="true">
|
||||||
<Clipping class="c-sign" src={ctaSign} ratio="4 / 5" position="45% center" rotate={-4} tape="corners" widths={[300, 500]} sizes="45vw" />
|
<div class="tv-wrap" data-reveal="tilt">
|
||||||
<Clipping class="c-marina" src={marina} ratio="3 / 4" rotate={5} tape="top" treatment="riso" ink="var(--cta-blue)" widths={[300, 500]} sizes="40vw" />
|
<FxImage src={tv} mode="crt" amount={1} ratio="1 / 1" position="center 70%" sizes="50vw" class="tv" />
|
||||||
<Clipping class="c-cassette" src={cassette} ratio="16 / 10" rotate={-7} widths={[260, 420]} sizes="36vw" />
|
<span class="tv-label">CH 03</span>
|
||||||
|
</div>
|
||||||
|
<Clipping class="c-pile" src={pile} ratio="4 / 3" rotate={5} tape="top" widths={[300, 500]} sizes="45vw" />
|
||||||
|
<Clipping class="c-cassette" src={cassette} ratio="16 / 10" rotate={-7} widths={[260, 420]} sizes="40vw" />
|
||||||
<div class="sticker sticker-floppy">
|
<div class="sticker sticker-floppy">
|
||||||
<StickerPeel client:visible imageSrc={floppySticker.src} width={130} rotate={12} peelDirection={-30} shadowIntensity={0.4} lightingIntensity={0.06} />
|
<StickerPeel client:visible imageSrc={floppySticker.src} width={130} rotate={12} peelDirection={-30} shadowIntensity={0.4} lightingIntensity={0.06} />
|
||||||
</div>
|
</div>
|
||||||
|
<p class="bubble pow">Pow!</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="stats" data-reveal data-reveal-stagger>
|
<div class="stats" data-reveal data-reveal-stagger>
|
||||||
@@ -155,7 +178,7 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
<b><CountUp client:visible from={10} to={25} duration={1.4} /> / day</b>
|
<b><CountUp client:visible from={10} to={25} duration={1.4} /> / day</b>
|
||||||
<span>machine builds after shipping USMT Dash</span>
|
<span>machine builds after shipping USMT Dash</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="stat" style="--c: var(--chicago-blue)">
|
<div class="stat" style="--c: var(--cta-blue); --t: #fff">
|
||||||
<b><CountUp client:visible to={1900} separator="," duration={1.6} /></b>
|
<b><CountUp client:visible to={1900} separator="," duration={1.6} /></b>
|
||||||
<span>machines closed against a 1,300 scope</span>
|
<span>machines closed against a 1,300 scope</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -174,10 +197,12 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
<p class="swipe wrap" aria-hidden="true">Swipe →</p>
|
<p class="swipe wrap" aria-hidden="true">Swipe →</p>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
<div class="checker" style="--h:20px;--a:var(--cta-red);--b:var(--paper)" aria-hidden="true"></div>
|
||||||
|
|
||||||
<!-- ================= WHAT I DO ================= -->
|
<!-- ================= WHAT I DO ================= -->
|
||||||
<section class="wrap section">
|
<section class="wrap section">
|
||||||
<div class="head" data-reveal>
|
<div class="head" data-reveal>
|
||||||
<h2><span class="hl" style="--c: var(--chicago-blue)">What I work on</span></h2>
|
<h2><span class="hl" style="--c: var(--cta-yellow)">What I work on</span></h2>
|
||||||
</div>
|
</div>
|
||||||
<div class="what">
|
<div class="what">
|
||||||
<ul class="lines" data-reveal data-reveal-stagger>
|
<ul class="lines" data-reveal data-reveal-stagger>
|
||||||
@@ -195,8 +220,8 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
}
|
}
|
||||||
</ul>
|
</ul>
|
||||||
<div class="what-photos" aria-hidden="true">
|
<div class="what-photos" aria-hidden="true">
|
||||||
<Clipping src={guitar} ratio="1 / 1" rotate={3} tape="top" treatment="duotone" ink="var(--cta-pink)" widths={[300, 500]} sizes="30vw" />
|
<Clipping src={guitar} ratio="1 / 1" rotate={3} tape="top" widths={[300, 500]} sizes="40vw" class="hover-glitch" />
|
||||||
<Clipping src={moto} ratio="4 / 3" rotate={-4} treatment="halftone" widths={[300, 500]} sizes="30vw" data-parallax="0.2" />
|
<Clipping src={motoPixel} ratio="4 / 3" rotate={-4} widths={[300, 500]} sizes="40vw" class="pixelated hover-glitch" data-parallax="0.2" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -223,17 +248,37 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
</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 (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);
|
||||||
background:
|
background:
|
||||||
radial-gradient(circle, color-mix(in oklab, var(--cta-red) 20%, transparent) 1.2px, transparent 1.6px) 0 0 / 10px 10px,
|
radial-gradient(circle, color-mix(in oklab, var(--cta-red) 22%, transparent) 1.2px, transparent 1.6px) 0 0 / 10px 10px,
|
||||||
var(--paper);
|
var(--paper);
|
||||||
border-bottom: 3px solid var(--ink);
|
border-bottom: 3px solid var(--ink);
|
||||||
}
|
}
|
||||||
|
.cover > .speedlines {
|
||||||
|
color: var(--ink);
|
||||||
|
}
|
||||||
.cover-in {
|
.cover-in {
|
||||||
position: relative;
|
position: relative;
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -251,22 +296,22 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
}
|
}
|
||||||
.logo {
|
.logo {
|
||||||
font-family: var(--ff-mag);
|
font-family: var(--ff-mag);
|
||||||
font-size: clamp(2.8rem, 14vw, 9rem);
|
font-size: clamp(3.2rem, 17vw, 9.5rem);
|
||||||
line-height: 0.82;
|
line-height: 0.82;
|
||||||
min-width: 0;
|
|
||||||
white-space: nowrap;
|
|
||||||
letter-spacing: -0.05em;
|
letter-spacing: -0.05em;
|
||||||
color: var(--cta-red);
|
color: var(--cta-red);
|
||||||
-webkit-text-stroke: 2px var(--ink);
|
-webkit-text-stroke: 2px var(--ink);
|
||||||
paint-order: stroke fill;
|
paint-order: stroke fill;
|
||||||
text-shadow: 4px 4px 0 var(--ink);
|
text-shadow: 4px 4px 0 var(--ink);
|
||||||
|
white-space: nowrap;
|
||||||
|
min-width: 0;
|
||||||
}
|
}
|
||||||
.logo span {
|
.logo::before,
|
||||||
font-size: 0.3em;
|
.logo::after,
|
||||||
color: var(--ink);
|
.first::before,
|
||||||
|
.first::after {
|
||||||
-webkit-text-stroke: 0;
|
-webkit-text-stroke: 0;
|
||||||
text-shadow: none;
|
text-shadow: none;
|
||||||
letter-spacing: 0;
|
|
||||||
}
|
}
|
||||||
.issue {
|
.issue {
|
||||||
flex: none;
|
flex: none;
|
||||||
@@ -289,14 +334,21 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
.hero {
|
.hero {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
.hero :global(.hero-photo) {
|
.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;
|
animation: rise 0.9s 0.1s var(--ease) both;
|
||||||
}
|
}
|
||||||
|
.tc {
|
||||||
|
margin-left: 0.4em;
|
||||||
|
}
|
||||||
.name {
|
.name {
|
||||||
position: relative;
|
position: relative;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
display: grid;
|
display: grid;
|
||||||
margin-top: -3.2rem;
|
margin-top: -2.6rem;
|
||||||
padding-inline: 0.2rem;
|
padding-inline: 0.2rem;
|
||||||
font-family: var(--ff-mag);
|
font-family: var(--ff-mag);
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
@@ -314,12 +366,15 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
}
|
}
|
||||||
.last {
|
.last {
|
||||||
color: var(--ink);
|
color: var(--ink);
|
||||||
text-shadow: 5px 5px 0 var(--cta-yellow);
|
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 {
|
.role-tag {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
top: 0.9rem;
|
top: 2.6rem;
|
||||||
left: -0.4rem;
|
left: -0.4rem;
|
||||||
padding: 0.3rem 0.7rem;
|
padding: 0.3rem 0.7rem;
|
||||||
background: var(--cta-blue);
|
background: var(--cta-blue);
|
||||||
@@ -333,6 +388,22 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
rotate: -4deg;
|
rotate: -4deg;
|
||||||
box-shadow: 3px 3px 0 var(--ink);
|
box-shadow: 3px 3px 0 var(--ink);
|
||||||
}
|
}
|
||||||
|
.say {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 3;
|
||||||
|
top: 5.2rem;
|
||||||
|
left: 0.6rem;
|
||||||
|
max-width: 11rem;
|
||||||
|
font-size: 0.85rem;
|
||||||
|
rotate: -3deg;
|
||||||
|
animation: pop 0.5s 0.9s cubic-bezier(0.3, 1.6, 0.5, 1) both;
|
||||||
|
}
|
||||||
|
@keyframes pop {
|
||||||
|
from {
|
||||||
|
opacity: 0;
|
||||||
|
transform: scale(0.4);
|
||||||
|
}
|
||||||
|
}
|
||||||
.badge {
|
.badge {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
z-index: 3;
|
z-index: 3;
|
||||||
@@ -345,6 +416,7 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
border-radius: 50%;
|
border-radius: 50%;
|
||||||
background: var(--ink);
|
background: var(--ink);
|
||||||
color: var(--paper);
|
color: var(--paper);
|
||||||
|
border: 3px solid var(--cta-yellow);
|
||||||
}
|
}
|
||||||
.badge :global(.badge-ring) {
|
.badge :global(.badge-ring) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
@@ -357,7 +429,7 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
color: var(--paper);
|
color: var(--paper);
|
||||||
}
|
}
|
||||||
.badge :global(.badge-ring span) {
|
.badge :global(.badge-ring span) {
|
||||||
font-size: 0.68rem;
|
font-size: 0.62rem;
|
||||||
inset: 0.25rem;
|
inset: 0.25rem;
|
||||||
}
|
}
|
||||||
.sticker {
|
.sticker {
|
||||||
@@ -370,6 +442,18 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
width: 150px;
|
width: 150px;
|
||||||
height: 110px;
|
height: 110px;
|
||||||
}
|
}
|
||||||
|
.hero > .sparkle {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 4;
|
||||||
|
}
|
||||||
|
.s1 {
|
||||||
|
top: 42%;
|
||||||
|
left: 8%;
|
||||||
|
}
|
||||||
|
.s2 {
|
||||||
|
top: 18%;
|
||||||
|
right: 34%;
|
||||||
|
}
|
||||||
|
|
||||||
.deck {
|
.deck {
|
||||||
display: grid;
|
display: grid;
|
||||||
@@ -405,7 +489,7 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
}
|
}
|
||||||
.cl {
|
.cl {
|
||||||
position: relative;
|
position: relative;
|
||||||
padding: 0.75rem 0.9rem;
|
padding: 0.75rem 0.9rem 0.75rem 3.1rem;
|
||||||
border: 2px solid var(--ink);
|
border: 2px solid var(--ink);
|
||||||
font-family: var(--ff-grotesk);
|
font-family: var(--ff-grotesk);
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -417,6 +501,20 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
display: block;
|
display: block;
|
||||||
}
|
}
|
||||||
|
.cl .num {
|
||||||
|
position: absolute;
|
||||||
|
left: 0.6rem;
|
||||||
|
top: 0.75rem;
|
||||||
|
display: grid;
|
||||||
|
place-items: center;
|
||||||
|
width: 1.9rem;
|
||||||
|
height: 1.9rem;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: var(--ink);
|
||||||
|
color: var(--paper);
|
||||||
|
font-family: var(--ff-mag);
|
||||||
|
font-size: 0.8rem;
|
||||||
|
}
|
||||||
.cl .big {
|
.cl .big {
|
||||||
display: block;
|
display: block;
|
||||||
font-family: var(--ff-mag);
|
font-family: var(--ff-mag);
|
||||||
@@ -424,13 +522,6 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
font-size: 1.7rem;
|
font-size: 1.7rem;
|
||||||
line-height: 1.05;
|
line-height: 1.05;
|
||||||
}
|
}
|
||||||
.cl .pg {
|
|
||||||
position: absolute;
|
|
||||||
right: 0.5rem;
|
|
||||||
top: 0.4rem;
|
|
||||||
font-family: var(--ff-mono);
|
|
||||||
font-size: 0.7rem;
|
|
||||||
}
|
|
||||||
.cl-1 {
|
.cl-1 {
|
||||||
background: var(--cta-pink);
|
background: var(--cta-pink);
|
||||||
rotate: -1.2deg;
|
rotate: -1.2deg;
|
||||||
@@ -444,6 +535,9 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
rotate: -0.6deg;
|
rotate: -0.6deg;
|
||||||
}
|
}
|
||||||
|
.strip {
|
||||||
|
border: 2px solid var(--ink);
|
||||||
|
}
|
||||||
.cover :global(.burst) {
|
.cover :global(.burst) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 0;
|
right: 0;
|
||||||
@@ -479,6 +573,7 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
'mast mast'
|
'mast mast'
|
||||||
'hero deck'
|
'hero deck'
|
||||||
'hero lines'
|
'hero lines'
|
||||||
|
'hero strip'
|
||||||
'hero code';
|
'hero code';
|
||||||
column-gap: var(--space-7);
|
column-gap: var(--space-7);
|
||||||
align-items: start;
|
align-items: start;
|
||||||
@@ -495,6 +590,9 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
.coverlines {
|
.coverlines {
|
||||||
grid-area: lines;
|
grid-area: lines;
|
||||||
}
|
}
|
||||||
|
.strip {
|
||||||
|
grid-area: strip;
|
||||||
|
}
|
||||||
.barcode-wrap {
|
.barcode-wrap {
|
||||||
grid-area: code;
|
grid-area: code;
|
||||||
}
|
}
|
||||||
@@ -502,18 +600,24 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
font-size: 0.95rem;
|
font-size: 0.95rem;
|
||||||
}
|
}
|
||||||
.name {
|
.name {
|
||||||
margin-top: -5rem;
|
margin-top: -4.5rem;
|
||||||
}
|
}
|
||||||
.lede {
|
.lede {
|
||||||
font-size: 1.25rem;
|
font-size: 1.25rem;
|
||||||
}
|
}
|
||||||
|
.say {
|
||||||
|
top: 4rem;
|
||||||
|
left: 1.2rem;
|
||||||
|
max-width: 14rem;
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
.badge {
|
.badge {
|
||||||
width: 8.5rem;
|
width: 8.5rem;
|
||||||
height: 8.5rem;
|
height: 8.5rem;
|
||||||
right: -1.5rem;
|
right: -1.5rem;
|
||||||
}
|
}
|
||||||
.badge :global(.badge-ring span) {
|
.badge :global(.badge-ring span) {
|
||||||
font-size: 0.85rem;
|
font-size: 0.78rem;
|
||||||
}
|
}
|
||||||
.sticker-gba {
|
.sticker-gba {
|
||||||
right: -3rem;
|
right: -3rem;
|
||||||
@@ -551,25 +655,43 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
}
|
}
|
||||||
.collage {
|
.collage {
|
||||||
position: relative;
|
position: relative;
|
||||||
height: 22rem;
|
height: 24rem;
|
||||||
}
|
}
|
||||||
.collage :global(.c-sign) {
|
.tv-wrap {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
top: 0.5rem;
|
|
||||||
width: 46%;
|
|
||||||
}
|
|
||||||
.collage :global(.c-marina) {
|
|
||||||
position: absolute;
|
|
||||||
right: 2%;
|
|
||||||
top: 0;
|
top: 0;
|
||||||
width: 40%;
|
width: 56%;
|
||||||
|
padding: 8px 8px 26px;
|
||||||
|
background: #2a2622;
|
||||||
|
border: 3px solid var(--ink);
|
||||||
|
border-radius: 14px;
|
||||||
|
box-shadow: 5px 5px 0 var(--ink);
|
||||||
|
rotate: -3deg;
|
||||||
|
z-index: 1;
|
||||||
|
}
|
||||||
|
.tv-wrap :global(.tv) {
|
||||||
|
border-radius: 18px / 14px;
|
||||||
|
}
|
||||||
|
.tv-label {
|
||||||
|
position: absolute;
|
||||||
|
bottom: 4px;
|
||||||
|
right: 12px;
|
||||||
|
font-family: var(--ff-crt);
|
||||||
|
color: var(--phosphor);
|
||||||
|
font-size: 1rem;
|
||||||
|
}
|
||||||
|
.collage :global(.c-pile) {
|
||||||
|
position: absolute;
|
||||||
|
right: 0;
|
||||||
|
top: 1.5rem;
|
||||||
|
width: 46%;
|
||||||
}
|
}
|
||||||
.collage :global(.c-cassette) {
|
.collage :global(.c-cassette) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
left: 24%;
|
left: 22%;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
width: 50%;
|
width: 52%;
|
||||||
z-index: 2;
|
z-index: 2;
|
||||||
}
|
}
|
||||||
.sticker-floppy {
|
.sticker-floppy {
|
||||||
@@ -578,6 +700,20 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
width: 130px;
|
width: 130px;
|
||||||
height: 90px;
|
height: 90px;
|
||||||
}
|
}
|
||||||
|
.pow {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 3;
|
||||||
|
right: 12%;
|
||||||
|
top: 47%;
|
||||||
|
background: var(--cta-yellow);
|
||||||
|
font-family: var(--ff-mag);
|
||||||
|
font-weight: 400;
|
||||||
|
font-size: 1.4rem;
|
||||||
|
rotate: 8deg;
|
||||||
|
}
|
||||||
|
.pow::after {
|
||||||
|
background: var(--cta-yellow);
|
||||||
|
}
|
||||||
.stats {
|
.stats {
|
||||||
display: grid;
|
display: grid;
|
||||||
gap: var(--space-4);
|
gap: var(--space-4);
|
||||||
@@ -587,6 +723,7 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
gap: 0.2rem;
|
gap: 0.2rem;
|
||||||
padding: 1rem 1.1rem;
|
padding: 1rem 1.1rem;
|
||||||
background: var(--c);
|
background: var(--c);
|
||||||
|
color: var(--t, var(--ink));
|
||||||
border: 2px solid var(--ink);
|
border: 2px solid var(--ink);
|
||||||
box-shadow: 5px 5px 0 var(--ink);
|
box-shadow: 5px 5px 0 var(--ink);
|
||||||
}
|
}
|
||||||
@@ -635,7 +772,6 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* horizontal swipe rail on mobile, grid on desktop */
|
|
||||||
.rail {
|
.rail {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-auto-flow: column;
|
grid-auto-flow: column;
|
||||||
@@ -719,6 +855,9 @@ const issue = String(now.getMonth() + 1).padStart(2, '0');
|
|||||||
gap: var(--space-4);
|
gap: var(--space-4);
|
||||||
align-items: start;
|
align-items: start;
|
||||||
}
|
}
|
||||||
|
.what-photos :global(.pixelated img) {
|
||||||
|
image-rendering: pixelated;
|
||||||
|
}
|
||||||
@media (min-width: 52rem) {
|
@media (min-width: 52rem) {
|
||||||
.what {
|
.what {
|
||||||
grid-template-columns: 1.4fr 1fr;
|
grid-template-columns: 1.4fr 1fr;
|
||||||
|
|||||||
@@ -6,7 +6,9 @@ import ModelViewer from '../components/ModelViewer.astro';
|
|||||||
import FaultyTerminal from '../components/bits/FaultyTerminal';
|
import FaultyTerminal from '../components/bits/FaultyTerminal';
|
||||||
import { media } from '../lib/media';
|
import { media } from '../lib/media';
|
||||||
import cloud from '../assets/photos/cloud.jpg';
|
import cloud from '../assets/photos/cloud.jpg';
|
||||||
import hibiscus from '../assets/photos/hibiscus.jpg';
|
import hibiscus from '../assets/fx/hibiscus-toon.webp';
|
||||||
|
import lily from '../assets/fx/lily-pixel.webp';
|
||||||
|
import FxImage from '../components/FxImage.astro';
|
||||||
|
|
||||||
const models = (await getCollection('models')).sort((a, b) => +b.data.date - +a.data.date);
|
const models = (await getCollection('models')).sort((a, b) => +b.data.date - +a.data.date);
|
||||||
const faces = ['front', 'back', 'left', 'right', 'top', 'bottom'];
|
const faces = ['front', 'back', 'left', 'right', 'top', 'bottom'];
|
||||||
@@ -41,7 +43,7 @@ const readout = [
|
|||||||
</div>
|
</div>
|
||||||
<div class="wrap intro">
|
<div class="wrap intro">
|
||||||
<p class="sys">Blender · glTF · real-time in the browser</p>
|
<p class="sys">Blender · glTF · real-time in the browser</p>
|
||||||
<h1 class="glow">3D Models</h1>
|
<h1 class="glow glitch" data-text="3D Models">3D Models</h1>
|
||||||
<p class="sub">Models I've built in Blender. Drag to rotate, pinch or scroll to zoom.</p>
|
<p class="sub">Models I've built in Blender. Drag to rotate, pinch or scroll to zoom.</p>
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
@@ -70,13 +72,14 @@ const readout = [
|
|||||||
<p class="blocks">▚▞▚▞▚▞▚▞▚▞</p>
|
<p class="blocks">▚▞▚▞▚▞▚▞▚▞</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="petal">
|
<div class="petal">
|
||||||
<Image src={hibiscus} alt="" widths={[400, 700, 1000]} sizes="(min-width: 52rem) 40vw, 90vw" />
|
<FxImage src={hibiscus} mode="crt" amount={1} ratio="3 / 2" sizes="(min-width: 52rem) 40vw, 90vw" />
|
||||||
<span class="tag tl">OBJ_001</span>
|
<span class="tag tl">OBJ_001</span>
|
||||||
<span class="tag br">RENDER OK</span>
|
<span class="tag br">RENDER OK</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="col right">
|
<div class="col right">
|
||||||
{readout.slice(3).map(([k, v]) => <p><b>{k}</b> {v}</p>)}
|
{readout.slice(3).map(([k, v]) => <p><b>{k}</b> {v}</p>)}
|
||||||
<p class="blocks">▞▚▞▚▞▚▞▚▞▚</p>
|
<p class="blocks">▞▚▞▚▞▚▞▚▞▚</p>
|
||||||
|
<Image class="lily" src={lily} alt="" format="png" />
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
@@ -276,9 +279,16 @@ const readout = [
|
|||||||
border: 1px solid var(--line-strong);
|
border: 1px solid var(--line-strong);
|
||||||
padding: 6px;
|
padding: 6px;
|
||||||
}
|
}
|
||||||
.petal :global(img) {
|
.flower :global(.lily) {
|
||||||
|
display: none;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
filter: saturate(1.3) contrast(1.1);
|
image-rendering: pixelated;
|
||||||
|
border: 1px solid var(--line-strong);
|
||||||
|
}
|
||||||
|
@media (min-width: 52rem) {
|
||||||
|
.flower :global(.lily) {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.petal .tag {
|
.petal .tag {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
|||||||
@@ -7,9 +7,9 @@ import { getImage } from 'astro:assets';
|
|||||||
import HalftoneReveal from '../components/bits/HalftoneReveal';
|
import HalftoneReveal from '../components/bits/HalftoneReveal';
|
||||||
import Clipping from '../components/deco/Clipping.astro';
|
import Clipping from '../components/deco/Clipping.astro';
|
||||||
import pedalboard from '../assets/photos/pedalboard.jpg';
|
import pedalboard from '../assets/photos/pedalboard.jpg';
|
||||||
import hollow from '../assets/photos/guitar-hollow.jpg';
|
import hollow from '../assets/fx/guitar-hollow-toon.webp';
|
||||||
import synth from '../assets/photos/synth.jpg';
|
import synth from '../assets/fx/synth-vintage.webp';
|
||||||
import cassette from '../assets/photos/cassette.jpg';
|
import cassette from '../assets/fx/cassette-vintage.webp';
|
||||||
|
|
||||||
const board = await getImage({ src: pedalboard, width: 1280, format: 'webp' });
|
const board = await getImage({ src: pedalboard, width: 1280, format: 'webp' });
|
||||||
|
|
||||||
@@ -42,7 +42,7 @@ const cable = ['var(--red)', 'var(--yellow)', 'var(--cobalt)', 'var(--grass)', '
|
|||||||
</svg>
|
</svg>
|
||||||
<div class="wrap intro">
|
<div class="wrap intro">
|
||||||
<p class="tune">Guitar · recordings · experiments</p>
|
<p class="tune">Guitar · recordings · experiments</p>
|
||||||
<h1>Music</h1>
|
<h1 class="glitch" data-text="Music">Music</h1>
|
||||||
<div class="lcd" aria-hidden="true">
|
<div class="lcd" aria-hidden="true">
|
||||||
<span class="rec"></span>
|
<span class="rec"></span>
|
||||||
<span class="scroll"><span>Original recordings, self-hosted · {tracks.length} {tracks.length === 1 ? 'track' : 'tracks'} · press play · </span></span>
|
<span class="scroll"><span>Original recordings, self-hosted · {tracks.length} {tracks.length === 1 ? 'track' : 'tracks'} · press play · </span></span>
|
||||||
@@ -51,8 +51,8 @@ const cable = ['var(--red)', 'var(--yellow)', 'var(--cobalt)', 'var(--grass)', '
|
|||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section class="wrap collage" aria-hidden="true">
|
<section class="wrap collage" aria-hidden="true">
|
||||||
<Clipping src={hollow} ratio="4 / 5" rotate={-5} tape="top" treatment="riso" ink="var(--cta-pink)" widths={[300, 500]} sizes="34vw" class="c1" />
|
<Clipping src={hollow} ratio="4 / 5" rotate={-5} tape="top" widths={[300, 500]} sizes="34vw" class="c1 hover-glitch" />
|
||||||
<Clipping src={synth} ratio="1 / 1" rotate={4} tape="corners" widths={[300, 500]} sizes="34vw" class="c2" />
|
<Clipping src={synth} ratio="1 / 1" rotate={4} tape="corners" widths={[300, 500]} sizes="34vw" class="c2 hover-glitch" />
|
||||||
<Clipping src={cassette} ratio="16 / 10" rotate={-2} border={false} widths={[300, 500]} sizes="34vw" class="c3" />
|
<Clipping src={cassette} ratio="16 / 10" rotate={-2} border={false} widths={[300, 500]} sizes="34vw" class="c3" />
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ import ProjectCard from '../../components/ProjectCard.astro';
|
|||||||
import LineBadge from '../../components/LineBadge.astro';
|
import LineBadge from '../../components/LineBadge.astro';
|
||||||
import SplitFlapText from '../../components/bits/SplitFlapText';
|
import SplitFlapText from '../../components/bits/SplitFlapText';
|
||||||
import { DISCIPLINES, LINES } from '../../lib/disciplines';
|
import { DISCIPLINES, LINES } from '../../lib/disciplines';
|
||||||
import sign from '../../assets/photos/cta-sign.jpg';
|
import FxImage from '../../components/FxImage.astro';
|
||||||
|
import sign from '../../assets/fx/cta-sign-vintage.webp';
|
||||||
import map from '../../assets/photos/subway-map.jpg';
|
import map from '../../assets/photos/subway-map.jpg';
|
||||||
|
|
||||||
const work = (await getCollection('work')).sort(
|
const work = (await getCollection('work')).sort(
|
||||||
@@ -17,7 +18,7 @@ const statusLabel = { live: 'Live', shipped: 'Shipped', 'in-progress': 'Building
|
|||||||
|
|
||||||
<Base title="Work" description="Software, web, games, hardware and 3D projects by Johan Sandoval." theme="transit">
|
<Base title="Work" description="Software, web, games, hardware and 3D projects by Johan Sandoval." theme="transit">
|
||||||
<section class="platform">
|
<section class="platform">
|
||||||
<Image class="sign-photo" src={sign} alt="" widths={[640, 1024, 1600]} sizes="100vw" loading="eager" />
|
<FxImage class="sign-photo" src={sign} mode="vhs" amount={0.7} position="45% 40%" sizes="100vw" loading="eager" />
|
||||||
<div class="wrap platform-in">
|
<div class="wrap platform-in">
|
||||||
<p class="station">
|
<p class="station">
|
||||||
<span class="sq">W</span>
|
<span class="sq">W</span>
|
||||||
@@ -101,15 +102,11 @@ const statusLabel = { live: 'Live', shipped: 'Shipped', 'in-progress': 'Building
|
|||||||
.platform :global(.sign-photo) {
|
.platform :global(.sign-photo) {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
width: 100%;
|
|
||||||
height: 100%;
|
|
||||||
object-fit: cover;
|
|
||||||
object-position: 45% 40%;
|
|
||||||
filter: saturate(0.9) contrast(1.05);
|
|
||||||
}
|
}
|
||||||
.platform::after {
|
.platform::after {
|
||||||
content: '';
|
content: '';
|
||||||
position: absolute;
|
position: absolute;
|
||||||
|
pointer-events: none;
|
||||||
inset: 0;
|
inset: 0;
|
||||||
background: linear-gradient(to top, rgb(0 0 0 / 0.75), transparent 60%);
|
background: linear-gradient(to top, rgb(0 0 0 / 0.75), transparent 60%);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,200 @@
|
|||||||
|
/*
|
||||||
|
* Retro / maximalist effects. Plain CSS so they cost almost nothing on phones.
|
||||||
|
* All motion stops under prefers-reduced-motion (see global.css).
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* ---------- glitch headings: <h1 class="glitch" data-text="Same text"> ---------- */
|
||||||
|
.glitch {
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
.glitch::before,
|
||||||
|
.glitch::after {
|
||||||
|
content: attr(data-text);
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
.glitch::before {
|
||||||
|
color: #00e5ff;
|
||||||
|
animation: glitch-a 3.4s steps(1) infinite;
|
||||||
|
}
|
||||||
|
.glitch::after {
|
||||||
|
color: #ff2a6d;
|
||||||
|
animation: glitch-b 3.4s steps(1) infinite;
|
||||||
|
}
|
||||||
|
@keyframes glitch-a {
|
||||||
|
0%, 86%, 100% { opacity: 0; transform: none; clip-path: inset(0); }
|
||||||
|
87% { opacity: 0.9; transform: translate(-4px, 1px); clip-path: inset(10% 0 62% 0); }
|
||||||
|
89% { opacity: 0.9; transform: translate(5px, -1px); clip-path: inset(54% 0 18% 0); }
|
||||||
|
91% { opacity: 0.9; transform: translate(-3px, 0); clip-path: inset(30% 0 40% 0); }
|
||||||
|
93% { opacity: 0; }
|
||||||
|
}
|
||||||
|
@keyframes glitch-b {
|
||||||
|
0%, 87%, 100% { opacity: 0; transform: none; clip-path: inset(0); }
|
||||||
|
88% { opacity: 0.85; transform: translate(4px, -1px); clip-path: inset(70% 0 6% 0); }
|
||||||
|
90% { opacity: 0.85; transform: translate(-5px, 1px); clip-path: inset(4% 0 80% 0); }
|
||||||
|
92% { opacity: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* static RGB split */
|
||||||
|
.rgb {
|
||||||
|
text-shadow:
|
||||||
|
-0.04em 0 0 rgb(0 229 255 / 0.75),
|
||||||
|
0.04em 0 0 rgb(255 42 109 / 0.75);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- CRT / VHS overlays for any positioned box ---------- */
|
||||||
|
.crt-overlay {
|
||||||
|
position: relative;
|
||||||
|
isolation: isolate;
|
||||||
|
}
|
||||||
|
.crt-overlay::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
inset: 0;
|
||||||
|
z-index: 3;
|
||||||
|
pointer-events: none;
|
||||||
|
background:
|
||||||
|
radial-gradient(ellipse at center, transparent 55%, rgb(0 0 0 / 0.55)),
|
||||||
|
repeating-linear-gradient(to bottom, rgb(0 0 0 / 0.22) 0 1px, transparent 1px 3px);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* camcorder on-screen display */
|
||||||
|
.osd {
|
||||||
|
position: absolute;
|
||||||
|
z-index: 4;
|
||||||
|
inset: 0.6rem 0.8rem auto;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
pointer-events: none;
|
||||||
|
font-family: var(--ff-crt);
|
||||||
|
font-size: clamp(1rem, 4.5vw, 1.5rem);
|
||||||
|
line-height: 1;
|
||||||
|
color: #fff;
|
||||||
|
text-shadow:
|
||||||
|
2px 2px 0 rgb(0 0 0 / 0.6),
|
||||||
|
0 0 6px rgb(255 255 255 / 0.4);
|
||||||
|
}
|
||||||
|
.osd .rec::before {
|
||||||
|
content: '';
|
||||||
|
display: inline-block;
|
||||||
|
width: 0.55em;
|
||||||
|
height: 0.55em;
|
||||||
|
margin-right: 0.3em;
|
||||||
|
border-radius: 50%;
|
||||||
|
background: #ff2a2a;
|
||||||
|
animation: blink 1s steps(1) infinite;
|
||||||
|
}
|
||||||
|
.osd-bottom {
|
||||||
|
inset: auto 0.8rem 0.6rem;
|
||||||
|
}
|
||||||
|
@keyframes blink {
|
||||||
|
50% { opacity: 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- manga / magazine deco ---------- */
|
||||||
|
.speedlines {
|
||||||
|
position: absolute;
|
||||||
|
inset: -40%;
|
||||||
|
pointer-events: none;
|
||||||
|
background: repeating-conic-gradient(from 0deg at 50% 50%, currentColor 0 0.7deg, transparent 0.7deg 5deg);
|
||||||
|
-webkit-mask: radial-gradient(circle at 50% 50%, transparent 22%, #000 48%);
|
||||||
|
mask: radial-gradient(circle at 50% 50%, transparent 22%, #000 48%);
|
||||||
|
opacity: 0.16;
|
||||||
|
animation: spin-slow 80s linear infinite;
|
||||||
|
}
|
||||||
|
@keyframes spin-slow {
|
||||||
|
to { rotate: 360deg; }
|
||||||
|
}
|
||||||
|
|
||||||
|
.checker {
|
||||||
|
height: var(--h, 18px);
|
||||||
|
background: repeating-conic-gradient(var(--a, #141412) 0 25%, var(--b, #fffdf7) 0 50%) 0 0 / var(--h, 18px) var(--h, 18px);
|
||||||
|
}
|
||||||
|
.zigzag-bottom {
|
||||||
|
--z: 12px;
|
||||||
|
-webkit-mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
|
||||||
|
mask: conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) 50% / calc(2 * var(--z)) 100%;
|
||||||
|
padding-bottom: var(--z);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* four-point sparkle: <span class="sparkle" style="--s:1.4rem;--c:#f9e300"></span> */
|
||||||
|
.sparkle {
|
||||||
|
display: inline-block;
|
||||||
|
width: var(--s, 1.2rem);
|
||||||
|
height: var(--s, 1.2rem);
|
||||||
|
background: var(--c, #fff);
|
||||||
|
clip-path: polygon(50% 0, 61% 39%, 100% 50%, 61% 61%, 50% 100%, 39% 61%, 0 50%, 39% 39%);
|
||||||
|
animation: twinkle var(--d, 2.4s) ease-in-out infinite;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
@keyframes twinkle {
|
||||||
|
0%, 100% { transform: scale(0.6) rotate(0deg); opacity: 0.6; }
|
||||||
|
50% { transform: scale(1.1) rotate(45deg); opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* speech bubble */
|
||||||
|
.bubble {
|
||||||
|
position: relative;
|
||||||
|
display: inline-block;
|
||||||
|
padding: 0.5em 0.85em;
|
||||||
|
background: #fff;
|
||||||
|
color: #141412;
|
||||||
|
border: 2.5px solid #141412;
|
||||||
|
border-radius: 1.2em;
|
||||||
|
font-family: var(--ff-grotesk);
|
||||||
|
font-weight: 800;
|
||||||
|
line-height: 1.15;
|
||||||
|
}
|
||||||
|
.bubble::after {
|
||||||
|
content: '';
|
||||||
|
position: absolute;
|
||||||
|
left: 1.2em;
|
||||||
|
bottom: -0.75em;
|
||||||
|
width: 1.1em;
|
||||||
|
height: 0.9em;
|
||||||
|
background: #fff;
|
||||||
|
border: 2.5px solid #141412;
|
||||||
|
border-top: 0;
|
||||||
|
border-right: 0;
|
||||||
|
transform: skewX(-30deg);
|
||||||
|
clip-path: polygon(0 0, 100% 0, 0 100%);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* sticker treatment for any element */
|
||||||
|
.sticker-pop {
|
||||||
|
filter: drop-shadow(0 0 0 #fff) drop-shadow(3px 4px 0 rgb(0 0 0 / 0.35));
|
||||||
|
transition: transform 0.2s var(--ease);
|
||||||
|
}
|
||||||
|
.sticker-pop:hover {
|
||||||
|
transform: rotate(-4deg) scale(1.05);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* image hover glitch for <img>/<figure> */
|
||||||
|
.hover-glitch:hover :is(img, canvas) {
|
||||||
|
animation: img-glitch 0.35s steps(2) 2;
|
||||||
|
}
|
||||||
|
@keyframes img-glitch {
|
||||||
|
0% { transform: translate(0); filter: none; }
|
||||||
|
25% { transform: translate(-4px, 2px); filter: hue-rotate(40deg) saturate(2); }
|
||||||
|
50% { transform: translate(3px, -2px); filter: contrast(1.6); }
|
||||||
|
75% { transform: translate(-2px, 0); filter: invert(0.1); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ---------- page transitions: CRT power off / on (wired up in Base.astro) ---------- */
|
||||||
|
@keyframes crt-off {
|
||||||
|
0% { transform: scale(1, 1); filter: brightness(1); }
|
||||||
|
60% { transform: scale(1, 0.006); filter: brightness(4); }
|
||||||
|
100% { transform: scale(0, 0.006); filter: brightness(6); opacity: 0; }
|
||||||
|
}
|
||||||
|
@keyframes crt-on {
|
||||||
|
0% { transform: scale(0, 0.006); filter: brightness(6); opacity: 0; }
|
||||||
|
40% { transform: scale(1, 0.006); filter: brightness(4); opacity: 1; }
|
||||||
|
100% { transform: scale(1, 1); filter: brightness(1); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* pixel-art assets are stored tiny; scale them up with hard edges */
|
||||||
|
img[src*='-pixel'] {
|
||||||
|
image-rendering: pixelated;
|
||||||
|
}
|
||||||
@@ -11,6 +11,7 @@
|
|||||||
|
|
||||||
@import './tokens.css' layer(tokens);
|
@import './tokens.css' layer(tokens);
|
||||||
@import './themes/index.css' layer(tokens);
|
@import './themes/index.css' layer(tokens);
|
||||||
|
@import './fx.css' layer(components);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Page-specific styles go in the page's own <style> block (Astro scopes it).
|
* Page-specific styles go in the page's own <style> block (Astro scopes it).
|
||||||
@@ -82,16 +83,28 @@
|
|||||||
isolation: isolate;
|
isolation: isolate;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* paper grain */
|
/* film grain: a tiled noise PNG on its own GPU layer, jittered with transforms
|
||||||
|
only (no blend modes, so it never forces full-screen repaints) */
|
||||||
body::before {
|
body::before {
|
||||||
content: '';
|
content: '';
|
||||||
position: fixed;
|
position: fixed;
|
||||||
inset: 0;
|
inset: -64px;
|
||||||
z-index: 9998;
|
z-index: 9998;
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
opacity: var(--grain);
|
opacity: calc(var(--grain) * 1.6);
|
||||||
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='200'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.45 0 0 0 0 0.4 0 0 0 1.2 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
|
background: url('/fx/grain.png') 0 0 / 128px 128px;
|
||||||
mix-blend-mode: multiply;
|
will-change: transform;
|
||||||
|
animation: grain-jitter 0.6s steps(1) infinite;
|
||||||
|
}
|
||||||
|
@keyframes grain-jitter {
|
||||||
|
0% { transform: translate(0, 0); }
|
||||||
|
20% { transform: translate(-37px, 21px); }
|
||||||
|
40% { transform: translate(18px, -44px); }
|
||||||
|
60% { transform: translate(-12px, 33px); }
|
||||||
|
80% { transform: translate(41px, 9px); }
|
||||||
|
}
|
||||||
|
html.menu-open body::before {
|
||||||
|
animation-play-state: paused;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* CRT scanlines (themes opt in with --scanlines: 1) */
|
/* CRT scanlines (themes opt in with --scanlines: 1) */
|
||||||
|
|||||||
@@ -0,0 +1,210 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""
|
||||||
|
Bake print / retro effects into photos so the site gets a grungy, hand-made
|
||||||
|
look without running heavy filters on visitors' phones.
|
||||||
|
|
||||||
|
python3 tools/fx.py # regenerate everything in RECIPES
|
||||||
|
python3 tools/fx.py motorcycle # only recipes whose source matches
|
||||||
|
|
||||||
|
Sources: src/assets/photos/<name>.jpg|png Output: src/assets/fx/<name>-<effect>.webp
|
||||||
|
Needs: pip install pillow numpy
|
||||||
|
"""
|
||||||
|
import sys
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
import numpy as np
|
||||||
|
from PIL import Image, ImageChops, ImageEnhance, ImageFilter, ImageOps
|
||||||
|
|
||||||
|
ROOT = Path(__file__).resolve().parent.parent
|
||||||
|
SRC = ROOT / 'src/assets/photos'
|
||||||
|
OUT = ROOT / 'src/assets/fx'
|
||||||
|
RNG = np.random.default_rng(7)
|
||||||
|
|
||||||
|
# 24-colour palette for pixel art: site palette + CTA line colours + naturals.
|
||||||
|
PALETTE = np.array([
|
||||||
|
(20, 20, 18), (58, 52, 44), (108, 75, 52), (163, 150, 122), (210, 205, 190), (243, 236, 217), (255, 255, 255),
|
||||||
|
(198, 12, 48), (249, 70, 28), (255, 150, 60), (249, 227, 0), (200, 224, 52),
|
||||||
|
(140, 198, 63), (76, 154, 42), (0, 155, 58), (15, 93, 61), (30, 60, 40),
|
||||||
|
(120, 190, 230), (0, 161, 222), (29, 63, 216), (20, 30, 80), (82, 35, 152), (226, 126, 166), (130, 40, 60),
|
||||||
|
], dtype=np.float32)
|
||||||
|
|
||||||
|
BAYER4 = (np.array([[0, 8, 2, 10], [12, 4, 14, 6], [3, 11, 1, 9], [15, 7, 13, 5]], dtype=np.float32) + 0.5) / 16 - 0.5
|
||||||
|
|
||||||
|
|
||||||
|
def load(name: str) -> Image.Image:
|
||||||
|
for ext in ('.jpg', '.png'):
|
||||||
|
p = SRC / f'{name}{ext}'
|
||||||
|
if p.exists():
|
||||||
|
return Image.open(p).convert('RGB')
|
||||||
|
raise FileNotFoundError(name)
|
||||||
|
|
||||||
|
|
||||||
|
def fit(img: Image.Image, width: int) -> Image.Image:
|
||||||
|
if img.width <= width:
|
||||||
|
return img
|
||||||
|
return img.resize((width, round(img.height * width / img.width)), Image.LANCZOS)
|
||||||
|
|
||||||
|
|
||||||
|
# ---------- grunge layers ----------
|
||||||
|
def grain(img: Image.Image, amount=18) -> Image.Image:
|
||||||
|
a = np.asarray(img, dtype=np.float32)
|
||||||
|
n = RNG.normal(0, amount, a.shape[:2])[..., None]
|
||||||
|
return Image.fromarray(np.clip(a + n, 0, 255).astype(np.uint8))
|
||||||
|
|
||||||
|
|
||||||
|
def dust(img: Image.Image, specks=900, scratches=14) -> Image.Image:
|
||||||
|
a = np.asarray(img, dtype=np.float32).copy()
|
||||||
|
h, w = a.shape[:2]
|
||||||
|
ys, xs = RNG.integers(0, h, specks), RNG.integers(0, w, specks)
|
||||||
|
vals = RNG.choice([235.0, 18.0], specks, p=[0.6, 0.4])
|
||||||
|
for y, x, v in zip(ys, xs, vals):
|
||||||
|
r = int(RNG.integers(0, 2))
|
||||||
|
a[max(0, y - r):y + r + 1, max(0, x - r):x + r + 1] = v
|
||||||
|
for _ in range(scratches):
|
||||||
|
x = int(RNG.integers(0, w))
|
||||||
|
y0 = int(RNG.integers(0, h // 2))
|
||||||
|
length = int(RNG.integers(h // 6, h))
|
||||||
|
drift = RNG.normal(0, 0.15)
|
||||||
|
for i in range(length):
|
||||||
|
yy, xx = y0 + i, int(x + drift * i)
|
||||||
|
if 0 <= yy < h and 0 <= xx < w:
|
||||||
|
a[yy, xx] = a[yy, xx] * 0.4 + 235 * 0.6
|
||||||
|
return Image.fromarray(np.clip(a, 0, 255).astype(np.uint8))
|
||||||
|
|
||||||
|
|
||||||
|
def vignette(img: Image.Image, strength=0.55) -> Image.Image:
|
||||||
|
w, h = img.size
|
||||||
|
y, x = np.ogrid[-1:1:h * 1j, -1:1:w * 1j]
|
||||||
|
mask = 1 - strength * np.clip(np.sqrt(x * x + y * y) - 0.35, 0, 1) ** 1.4
|
||||||
|
a = np.asarray(img, dtype=np.float32) * mask[..., None]
|
||||||
|
return Image.fromarray(np.clip(a, 0, 255).astype(np.uint8))
|
||||||
|
|
||||||
|
|
||||||
|
def paper(img: Image.Image, tint=(243, 236, 217), mix=0.12) -> Image.Image:
|
||||||
|
tex = Image.open(SRC / 'paper-crumpled.jpg').convert('L').resize(img.size)
|
||||||
|
tex = ImageOps.autocontrast(tex).convert('RGB')
|
||||||
|
out = ImageChops.multiply(img, tex)
|
||||||
|
return Image.blend(out, Image.new('RGB', img.size, tint), mix)
|
||||||
|
|
||||||
|
|
||||||
|
# ---------- looks ----------
|
||||||
|
def toon(img, levels=6, ink=2):
|
||||||
|
"""Cel shading: flatten colours, then trace dark ink outlines."""
|
||||||
|
base = img.filter(ImageFilter.MedianFilter(5)).filter(ImageFilter.MedianFilter(5))
|
||||||
|
base = ImageEnhance.Color(base).enhance(1.45)
|
||||||
|
flat = base.quantize(colors=levels * 3, method=Image.Quantize.MEDIANCUT, dither=Image.Dither.NONE).convert('RGB')
|
||||||
|
g = img.convert('L').filter(ImageFilter.GaussianBlur(1.4))
|
||||||
|
edges = g.filter(ImageFilter.FIND_EDGES)
|
||||||
|
edges = edges.point(lambda v: 255 if v > 18 else 0)
|
||||||
|
if ink > 1:
|
||||||
|
edges = edges.filter(ImageFilter.MaxFilter(ink * 2 - 1))
|
||||||
|
inkc = Image.new('RGB', img.size, (20, 18, 22))
|
||||||
|
out = Image.composite(inkc, flat, edges)
|
||||||
|
return grain(out, 10)
|
||||||
|
|
||||||
|
|
||||||
|
def pixel(img, width=128, scale=1, spread=36):
|
||||||
|
"""Pixel art: shrink and ordered-dither to the palette. Saved at true size;
|
||||||
|
the site scales it up with image-rendering: pixelated (any img named *-pixel)."""
|
||||||
|
small = img.resize((width, round(img.height * width / img.width)), Image.BOX)
|
||||||
|
small = ImageEnhance.Color(small).enhance(1.3)
|
||||||
|
a = np.asarray(small, dtype=np.float32)
|
||||||
|
h, w = a.shape[:2]
|
||||||
|
t = np.tile(BAYER4, (h // 4 + 1, w // 4 + 1))[:h, :w][..., None]
|
||||||
|
a = a + t * spread
|
||||||
|
d = ((a[:, :, None, :] - PALETTE[None, None]) ** 2).sum(-1)
|
||||||
|
q = PALETTE[d.argmin(-1)].astype(np.uint8)
|
||||||
|
out = Image.fromarray(q).resize((w * scale, h * scale), Image.NEAREST)
|
||||||
|
return out
|
||||||
|
|
||||||
|
|
||||||
|
def xerox(img):
|
||||||
|
"""Photocopy: crushed contrast, toner speckle, paper texture."""
|
||||||
|
g = ImageOps.autocontrast(img.convert('L'), cutoff=4)
|
||||||
|
g = ImageEnhance.Contrast(g).enhance(2.2)
|
||||||
|
a = np.asarray(g, dtype=np.float32)
|
||||||
|
a = a + RNG.normal(0, 28, a.shape)
|
||||||
|
a = np.where(a > 128, 238, 22).astype(np.uint8)
|
||||||
|
out = Image.fromarray(a).filter(ImageFilter.MedianFilter(3)).convert('RGB')
|
||||||
|
out = dust(out, specks=1600, scratches=6)
|
||||||
|
return paper(out, mix=0.08)
|
||||||
|
|
||||||
|
|
||||||
|
def riso(img, ink_a=(226, 60, 120), ink_b=(29, 63, 216), offset=(7, 4)):
|
||||||
|
"""Two-colour risograph with misregistration and grain."""
|
||||||
|
g = ImageOps.autocontrast(img.convert('L'), cutoff=2)
|
||||||
|
inv = ImageOps.invert(g)
|
||||||
|
a = np.asarray(inv, dtype=np.float32) / 255
|
||||||
|
paper_c = np.array((246, 239, 222), dtype=np.float32)
|
||||||
|
|
||||||
|
def layer(dens, ink):
|
||||||
|
ink = np.array(ink, dtype=np.float32)
|
||||||
|
return paper_c * (1 - dens[..., None]) + ink * dens[..., None]
|
||||||
|
|
||||||
|
dens_a = np.clip(a * 1.15 - 0.05, 0, 1)
|
||||||
|
dens_b = np.clip((a - 0.45) * 1.8, 0, 1)
|
||||||
|
la = layer(dens_a, ink_a)
|
||||||
|
lb = layer(np.roll(np.roll(dens_b, offset[1], 0), offset[0], 1), ink_b)
|
||||||
|
out = (la / 255) * (lb / 255) * 255
|
||||||
|
out = Image.fromarray(np.clip(out, 0, 255).astype(np.uint8))
|
||||||
|
return dust(grain(out, 14), specks=500, scratches=0)
|
||||||
|
|
||||||
|
|
||||||
|
def vintage(img):
|
||||||
|
"""Faded 90s print: lifted blacks, warm cast, light leak, vignette, dust."""
|
||||||
|
a = np.asarray(ImageEnhance.Color(img).enhance(0.8), dtype=np.float32)
|
||||||
|
a = a * 0.82 + 30
|
||||||
|
a[..., 0] *= 1.06
|
||||||
|
a[..., 2] *= 0.88
|
||||||
|
h, w = a.shape[:2]
|
||||||
|
y, x = np.ogrid[0:h, 0:w]
|
||||||
|
leak = np.exp(-(((x - w * 0.95) / (w * 0.35)) ** 2 + ((y - h * 0.1) / (h * 0.5)) ** 2))
|
||||||
|
a = a + leak[..., None] * np.array([110, 45, 0])
|
||||||
|
out = Image.fromarray(np.clip(a, 0, 255).astype(np.uint8))
|
||||||
|
return dust(vignette(grain(out, 16), 0.6), specks=700, scratches=10)
|
||||||
|
|
||||||
|
|
||||||
|
LOOKS = {'toon': toon, 'pixel': pixel, 'xerox': xerox, 'riso': riso, 'vintage': vintage}
|
||||||
|
|
||||||
|
# (source, look, width, kwargs)
|
||||||
|
RECIPES = [
|
||||||
|
('motorcycle', 'toon', 1200, {}),
|
||||||
|
('motorcycle', 'pixel', 1200, {'width': 150}),
|
||||||
|
('cassette', 'vintage', 900, {}),
|
||||||
|
('guitar-strat', 'riso', 900, {}),
|
||||||
|
('guitar-hollow', 'toon', 900, {}),
|
||||||
|
('computers-pile', 'pixel', 900, {'width': 120}),
|
||||||
|
('computers-room', 'xerox', 900, {}),
|
||||||
|
('tv', 'vintage', 800, {}),
|
||||||
|
('synth', 'vintage', 900, {}),
|
||||||
|
('daisies', 'toon', 1200, {'levels': 7}),
|
||||||
|
('daisies', 'pixel', 1200, {'width': 160}),
|
||||||
|
('grass-top', 'pixel', 700, {'width': 96}),
|
||||||
|
('server-rack', 'toon', 800, {}),
|
||||||
|
('botanical', 'riso', 700, {'ink_a': (240, 90, 40), 'ink_b': (0, 155, 58)}),
|
||||||
|
('lily', 'pixel', 800, {'width': 110}),
|
||||||
|
('hibiscus', 'toon', 1000, {}),
|
||||||
|
('cta-sign', 'vintage', 1400, {}),
|
||||||
|
('pedalboard', 'riso', 1000, {'ink_a': (226, 126, 166), 'ink_b': (20, 20, 18)}),
|
||||||
|
('cloud', 'xerox', 700, {}),
|
||||||
|
]
|
||||||
|
|
||||||
|
|
||||||
|
def main():
|
||||||
|
OUT.mkdir(parents=True, exist_ok=True)
|
||||||
|
only = sys.argv[1:]
|
||||||
|
for src, look, width, kw in RECIPES:
|
||||||
|
if only and src not in only:
|
||||||
|
continue
|
||||||
|
img = fit(load(src), width)
|
||||||
|
out = LOOKS[look](img, **kw)
|
||||||
|
path = OUT / f'{src}-{look}.webp'
|
||||||
|
if look == 'pixel':
|
||||||
|
out.save(path, 'WEBP', lossless=True)
|
||||||
|
else:
|
||||||
|
out.save(path, 'WEBP', quality=84, method=6)
|
||||||
|
print(f'{path.relative_to(ROOT)} {out.size[0]}x{out.size[1]} {path.stat().st_size // 1024} KB')
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
||||||