Initial portfolio site
Mirror to Gitea / mirror (push) Skipped

Astro + React islands + MDX with a theme system (terminal, concrete,
nostromo, overgrowth), USMT Dash case study, work/log/sound/models/about/
contact pages, RSS, self-hosted contact form over SMTP, /media proxy to
Nextcloud, Dockerfile for Coolify, and a GitHub Action that mirrors main
to Gitea.
This commit is contained in:
Johan Sandoval committed 2026-10-08 14:41:39 +00:00
commit b2cd67e74f
64 files changed
+9066

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
node_modules
dist
.astro
.git
.github
.env
.env.*
!.env.example
+15
View File
@@ -0,0 +1,15 @@
# ---- Runtime (set these in Coolify → Environment Variables) ----
# Where /media/* is proxied from. Point it at a public Nextcloud share's WebDAV root:
# https://cloud.example.com/public.php/dav/files/<SHARE_TOKEN>
# (Nextcloud: share a folder → "Share link" → the token is the last part of the link.)
MEDIA_ORIGIN=
# Contact form → SMTP
SMTP_HOST=
SMTP_PORT=587
SMTP_SECURE=false
SMTP_USER=
SMTP_PASS=
CONTACT_TO=contact@mail.yoyos.sh
CONTACT_FROM="yoyos.sh <noreply@mail.yoyos.sh>"
+43
View File
@@ -0,0 +1,43 @@
name: Mirror to Gitea
# Pushes every commit on main to the Gitea repo as-is (same hashes, authors and
# dates), which in turn triggers the Coolify deploy.
#
# Repo secrets:
# GITEA_URL - https://gitea.yoyos.sh/yoyos/yoyos.sh.git
# GITEA_TOKEN - Gitea access token with write:repository
on:
push:
branches: [main]
workflow_dispatch:
concurrency:
group: mirror-gitea
cancel-in-progress: false
jobs:
mirror:
# This file is mirrored too; never run it on Gitea's own runner.
if: github.server_url == 'https://github.com'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Push main to Gitea
env:
GITEA_URL: ${{ secrets.GITEA_URL }}
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
run: |
set -euo pipefail
if [ -z "${GITEA_URL}" ] || [ -z "${GITEA_TOKEN}" ]; then
echo "::error::GITEA_URL and GITEA_TOKEN secrets must be set"
exit 1
fi
url="${GITEA_URL%/}"
scheme="${url%%://*}"
rest="${url#*://}"
case "$url" in *://*) ;; *) scheme=https; rest="$url" ;; esac
git push --force "${scheme}://${GITEA_TOKEN}:x-oauth-basic@${rest}" HEAD:refs/heads/main
+20
View File
@@ -0,0 +1,20 @@
# build output
dist/
.astro/
# dependencies
node_modules/
# logs
npm-debug.log*
# environment
.env
.env.*
!.env.example
# os / editor
.DS_Store
.vscode/*
!.vscode/extensions.json
.idea/
+27
View File
@@ -0,0 +1,27 @@
# syntax=docker/dockerfile:1
# ---- deps ----
FROM node:22-slim AS deps
WORKDIR /app
COPY package.json package-lock.json ./
RUN npm ci
# ---- build ----
FROM deps AS build
COPY . .
RUN npm run build && npm prune --omit=dev
# ---- runtime ----
FROM node:22-slim AS runtime
WORKDIR /app
ENV NODE_ENV=production \
HOST=0.0.0.0 \
PORT=4321
COPY --from=build --chown=node:node /app/node_modules ./node_modules
COPY --from=build --chown=node:node /app/dist ./dist
COPY --from=build --chown=node:node /app/package.json ./package.json
USER node
EXPOSE 4321
HEALTHCHECK --interval=30s --timeout=5s --start-period=10s --retries=3 \
CMD node -e "fetch('http://127.0.0.1:'+process.env.PORT+'/healthz').then(r=>process.exit(r.ok?0:1)).catch(()=>process.exit(1))"
CMD ["node", "./dist/server/entry.mjs"]
+58
View File
@@ -0,0 +1,58 @@
# yoyos.sh
Portfolio, project archive and weekly log of Johan Sandoval.
**Stack:** Astro (static pages + a small Node server) · React islands · MDX · plain CSS ·
Docker on Coolify. Large media lives on the NAS (Nextcloud) and is proxied through `/media`.
```bash
npm install
npm run dev # http://localhost:4321
npm run build && npm start
```
## Deploy pipeline
```
push to GitHub main ──(.github/workflows/mirror.yml)──▶ Gitea yoyos/yoyos.sh ──▶ Coolify (Dockerfile) ──▶ yoyos.sh
```
- GitHub repo secrets: `GITEA_URL` (`https://gitea.yoyos.sh/yoyos/yoyos.sh.git`), `GITEA_TOKEN`.
- Coolify: Dockerfile build pack, port **4321**, health check `/healthz`.
- Coolify environment variables: see `.env.example` (`MEDIA_ORIGIN`, `SMTP_*`, `CONTACT_*`).
## Adding content
| What | Where |
|---|---|
| Project | `src/content/work/<slug>.md(x)` or `src/content/work/<slug>/index.mdx` with images next to it |
| Log post | `src/content/log/<nnn-slug>.md(x)` (`draft: true` hides it in production) |
| Recording | `src/content/sound/<slug>.yaml` + audio file in the media share under `sound/` |
| 3D model | `src/content/models/<slug>.yaml` + `.glb` in the media share under `models/` |
| Game | add a `game:` block to a project + web export in the media share under `games/<slug>/` → playable at `/play/<slug>` |
| Personal info, links, availability | `src/lib/site.ts` |
Every field is typed in `src/content.config.ts`, so the build fails loudly when something's missing.
## Styling
- `src/styles/tokens.css`: raw palette (ink, cream, emerald, rust, peat), type scale, spacing.
- `src/styles/themes/*.css`: each theme maps the palette onto semantic tokens (`--bg`, `--fg`,
`--accent`, `--signal`, `--line`, fonts, grain, scanlines). Current themes: `terminal` (default),
`concrete`, `nostromo`, `overgrowth`.
- Use a theme on a whole page: `<Base theme="concrete">`, or `theme: concrete` in a project or post's frontmatter.
- Use a theme on one section: `<section data-theme="nostromo">`.
- New theme: copy a theme file, rename the selector, import it in `themes/index.css`, and add the name to `src/lib/themes.ts`.
- One-off page styling: the page's own `<style>` block (scoped automatically), or `@layer page { }` for global overrides.
## Media share (Nextcloud)
1. In Nextcloud, make a folder (e.g. `yoyos.sh-media`) with `sound/`, `models/`, `games/`, `resume/`.
2. Share it with a **public link** (read-only). The token is the last part of the link.
3. Set `MEDIA_ORIGIN=https://<nextcloud-host>/public.php/dav/files/<token>` in Coolify.
4. Files are then served from `https://yoyos.sh/media/<path>`, e.g. `/media/resume/Johan_Sandoval_Resume.pdf`.
The proxy passes range requests (audio/video seeking), sets correct types for `.wasm`/`.glb`/`.pck`,
adds `Content-Encoding` for Unity's pre-compressed `.br`/`.gz` files, and sends COOP/COEP headers
under `games/`. For Godot 4.3+, exporting with **thread support off** avoids cross-origin
isolation entirely. Threaded builds work via the "Open in new tab" button on the play page.
+25
View File
@@ -0,0 +1,25 @@
// @ts-check
import { defineConfig } from 'astro/config';
import mdx from '@astrojs/mdx';
import react from '@astrojs/react';
import sitemap from '@astrojs/sitemap';
import node from '@astrojs/node';
// Pages are prerendered to static HTML by default. Anything that needs the
// server (contact form, media proxy) opts out with `export const prerender = false`.
export default defineConfig({
site: 'https://yoyos.sh',
output: 'static',
adapter: node({ mode: 'standalone' }),
integrations: [mdx(), react(), sitemap()],
prefetch: { prefetchAll: true, defaultStrategy: 'hover' },
security: {
checkOrigin: true,
// Coolify's proxy terminates TLS; trust its X-Forwarded-* headers for these hosts
// so origin checks on the contact form see https://yoyos.sh.
allowedDomains: [
{ hostname: 'yoyos.sh', protocol: 'https' },
{ hostname: 'www.yoyos.sh', protocol: 'https' },
],
},
});
+5846
View File
File diff suppressed because it is too large. Load diff
+40
View File
@@ -0,0 +1,40 @@
{
"name": "yoyos.sh",
"type": "module",
"version": "0.1.0",
"private": true,
"engines": {
"node": ">=22.12.0"
},
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview",
"start": "node ./dist/server/entry.mjs",
"check": "astro check"
},
"dependencies": {
"@astrojs/mdx": "^8.0.3",
"@astrojs/node": "^11.1.7",
"@astrojs/react": "^7.0.1",
"@astrojs/rss": "^4.0.19",
"@astrojs/sitemap": "^3.7.4",
"@fontsource-variable/big-shoulders": "^5.3.0",
"@fontsource-variable/ibm-plex-sans": "^5.3.0",
"@fontsource/ibm-plex-mono": "^5.3.0",
"@google/model-viewer": "^4.3.1",
"astro": "^7.3.7",
"nodemailer": "^10.0.16",
"react": "^19.3.0",
"react-dom": "^19.3.0",
"sharp": "^0.35.5",
"wavesurfer.js": "^8.0.2"
},
"devDependencies": {
"@astrojs/check": "^0.9.10",
"@types/nodemailer": "^8.0.2",
"@types/react": "^19.3.0",
"@types/react-dom": "^19.3.0",
"typescript": "^6.0.3"
}
}
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32"><rect width="32" height="32" fill="#1c9a63"/><path d="M6 7h5l4 8 4-8h5l-7 12v6h-4v-6z" fill="#0a0c09"/><rect x="22" y="22" width="4" height="4" fill="#de6119"/></svg>

After

Width:  |  Height:  |  Size: 227 B

+5
View File
@@ -0,0 +1,5 @@
User-agent: *
Allow: /
Disallow: /api/
Sitemap: https://yoyos.sh/sitemap-index.xml
+74
View File
@@ -0,0 +1,74 @@
import { useEffect, useRef, useState } from 'react';
import WaveSurfer from 'wavesurfer.js';
interface Props {
src: string;
title: string;
}
const fmt = (s: number) => `${Math.floor(s / 60)}:${String(Math.floor(s % 60)).padStart(2, '0')}`;
/** Waveform player. Colors come from the active theme's CSS variables. */
export default function AudioPlayer({ src, title }: Props) {
const host = useRef<HTMLDivElement>(null);
const ws = useRef<WaveSurfer | null>(null);
const [state, setState] = useState<'idle' | 'loading' | 'ready' | 'error'>('idle');
const [playing, setPlaying] = useState(false);
const [time, setTime] = useState(0);
const [duration, setDuration] = useState(0);
useEffect(() => () => ws.current?.destroy(), []);
const load = () => {
if (!host.current || ws.current) return;
const css = getComputedStyle(host.current);
const v = (name: string) => css.getPropertyValue(name).trim();
setState('loading');
const w = WaveSurfer.create({
container: host.current,
url: src,
height: 64,
barWidth: 2,
barGap: 2,
cursorWidth: 1,
waveColor: v('--line-strong'),
progressColor: v('--accent'),
cursorColor: v('--signal'),
normalize: true,
});
w.on('ready', (d) => {
setDuration(d);
setState('ready');
w.play();
});
w.on('error', () => setState('error'));
w.on('timeupdate', setTime);
w.on('play', () => setPlaying(true));
w.on('pause', () => setPlaying(false));
w.on('finish', () => setPlaying(false));
ws.current = w;
};
const toggle = () => (ws.current ? ws.current.playPause() : load());
return (
<div className="player">
<button
type="button"
className="btn btn--primary play"
onClick={toggle}
disabled={state === 'loading' || state === 'error'}
aria-label={`${playing ? 'Pause' : 'Play'} ${title}`}
>
{state === 'loading' ? '…' : playing ? '❚❚' : '▶'}
</button>
<div className="wave" ref={host}>
{state === 'idle' && <span className="label">[ press play to load waveform ]</span>}
{state === 'error' && <span className="label signal">[ signal lost: file not found ]</span>}
</div>
<span className="label time">
{fmt(time)} / {duration ? fmt(duration) : '--:--'}
</span>
</div>
);
}
+37
View File
@@ -0,0 +1,37 @@
---
import { Image } from 'astro:assets';
import type { ImageMetadata } from 'astro';
interface Props {
src: ImageMetadata;
alt: string;
caption?: string;
}
const { src, alt, caption } = Astro.props;
---
<figure>
<a href={src.src} target="_blank" rel="noopener">
<Image src={src} alt={alt} widths={[640, 1024, 1600]} sizes="(min-width: 70rem) 68ch, 100vw" />
</a>
{caption && <figcaption class="label">{caption}</figcaption>}
</figure>
<style>
figure {
display: grid;
gap: var(--space-2);
}
a {
display: block;
border: var(--border-w) solid var(--line);
transition: border-color 0.15s var(--ease);
}
a:hover {
border-color: var(--accent);
}
figcaption {
text-transform: none;
letter-spacing: 0.02em;
}
</style>
+68
View File
@@ -0,0 +1,68 @@
---
import { SITE } from '../lib/site';
const year = new Date().getFullYear();
const links = Object.entries(SITE.links).filter(([, href]) => !href.includes('PLACEHOLDER'));
---
<footer>
<div class="wrap grid">
<div class="stack">
<p class="big">Have something to build?</p>
<p><a class="btn btn--primary" href="/contact">Open a channel →</a></p>
</div>
<dl class="readout">
<dt>Mail</dt>
<dd><a href={`mailto:${SITE.email}`}>{SITE.email}</a></dd>
{
links.map(([name, href]) => (
<>
<dt>{name}</dt>
<dd>
<a href={href} rel="me noopener">
{href.replace(/^https?:\/\//, '')}
</a>
</dd>
</>
))
}
<dt>Feed</dt>
<dd><a href="/rss.xml">/rss.xml</a></dd>
</dl>
</div>
<div class="wrap base label">
<span>© {year} {SITE.name}</span>
<span>{SITE.coords}</span>
<span>Self-hosted · built with Astro</span>
</div>
</footer>
<style>
footer {
margin-top: var(--space-9);
border-top: var(--border-w) solid var(--line-strong);
background: var(--bg-sunken);
padding-block: var(--space-7) var(--space-5);
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
gap: var(--space-7);
align-items: end;
}
.big {
font-family: var(--font-display);
font-weight: 800;
font-size: var(--step-3);
line-height: 0.95;
text-transform: uppercase;
}
.base {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: var(--space-3);
margin-top: var(--space-7);
padding-top: var(--space-4);
border-top: 1px solid var(--line);
}
</style>
+18
View File
@@ -0,0 +1,18 @@
---
interface Props {
min?: string;
}
const { min = '18rem' } = Astro.props;
---
<div class="gallery" style={`--min: ${min}`}>
<slot />
</div>
<style>
.gallery {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, var(--min)), 1fr));
gap: var(--space-5);
}
</style>
+80
View File
@@ -0,0 +1,80 @@
---
/**
* Drop-in 3D viewer for .glb/.gltf files using <model-viewer> (three.js under
* the hood). For custom scenes, write a React Three Fiber island instead.
*/
interface Props {
src: string;
alt: string;
poster?: string;
ratio?: string;
}
const { src, alt, poster, ratio = '16 / 10' } = Astro.props;
---
<div class="viewer" style={`--ratio: ${ratio}`}>
<model-viewer
src={src}
alt={alt}
poster={poster}
camera-controls
auto-rotate
auto-rotate-delay="2000"
rotation-per-second="12deg"
shadow-intensity="0.8"
exposure="1.05"
interaction-prompt="none"
loading="lazy"
reveal="interaction"
>
<button slot="poster" class="placeholder start">[ load model ]</button>
<div slot="progress-bar" class="bar"></div>
</model-viewer>
<span class="label hud">Drag to orbit · scroll to zoom</span>
</div>
<script>
import '@google/model-viewer';
document.addEventListener('astro:page-load', () => {
document.querySelectorAll('model-viewer').forEach((mv) => {
const el = mv as HTMLElement & { dismissPoster?: () => void };
el.querySelector('.start')?.addEventListener('click', () => el.dismissPoster?.());
el.addEventListener('error', () => {
const btn = el.querySelector<HTMLElement>('.start');
if (btn) btn.textContent = '[ signal lost — model not found ]';
});
});
});
</script>
<style>
.viewer {
position: relative;
margin-bottom: var(--space-7);
border: var(--border-w) solid var(--line-strong);
background:
radial-gradient(circle at 50% 60%, color-mix(in oklab, var(--accent) 12%, transparent), transparent 60%),
var(--bg-sunken);
}
model-viewer {
width: 100%;
aspect-ratio: var(--ratio);
height: auto;
--poster-color: transparent;
}
.start {
width: 100%;
height: 100%;
border: 0;
cursor: pointer;
}
.start:hover {
color: var(--accent);
}
.hud {
position: absolute;
right: var(--space-3);
bottom: var(--space-2);
pointer-events: none;
}
</style>
+151
View File
@@ -0,0 +1,151 @@
---
import { NAV, SITE } from '../lib/site';
const path = Astro.url.pathname;
const isActive = (href: string) => path === href || path.startsWith(href + '/');
---
<header class="bar">
<div class="wrap row">
<a class="brand" href="/" aria-label={`${SITE.name}, home`}>
<span class="mark" aria-hidden="true">Y/</span>
<span class="name">yoyos<span class="accent">.sh</span></span>
</a>
<nav aria-label="Main">
<ul>
{
NAV.map((item) => (
<li>
<a href={item.href} aria-current={isActive(item.href) ? 'page' : undefined}>
<span class="code" aria-hidden="true">{item.code}</span>
{item.label}
</a>
</li>
))
}
</ul>
</nav>
<a class="status" href="/contact" title={SITE.availability.text}>
<span class:list={['dot', { off: !SITE.availability.open }]} aria-hidden="true"></span>
<span>{SITE.availability.open ? 'Available' : 'Busy'}</span>
</a>
</div>
</header>
<style>
.bar {
position: sticky;
top: 0;
z-index: 100;
border-bottom: var(--border-w) solid var(--line);
background: color-mix(in oklab, var(--bg) 88%, transparent);
backdrop-filter: blur(8px);
}
.row {
display: flex;
align-items: center;
gap: var(--space-5);
min-height: 3.5rem;
}
.brand {
display: flex;
align-items: center;
gap: 0.6rem;
color: var(--fg);
text-decoration: none;
font-family: var(--font-mono);
font-weight: 500;
}
.mark {
display: grid;
place-items: center;
width: 2rem;
height: 2rem;
background: var(--accent);
color: var(--accent-fg);
font-family: var(--font-display);
font-weight: 900;
font-size: 1.1rem;
}
nav {
min-width: 0;
margin-inline-start: auto;
overflow-x: auto;
scrollbar-width: none;
}
ul {
display: flex;
gap: var(--space-1);
list-style: none;
padding: 0;
}
nav a {
display: flex;
align-items: baseline;
gap: 0.35em;
padding: 0.4em 0.7em;
color: var(--fg-muted);
text-decoration: none;
font-family: var(--font-mono);
font-size: var(--step--1);
text-transform: uppercase;
letter-spacing: 0.08em;
white-space: nowrap;
}
nav a:hover,
nav a[aria-current='page'] {
color: var(--fg);
}
nav a[aria-current='page'] {
box-shadow: inset 0 -2px 0 var(--signal);
}
.code {
font-size: 0.7em;
color: var(--accent);
}
.status {
display: flex;
align-items: center;
gap: 0.5em;
font-family: var(--font-mono);
font-size: 0.72rem;
text-transform: uppercase;
letter-spacing: 0.12em;
color: var(--fg-muted);
text-decoration: none;
white-space: nowrap;
}
.dot {
width: 0.55rem;
height: 0.55rem;
background: var(--accent);
box-shadow: var(--glow);
animation: pulse 2.4s var(--ease) infinite;
}
.dot.off {
background: var(--signal);
animation: none;
}
@keyframes pulse {
50% {
opacity: 0.35;
}
}
@media (max-width: 52rem) {
.row {
flex-wrap: wrap;
gap: var(--space-2) var(--space-4);
padding-block: var(--space-2);
}
.status {
margin-inline-start: auto;
}
nav {
order: 3;
flex-basis: 100%;
margin-inline: calc(-1 * var(--space-2));
}
}
</style>
+133
View File
@@ -0,0 +1,133 @@
---
import { Image } from 'astro:assets';
import type { CollectionEntry } from 'astro:content';
interface Props {
project: CollectionEntry<'work'>;
index?: number;
large?: boolean;
}
const { project, index, large = false } = Astro.props;
const { title, summary, disciplines, cover, coverAlt, status, date, placeholder } = project.data;
const fileNo = String(index ?? 0).padStart(3, '0');
---
<article class:list={['card', { large }]} data-disciplines={disciplines.join(' ')}>
<a href={`/work/${project.id}`} class="link">
<div class="media">
{
cover ? (
<Image
src={cover}
alt={coverAlt ?? ''}
widths={[480, 800, 1200]}
sizes={large ? '(min-width: 60rem) 60vw, 100vw' : '(min-width: 60rem) 30vw, 100vw'}
transition:name={`cover-${project.id}`}
/>
) : (
<div class="placeholder">[ no signal ]</div>
)
}
<span class="file label">File {fileNo}</span>
</div>
<div class="body">
<div class="meta label">
<span class:list={['status', status]}>{status.replace('-', ' ')}</span>
<span>{date.getFullYear()}</span>
{placeholder && <span class="signal">placeholder</span>}
</div>
<h3 transition:name={`title-${project.id}`}>{title}</h3>
<p class="muted">{summary}</p>
<ul class="cluster tags">
{disciplines.map((d) => <li class="tag">{d}</li>)}
</ul>
</div>
</a>
</article>
<style>
.card {
border: var(--border-w) solid var(--line);
background: var(--bg-raised);
transition:
border-color 0.15s var(--ease),
box-shadow 0.15s var(--ease),
translate 0.15s var(--ease);
}
.card:hover {
border-color: var(--accent);
box-shadow: 6px 6px 0 var(--signal);
translate: -3px -3px;
}
.link {
display: grid;
height: 100%;
color: inherit;
text-decoration: none;
}
.large .link {
grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
}
.media {
position: relative;
border-bottom: var(--border-w) solid var(--line);
overflow: hidden;
background: var(--bg-sunken);
}
.large .media {
border-bottom: 0;
border-inline-end: var(--border-w) solid var(--line);
}
.media :global(img) {
width: 100%;
height: 100%;
aspect-ratio: 16 / 10;
object-fit: cover;
object-position: top left;
filter: saturate(0.85) contrast(1.05);
transition: filter 0.3s var(--ease);
}
.card:hover .media :global(img) {
filter: none;
}
.file {
position: absolute;
top: 0;
left: 0;
padding: 0.2em 0.6em;
background: var(--bg);
color: var(--fg);
}
.body {
display: grid;
align-content: start;
gap: var(--space-3);
padding: var(--space-5);
}
.large .body {
align-content: center;
padding: var(--space-6);
}
.large h3 {
font-size: var(--step-4);
}
.meta {
display: flex;
gap: var(--space-4);
}
.status::before {
content: '■ ';
}
.status.live,
.status.shipped {
color: var(--accent);
}
.status.in-progress {
color: var(--signal);
}
.tags {
--cluster-gap: var(--space-2);
list-style: none;
padding: 0;
}
</style>
+49
View File
@@ -0,0 +1,49 @@
---
interface Props {
code: string;
title: string;
href?: string;
linkLabel?: string;
}
const { code, title, href, linkLabel = 'View all' } = Astro.props;
---
<div class="head">
<span class="label label--accent">// {code}</span>
<h2>{title}</h2>
<span class="rule" aria-hidden="true"></span>
{href && <a class="label more" href={href}>{linkLabel} →</a>}
</div>
<style>
.head {
display: grid;
grid-template-columns: auto auto 1fr auto;
align-items: end;
gap: var(--space-4);
margin-bottom: var(--space-6);
}
.rule {
height: var(--border-w);
background: var(--line);
margin-bottom: 0.6em;
}
.more {
text-decoration: none;
margin-bottom: 0.3em;
}
.more:hover {
color: var(--signal);
}
@media (max-width: 40rem) {
.head {
grid-template-columns: 1fr auto;
}
.head .label:first-child {
grid-column: 1 / -1;
}
.rule {
display: none;
}
}
</style>
+90
View File
@@ -0,0 +1,90 @@
import { defineCollection } from 'astro:content';
import { glob } from 'astro/loaders';
import { z } from 'astro/zod';
import { THEMES } from './lib/themes';
const theme = z.enum(THEMES).optional();
export const DISCIPLINES = ['software', 'web', 'game', 'hardware', '3d', 'music'] as const;
/**
* Projects. One .md/.mdx file per project in src/content/work/.
* Folder-style entries (work/my-thing/index.mdx) can keep their images alongside.
*/
const work = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/work' }),
schema: ({ image }) =>
z.object({
title: z.string(),
summary: z.string(),
disciplines: z.array(z.enum(DISCIPLINES)).min(1),
stack: z.array(z.string()).default([]),
date: z.coerce.date(),
status: z.enum(['live', 'shipped', 'in-progress', 'archived']).default('shipped'),
role: z.string().optional(),
cover: image().optional(),
coverAlt: z.string().optional(),
links: z
.array(z.object({ label: z.string(), href: z.string() }))
.default([]),
// Playable build served from /media (see src/pages/play/[slug].astro)
game: z
.object({
engine: z.enum(['godot', 'unity', 'web']),
// folder inside the media share, e.g. "games/my-game"
path: z.string(),
entry: z.string().default('index.html'),
aspect: z.string().default('16 / 9'),
})
.optional(),
// .glb in the media share, shown with <model-viewer>
model: z.string().optional(),
featured: z.boolean().default(false),
placeholder: z.boolean().default(false),
theme,
}),
});
/** Weekly log / blog. */
const log = defineCollection({
loader: glob({ pattern: '**/*.{md,mdx}', base: './src/content/log' }),
schema: ({ image }) =>
z.object({
title: z.string(),
summary: z.string(),
date: z.coerce.date(),
tags: z.array(z.string()).default([]),
cover: image().optional(),
coverAlt: z.string().optional(),
draft: z.boolean().default(false),
theme,
}),
});
/** Recordings. Audio files live in the media share under sound/. */
const sound = defineCollection({
loader: glob({ pattern: '**/*.{md,yaml,yml,json}', base: './src/content/sound' }),
schema: z.object({
title: z.string(),
date: z.coerce.date(),
file: z.string(),
duration: z.string().optional(),
notes: z.string().optional(),
gear: z.array(z.string()).default([]),
}),
});
/** 3D models. .glb files live in the media share under models/. */
const models = defineCollection({
loader: glob({ pattern: '**/*.{md,yaml,yml,json}', base: './src/content/models' }),
schema: z.object({
title: z.string(),
date: z.coerce.date(),
file: z.string(),
poster: z.string().optional(),
tools: z.array(z.string()).default([]),
notes: z.string().optional(),
}),
});
export const collections = { work, log, sound, models };
+14
View File
@@ -0,0 +1,14 @@
---
title: 'Transmission 000: Boot Sequence'
summary: Why this site exists, what it's built with, and what's going in the log each week.
date: 2026-10-08
tags: [meta, site]
---
Placeholder for the first weekly log entry.
This site is built with Astro, React islands and plain CSS. It runs in a Docker container on
my own Coolify server, and the heavy media (game builds, recordings, 3D models) is served
from my NAS.
Each week I'll post what I worked on: code, builds, models and music.
@@ -0,0 +1,5 @@
title: Placeholder Model
date: 2026-10-01
file: models/placeholder.glb
tools: [Blender]
notes: Export from Blender as .glb (Draco compression on), upload under models/ in the media share.
+5
View File
@@ -0,0 +1,5 @@
title: Placeholder Take
date: 2026-10-01
file: sound/placeholder-take.mp3
notes: Upload an mp3/ogg/flac to the media share under sound/ and point `file` at it.
gear: [Guitar, Interface]
+12
View File
@@ -0,0 +1,12 @@
---
title: Chicago in 3D
summary: An architectural tour of the city. Chicago landmarks modeled in Blender and explored in the browser, with the history and trivia for each building.
disciplines: [3d, web]
stack: [React, Three.js, Blender]
date: 2026-06-01
status: in-progress
placeholder: true
theme: concrete
---
Placeholder. Write-up coming soon, with an interactive viewer for the city map.
+12
View File
@@ -0,0 +1,12 @@
---
title: Hardware Build
summary: Placeholder for a physical engineering project, with photos, schematics and a build log.
disciplines: [hardware]
stack: []
date: 2025-09-01
status: shipped
placeholder: true
theme: concrete
---
Placeholder.
+12
View File
@@ -0,0 +1,12 @@
---
title: Homelab Infrastructure
summary: Self-hosted file storage, budgeting, receipts and password management for family and friends, running on Docker, Podman and LXC on Proxmox.
disciplines: [software, hardware]
stack: [Proxmox, Docker, Podman, LXC, NixOS, Coolify, Gitea]
date: 2025-04-01
status: live
placeholder: true
theme: nostromo
---
Placeholder. A write-up of the rack, the network and the services is coming soon.
+16
View File
@@ -0,0 +1,16 @@
---
title: Untitled Game
summary: Placeholder for a Godot or Unity game. Once a web build is uploaded to the media share, it becomes playable right here.
disciplines: [game]
stack: [Godot]
date: 2026-01-01
status: in-progress
placeholder: true
theme: overgrowth
# Uncomment when a web export is uploaded to <media share>/games/untitled-game/
# game:
# engine: godot
# path: games/untitled-game
---
Placeholder.
Binary file not shown.

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 186 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

+90
View File
@@ -0,0 +1,90 @@
---
title: USMT Dash
summary: A real-time migration dashboard over SCCM that took a six-person refresh team from about 10 builds a day to 25. PowerShell from end to end, with a live public demo.
disciplines: [software, web]
stack: [PowerShell, HttpListener, SQL (ConfigMgr), Active Directory, HTML/JS, Docker, Coolify]
date: 2026-08-01
status: live
role: Sole developer · Technical lead
cover: ./overview.png
coverAlt: USMT Dash overview page showing issue counters, progress, a building and floor map and a deployment calendar.
featured: true
links:
- { label: Live demo, href: 'https://usmt.yoyos.sh' }
- { label: Source, href: 'https://gitea.yoyos.sh/yoyos/usmt-dash' }
---
import Figure from '../../../components/Figure.astro';
import Gallery from '../../../components/Gallery.astro';
import overview from './overview.png';
import status from './usmt-status.png';
import terminals from './terminals.png';
import software from './missing-software.png';
import custom from './custom-view.png';
import details from './device-details.png';
import docs from './documentation.png';
import architecture from './architecture.png';
## The problem
On a large hardware refresh, every old PC gets backed up with USMT, paired with its new
machine in ConfigMgr (SCCM), and restored. Checking a single device in the ConfigMgr console
took about **a minute**: is the association there, did the backup start, is the box even on
the network? On a 1,300-device refresh with a six-person team, those minutes added up to the
bottleneck.
## What I built
USMT Dash is one shared live view of the whole refresh. Every device answers in **under a
second**, and the overview page is built to drive the refresh's open issues to zero.
<Figure src={overview} alt="Overview page" caption="Overview: issue counters, progress, a building × floor map, and a calendar of deployment-date tags." />
It's **PowerShell from end to end**, with no web framework, database server or runtime
beyond PowerShell. That was deliberate: it had to run on locked-down hospital
infrastructure where installing a stack wasn't an option.
- **Server:** a `System.Net.HttpListener` web server with a 17-route JSON API, IP allowlist and gzip.
- **Worker:** a polling loop that queries SCCM's SQL database, Active Directory, DNS/ICMP and admin shares, works out each device's state, and writes JSON.
- **Front end:** a single-file HTML/JS dashboard of about 4,600 lines, with routing, Excel-style filters, a knowledge base and a mobile card layout.
<Figure src={architecture} alt="Architecture diagram" caption="The server and worker never talk directly. The Data folder is the entire interface between them." />
## Details that mattered
- **A smart status engine.** It combines ConfigMgr's `MigrationStatus` with whether the
USMT progress log is actively being written, so "in progress" means in progress.
- **Network checks that tell the truth.** It resolves *all* A records, pings each one and
validates reverse DNS, which separates *Online*, *Timed Out*, *Not Found* and *DNS Issue*
(a stale record pointing at a different machine).
- **Missing software.** It diffs installed software between the source and destination
machines, filters out the baseline image and groups suites, so a technician sees only the
specialty apps still left to install.
- **Live while it works.** Rows publish every few seconds during a sweep, newly tracked
devices go first, and the worker sleeps overnight with a midnight pitstop for the software
refresh.
<Gallery>
<Figure src={status} alt="USMT Status page" caption="Every migration grouped by state." />
<Figure src={software} alt="Missing software view" caption="Specialty apps still missing on the new machine." />
<Figure src={details} alt="Device details dialog" caption="Both sides of a migration, with a reason for every blank." />
<Figure src={custom} alt="Custom view builder" caption="Build-your-own table from any field." />
<Figure src={docs} alt="Knowledge base" caption="Built-in Markdown knowledge base." />
<Figure src={terminals} alt="Terminal panel" caption="The demo streams the real server and worker consoles." />
</Gallery>
## The public demo
The [hosted demo](https://usmt.yoyos.sh) runs the **unmodified** server and worker in a
container against a simulated 200-device fleet. A demo provider replaces the SCCM provider,
and that is the only difference. A simulated team tags, reschedules and fixes devices
through the day. Visitor changes stay in their own browser (IndexedDB) and the API is
read-only, so there is nothing to moderate or inject. It deploys from Gitea to Coolify like
everything else I host.
## Outcome
Shipped halfway through the Lurie Children's FY26 refresh. Daily builds went from roughly
**10 to 25**, and the project closed **about 1,900 machines against a 1,300-device scope**,
under budget.
Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 143 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 KiB

+12
View File
@@ -0,0 +1,12 @@
---
title: Trainer Booking Site
summary: A trainer booking site for XSport Fitness Gold Coast. It pulls open session times out of an HTML-only internal scheduler into browsable trainer profiles. Bookings rose 50% in the first month.
disciplines: [web]
stack: [React, Tailwind, Node.js]
date: 2023-05-01
status: archived
role: Contract web developer
placeholder: true
---
Placeholder. The case study is coming soon.
+97
View File
@@ -0,0 +1,97 @@
---
import { ClientRouter } from 'astro:transitions';
import Nav from '../components/Nav.astro';
import Footer from '../components/Footer.astro';
import { SITE } from '../lib/site';
import type { Theme } from '../lib/themes';
import '../styles/global.css';
interface Props {
title?: string;
description?: string;
/** Any theme from src/styles/themes. Defaults to "terminal". */
theme?: Theme;
/** Extra class on <body> for page-level styling hooks. */
bodyClass?: string;
image?: string;
type?: 'website' | 'article';
}
const {
title,
description = SITE.description,
theme = 'terminal',
bodyClass,
image,
type = 'website',
} = Astro.props;
const fullTitle = title ? `${title} · ${SITE.name}` : SITE.title;
const canonical = new URL(Astro.url.pathname, Astro.site);
const ogImage = image ? new URL(image, Astro.site) : undefined;
const person = {
'@context': 'https://schema.org',
'@type': 'Person',
name: SITE.name,
jobTitle: 'Software Engineer',
url: Astro.site?.href,
email: `mailto:${SITE.email}`,
address: { '@type': 'PostalAddress', addressLocality: 'Chicago', addressRegion: 'IL' },
sameAs: Object.values(SITE.links).filter((l) => !l.includes('PLACEHOLDER')),
};
---
<!doctype html>
<html lang="en" data-theme={theme}>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>{fullTitle}</title>
<meta name="description" content={description} />
<link rel="canonical" href={canonical} />
<link rel="icon" href="/favicon.svg" type="image/svg+xml" />
<link rel="alternate" type="application/rss+xml" title={`${SITE.name} — Log`} href="/rss.xml" />
<link rel="sitemap" href="/sitemap-index.xml" />
<meta property="og:type" content={type} />
<meta property="og:title" content={fullTitle} />
<meta property="og:description" content={description} />
<meta property="og:url" content={canonical} />
<meta property="og:site_name" content={SITE.name} />
{ogImage && <meta property="og:image" content={ogImage} />}
<meta name="twitter:card" content={ogImage ? 'summary_large_image' : 'summary'} />
<script type="application/ld+json" set:html={JSON.stringify(person)} />
<ClientRouter />
<slot name="head" />
</head>
<body class={bodyClass}>
<a class="skip visually-hidden" href="#main">Skip to content</a>
<Nav />
<main id="main">
<slot />
</main>
<Footer />
</body>
</html>
<style>
body {
display: grid;
grid-template-rows: auto 1fr auto;
grid-template-columns: minmax(0, 1fr);
}
.skip:focus {
position: fixed !important;
top: 1rem;
left: 1rem;
width: auto;
height: auto;
clip-path: none;
z-index: 10000;
padding: 0.5rem 1rem;
background: var(--signal);
color: var(--signal-fg);
}
</style>
+11
View File
@@ -0,0 +1,11 @@
/**
* Large files (audio, video, game builds, 3D models, the résumé) live on the
* NAS in Nextcloud, not in git. They're served through this site's /media/*
* proxy so URLs stay on yoyos.sh and headers can be set per file type.
*
* media('sound/demo.mp3') -> '/media/sound/demo.mp3'
*/
export function media(path: string): string {
if (/^https?:\/\//.test(path)) return path;
return `/media/${path.replace(/^\/+/, '').split('/').map(encodeURIComponent).join('/')}`;
}
+33
View File
@@ -0,0 +1,33 @@
// Single source of truth for personal info used across the site.
export const SITE = {
name: 'Johan Sandoval',
handle: 'yoyos',
title: 'Johan Sandoval — Software Engineer',
role: 'Software Engineer · Automation & Internal Tools',
description:
'Johan Sandoval builds the tools other teams run on: dashboards, automation and web apps, plus games, 3D models, hardware and music.',
location: 'Chicago, IL',
coords: '41.8781° N, 87.6298° W',
email: 'contact@mail.yoyos.sh',
// Shown in the status readout. Flip `open` off when you take a job.
availability: {
open: true,
text: 'Open to software engineering roles',
},
links: {
gitea: 'https://gitea.yoyos.sh/yoyos',
github: 'https://github.com/yoyos-dev',
linkedin: 'https://www.linkedin.com/in/PLACEHOLDER',
},
// Served through /media from Nextcloud. Upload the PDF there with this name.
resume: '/media/resume/Johan_Sandoval_Resume.pdf',
} as const;
export const NAV = [
{ href: '/work', label: 'Work', code: '01' },
{ href: '/log', label: 'Log', code: '02' },
{ href: '/sound', label: 'Sound', code: '03' },
{ href: '/models', label: 'Models', code: '04' },
{ href: '/about', label: 'About', code: '05' },
{ href: '/contact', label: 'Contact', code: '06' },
] as const;
+3
View File
@@ -0,0 +1,3 @@
// Every theme in src/styles/themes/. Pages and content entries pick one by name.
export const THEMES = ['terminal', 'concrete', 'nostromo', 'overgrowth'] as const;
export type Theme = (typeof THEMES)[number];
+24
View File
@@ -0,0 +1,24 @@
---
import Base from '../layouts/Base.astro';
---
<Base title="Signal lost" theme="nostromo">
<section class="wrap section">
<p class="label signal">ERR 404 // SECTOR NOT FOUND</p>
<h1 class="glow">Signal lost</h1>
<p class="muted">Nothing at this address. It may have moved, or it never existed.</p>
<p><a class="btn btn--primary" href="/">Return to base</a></p>
</section>
</Base>
<style>
section {
display: grid;
gap: var(--space-5);
min-height: 50vh;
align-content: center;
}
h1 {
font-size: var(--step-5);
}
</style>
+172
View File
@@ -0,0 +1,172 @@
---
import Base from '../layouts/Base.astro';
import { SITE } from '../lib/site';
const skills = [
{ k: 'Languages', v: ['Python', 'PowerShell', 'TypeScript / JavaScript', 'SQL', 'Bash'] },
{
k: 'Web & Data',
v: ['React', 'Node.js', 'Three.js', 'Svelte', 'Vite', 'Tailwind', 'REST APIs', 'PostgreSQL', 'Drizzle ORM', 'SQLite', 'Redis'],
},
{
k: 'Infra & DevOps',
v: ['Linux (NixOS, Debian)', 'Docker', 'Podman', 'LXC / Proxmox', 'Git', 'Gitea Actions', 'GitHub Actions', 'Coolify', 'pytest'],
},
{
k: 'Enterprise',
v: ['SCCM / ConfigMgr', 'Intune + Autopilot', 'Active Directory', 'Entra ID', 'ManageEngine', 'USMT'],
},
{ k: 'Making', v: ['Blender', 'Godot', 'Unity', 'Guitar', 'Music production'] },
];
const timeline = [
{
when: '2024 — 2026',
what: 'Contract Technical Lead / Deployment Engineer',
where: 'PSM Partners · Chicago & nationwide',
notes: [
"Built USMT Dash for Lurie Children's FY26 refresh. Daily builds went from about 10 to 25, closing about 1,900 machines against a 1,300 scope.",
'Technical lead on a Windows 11 and Intune Autopilot migration of 694 devices for Troon Golf. Wrote a 41-command PowerShell toolkit against ManageEngine.',
"One of three leads on Lurie Children's 10,000-device Windows 10 to 11 upgrade. Cut daily reporting from 3–4 hours to 1.",
'Earlier engagements: Northwestern University, AgroFresh + Pace International.',
],
},
{
when: '2024 — 2025',
what: 'Software Engineering AI Trainer (Contract)',
where: 'Outlier AI',
notes: ['Reviewed and corrected model code output: reference solutions, bug fixes, multi-turn coding prompts.'],
},
{
when: '2023',
what: 'Web Developer (Contract)',
where: 'XSport Fitness · Gold Coast, Chicago',
notes: ['Built a React + Tailwind trainer booking site. Bookings rose 50% in the first month.'],
},
{
when: 'B.S.',
what: 'B.S. Computer Engineering',
where: 'University of Illinois Urbana-Champaign',
notes: [],
},
];
---
<Base title="About" description="About Johan Sandoval: background, skills and experience." theme="concrete">
<section class="wrap section">
<p class="label label--accent">// 05 — Operator profile</p>
<h1>About</h1>
<div class="intro">
<div class="prose lead">
<p>
I'm a deployment services technical lead who builds the tooling the deployments run on.
Over two years and 16,000+ devices across healthcare, higher-ed, agriculture and
hospitality, I wrote the PowerShell, Python and SQL automation behind them in house.
</p>
<p>
Most recently that was <a href="/work/usmt-dash">USMT Dash</a>, a web dashboard over SCCM
that took a six-person team from 10 machine builds a day to 25. Now I'm looking for my
next role as a software engineer.
</p>
<p>
Outside work I run a homelab, model in Blender, build games in Godot and Unity, make
hardware, and play guitar. All of it ends up on this site.
</p>
<p class="cluster">
<a class="btn btn--primary" href={SITE.resume}>Download résumé</a>
<a class="btn" href="/contact">Get in touch</a>
</p>
</div>
<dl class="readout panel" data-tab="Skills">
{
skills.map((s) => (
<>
<dt>{s.k}</dt>
<dd>{s.v.join(' · ')}</dd>
</>
))
}
</dl>
</div>
</section>
<section class="wrap section">
<h2>Service record</h2>
<ol class="timeline">
{
timeline.map((t) => (
<li>
<span class="label when">{t.when}</span>
<div class="stack">
<h3>{t.what}</h3>
<p class="label">{t.where}</p>
{t.notes.length > 0 && (
<ul>
{t.notes.map((n) => (
<li>{n}</li>
))}
</ul>
)}
</div>
</li>
))
}
</ol>
</section>
</Base>
<style>
h1 {
margin-block: var(--space-3) var(--space-7);
font-size: var(--step-5);
}
.intro {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr));
gap: var(--space-7);
align-items: start;
}
.lead {
font-size: var(--step-1);
}
.readout {
grid-template-columns: 1fr;
gap: 0.2em;
}
.readout dd {
margin-bottom: var(--space-4);
}
h2 {
margin-bottom: var(--space-6);
}
.timeline {
list-style: none;
padding: 0;
border-top: var(--border-w) solid var(--line-strong);
}
.timeline > li {
display: grid;
grid-template-columns: 10rem 1fr;
gap: var(--space-5);
padding-block: var(--space-5);
border-bottom: var(--border-w) solid var(--line);
}
.timeline .stack {
--stack-gap: var(--space-2);
}
.timeline ul {
padding-inline-start: 1.1em;
max-width: var(--prose-w);
}
.timeline ul li::marker {
color: var(--signal);
}
@media (max-width: 40rem) {
.timeline > li {
grid-template-columns: 1fr;
gap: var(--space-2);
}
}
</style>
+96
View File
@@ -0,0 +1,96 @@
import type { APIRoute } from 'astro';
import nodemailer, { type Transporter } from 'nodemailer';
export const prerender = false;
const env = (k: string) => process.env[k] ?? import.meta.env[k];
// --- tiny in-memory rate limit: 5 messages per IP per hour ---
const WINDOW_MS = 60 * 60 * 1000;
const LIMIT = 5;
const hits = new Map<string, number[]>();
function limited(ip: string): boolean {
const now = Date.now();
const recent = (hits.get(ip) ?? []).filter((t) => now - t < WINDOW_MS);
recent.push(now);
hits.set(ip, recent);
if (hits.size > 5000) hits.clear();
return recent.length > LIMIT;
}
function clientIp(request: Request, fallback: string): string {
// Coolify's proxy appends the real client address as the last X-Forwarded-For entry.
const xff = request.headers.get('x-forwarded-for');
return xff?.split(',').at(-1)?.trim() || fallback;
}
let transport: Transporter | undefined;
function mailer() {
if (!env('SMTP_HOST')) return undefined;
transport ??= nodemailer.createTransport({
host: env('SMTP_HOST'),
port: Number(env('SMTP_PORT') ?? 587),
secure: env('SMTP_SECURE') === 'true',
auth: env('SMTP_USER') ? { user: env('SMTP_USER'), pass: env('SMTP_PASS') } : undefined,
});
return transport;
}
const REASONS = ['hiring', 'freelance', 'collab', 'music', 'other'] as const;
const EMAIL_RE = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
const clean = (v: FormDataEntryValue | null, max: number) =>
String(v ?? '')
.replace(/[\r\n]+/g, ' ')
.trim()
.slice(0, max);
export const POST: APIRoute = async ({ request, clientAddress, redirect }) => {
const wantsJson = request.headers.get('accept')?.includes('application/json');
const reply = (status: number, message: string) =>
wantsJson
? Response.json({ ok: status < 400, message }, { status })
: redirect(`/contact?${status < 400 ? 'sent=1' : `error=${encodeURIComponent(message)}`}`, 303);
let form: FormData;
try {
form = await request.formData();
} catch {
return reply(400, 'Malformed request.');
}
// Honeypot: real people never see this field.
if (clean(form.get('website'), 200)) return reply(200, 'Message sent.');
const name = clean(form.get('name'), 120);
const email = clean(form.get('email'), 200);
const reason = clean(form.get('reason'), 20);
const message = String(form.get('message') ?? '').trim().slice(0, 5000);
if (!name || !EMAIL_RE.test(email) || message.length < 10) {
return reply(422, 'Please include your name, a valid email and a message of at least 10 characters.');
}
if (limited(clientIp(request, clientAddress))) {
return reply(429, 'Too many messages. Try again in an hour or email me directly.');
}
const t = mailer();
if (!t) {
console.error('[contact] SMTP_HOST is not configured');
return reply(503, 'The contact form is offline. Please email me directly.');
}
const topic = (REASONS as readonly string[]).includes(reason) ? reason : 'other';
try {
await t.sendMail({
from: env('CONTACT_FROM') ?? env('SMTP_USER'),
to: env('CONTACT_TO') ?? 'contact@mail.yoyos.sh',
replyTo: { name, address: email },
subject: `[yoyos.sh] ${topic} — ${name}`,
text: `From: ${name} <${email}>\nTopic: ${topic}\n\n${message}\n`,
});
} catch (err) {
console.error('[contact] send failed', err);
return reply(502, 'Something went wrong sending that. Please email me directly.');
}
return reply(200, 'Message sent.');
};
+161
View File
@@ -0,0 +1,161 @@
---
import Base from '../layouts/Base.astro';
import { SITE } from '../lib/site';
---
<Base title="Contact" description="Hire Johan Sandoval or get in touch.">
<section class="wrap section layout">
<div class="stack side">
<p class="label label--accent">// 06 — Open channel</p>
<h1>Contact</h1>
<p class="lead">
Hiring, freelance, collaborations, or you just want to talk about a game, a model or a riff.
I read everything.
</p>
<dl class="readout">
<dt>Mail</dt>
<dd><a href={`mailto:${SITE.email}`}>{SITE.email}</a></dd>
<dt>Base</dt>
<dd>{SITE.location} · open to remote</dd>
<dt>Status</dt>
<dd class="accent">{SITE.availability.text}</dd>
<dt>Résumé</dt>
<dd><a href={SITE.resume}>PDF ↓</a></dd>
</dl>
</div>
<form class="panel stack" data-tab="Transmit" method="post" action="/api/contact">
<div class="status" role="status" aria-live="polite"></div>
<label>
<span class="label">Name</span>
<input name="name" autocomplete="name" required maxlength="120" />
</label>
<label>
<span class="label">Email</span>
<input name="email" type="email" autocomplete="email" required maxlength="200" />
</label>
<label>
<span class="label">Reason</span>
<select name="reason">
<option value="hiring">Hiring / job opportunity</option>
<option value="freelance">Freelance project</option>
<option value="collab">Collaboration</option>
<option value="music">Music</option>
<option value="other">Something else</option>
</select>
</label>
<label>
<span class="label">Message</span>
<textarea name="message" rows="7" required minlength="10" maxlength="5000"></textarea>
</label>
<label class="hp" aria-hidden="true">
Leave this empty <input name="website" tabindex="-1" autocomplete="off" />
</label>
<button class="btn btn--primary" type="submit">Send transmission →</button>
</form>
</section>
</Base>
<style>
.layout {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
gap: var(--space-8);
align-items: start;
}
.side {
--stack-gap: var(--space-5);
}
.lead {
font-size: var(--step-1);
}
form {
--stack-gap: var(--space-4);
margin-top: var(--space-6);
}
label {
display: grid;
gap: var(--space-1);
}
input,
select,
textarea {
width: 100%;
padding: 0.7em 0.8em;
background: var(--bg-sunken);
border: var(--border-w) solid var(--line);
border-radius: var(--radius);
color: var(--fg);
}
input:focus,
select:focus,
textarea:focus {
border-color: var(--accent);
outline: none;
box-shadow: var(--glow);
}
textarea {
resize: vertical;
}
.hp {
position: absolute;
left: -10000px;
}
.status:empty {
display: none;
}
.status {
padding: var(--space-3) var(--space-4);
border: 1px solid currentColor;
font-family: var(--font-mono);
font-size: var(--step--1);
}
.status.ok {
color: var(--accent);
}
.status.err {
color: var(--signal);
}
</style>
<script>
function setup() {
const form = document.querySelector<HTMLFormElement>('form[action="/api/contact"]');
if (!form) return;
const status = form.querySelector<HTMLElement>('.status')!;
const button = form.querySelector<HTMLButtonElement>('button[type=submit]')!;
const show = (ok: boolean, msg: string) => {
status.className = `status ${ok ? 'ok' : 'err'}`;
status.textContent = `${ok ? '■ RECEIVED' : '■ ERROR'} — ${msg}`;
};
// Messages from the no-JS fallback redirect
const params = new URL(location.href).searchParams;
if (params.has('sent')) show(true, "Thanks, I'll get back to you soon.");
if (params.get('error')) show(false, params.get('error')!);
form.addEventListener('submit', async (e) => {
e.preventDefault();
button.disabled = true;
button.textContent = 'Transmitting…';
try {
const res = await fetch(form.action, {
method: 'POST',
body: new FormData(form),
headers: { accept: 'application/json' },
});
const data = await res.json();
show(res.ok, res.ok ? "Thanks, I'll get back to you soon." : data.message);
if (res.ok) form.reset();
} catch {
show(false, 'Network error. Please email me directly.');
} finally {
button.disabled = false;
button.textContent = 'Send transmission →';
}
});
}
document.addEventListener('astro:page-load', setup);
</script>
+2
View File
@@ -0,0 +1,2 @@
export const prerender = false;
export const GET = () => new Response('ok');
+234
View File
@@ -0,0 +1,234 @@
---
import { getCollection } from 'astro:content';
import Base from '../layouts/Base.astro';
import ProjectCard from '../components/ProjectCard.astro';
import SectionHead from '../components/SectionHead.astro';
import { SITE } from '../lib/site';
import { DISCIPLINES } from '../content.config';
const work = (await getCollection('work')).sort((a, b) => +b.data.date - +a.data.date);
const featured = work.find((p) => p.data.featured) ?? work[0];
const rest = work.filter((p) => p !== featured).slice(0, 3);
const posts = (await getCollection('log', ({ data }) => !data.draft))
.sort((a, b) => +b.data.date - +a.data.date)
.slice(0, 3);
const counts = Object.fromEntries(
DISCIPLINES.map((d) => [d, work.filter((p) => p.data.disciplines.includes(d)).length]),
);
const disciplineLabels: Record<string, string> = {
software: 'Software & tools',
web: 'Web',
game: 'Games',
hardware: 'Hardware',
'3d': '3D modeling',
music: 'Music',
};
const fmt = (d: Date) => d.toISOString().slice(0, 10).replaceAll('-', '.');
---
<Base>
<section class="hero wrap">
<div class="boot label" aria-hidden="true">
<span>SYS://YOYOS.SH</span>
<span>BOOT OK</span>
<span>{SITE.coords}</span>
</div>
<h1 class="name">
<span>Johan</span>
<span class="outline">Sandoval</span>
</h1>
<div class="intro">
<p class="lede">
Software engineer who builds the tools other teams run on. <span class="accent"
>Dashboards, automation and web apps</span
>, plus games, 3D models, hardware and music on the side.
</p>
<dl class="readout panel" data-tab="Operator">
<dt>Role</dt>
<dd>{SITE.role}</dd>
<dt>Base</dt>
<dd>{SITE.location}</dd>
<dt>Status</dt>
<dd class:list={[SITE.availability.open ? 'accent' : 'signal']}>
{SITE.availability.text}<span class="blink">_</span>
</dd>
<dt>Stack</dt>
<dd>TypeScript · Python · PowerShell · React · SQL · Docker</dd>
</dl>
</div>
<div class="cluster cta">
<a class="btn btn--primary" href="/work">View work</a>
<a class="btn" href="/contact">Hire me</a>
<a class="btn" href={SITE.resume}>Résumé (PDF)</a>
</div>
</section>
<section class="wrap section">
<SectionHead code="01" title="Case files" href="/work" linkLabel="All work" />
{featured && <ProjectCard project={featured} index={1} large />}
<div class="grid">
{rest.map((p, i) => <ProjectCard project={p} index={i + 2} />)}
</div>
</section>
<section class="wrap section">
<SectionHead code="02" title="Disciplines" />
<ul class="disciplines">
{
DISCIPLINES.map((d) => (
<li>
<a href={d === 'music' ? '/sound' : `/work?d=${d}`}>
<span class="label">{String(counts[d]).padStart(2, '0')} files</span>
<span class="dname">{disciplineLabels[d]}</span>
</a>
</li>
))
}
</ul>
</section>
<section class="wrap section">
<SectionHead code="03" title="Transmissions" href="/log" linkLabel="Full log" />
<ol class="log">
{
posts.map((post) => (
<li>
<a href={`/log/${post.id}`}>
<time class="label" datetime={post.data.date.toISOString()}>
{fmt(post.data.date)}
</time>
<span class="ptitle">{post.data.title}</span>
<span class="muted">{post.data.summary}</span>
</a>
</li>
))
}
</ol>
</section>
</Base>
<style>
.hero {
display: grid;
gap: var(--space-6);
padding-block: var(--space-8) var(--space-7);
}
.boot {
display: flex;
flex-wrap: wrap;
gap: var(--space-5);
border-bottom: 1px dashed var(--line);
padding-bottom: var(--space-3);
}
.boot span:nth-child(2) {
color: var(--accent);
}
.name {
display: grid;
font-size: var(--step-5);
line-height: 0.82;
font-weight: 900;
letter-spacing: -0.01em;
}
.outline {
color: transparent;
-webkit-text-stroke: 2px var(--fg);
text-shadow: none;
}
.intro {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 24rem), 1fr));
gap: var(--space-7);
align-items: start;
}
.lede {
font-size: var(--step-2);
line-height: 1.25;
max-width: 30ch;
}
.readout.panel {
margin-top: var(--space-4);
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr));
gap: var(--space-5);
margin-top: var(--space-5);
}
.disciplines {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
list-style: none;
padding: 0;
border-top: var(--border-w) solid var(--line);
border-left: var(--border-w) solid var(--line);
}
.disciplines a {
display: grid;
gap: var(--space-5);
min-height: 9rem;
align-content: space-between;
padding: var(--space-4);
border-right: var(--border-w) solid var(--line);
border-bottom: var(--border-w) solid var(--line);
color: var(--fg);
text-decoration: none;
transition: background 0.15s var(--ease);
}
.disciplines a:hover {
background: var(--accent);
color: var(--accent-fg);
}
.disciplines a:hover .label {
color: inherit;
}
.dname {
font-family: var(--font-display);
font-size: var(--step-2);
font-weight: 800;
text-transform: uppercase;
line-height: 1;
}
.log {
list-style: none;
padding: 0;
}
.log a {
display: grid;
grid-template-columns: 8rem 1fr;
gap: var(--space-1) var(--space-5);
padding-block: var(--space-4);
border-bottom: 1px solid var(--line);
color: inherit;
text-decoration: none;
}
.log a:hover .ptitle {
color: var(--signal);
}
.log .muted {
grid-column: 2;
}
.ptitle {
font-family: var(--font-display);
font-size: var(--step-2);
font-weight: 700;
text-transform: uppercase;
line-height: 1;
}
@media (max-width: 40rem) {
.log a {
grid-template-columns: 1fr;
}
.log .muted {
grid-column: 1;
}
}
</style>
+66
View File
@@ -0,0 +1,66 @@
---
import { getCollection, render } from 'astro:content';
import { Image } from 'astro:assets';
import Base from '../../layouts/Base.astro';
export async function getStaticPaths() {
const posts = await getCollection('log', ({ data }) => import.meta.env.DEV || !data.draft);
return posts.map((post) => ({ params: { slug: post.id }, props: { post } }));
}
const { post } = Astro.props;
const { Content } = await render(post);
const d = post.data;
const words = post.body?.split(/\s+/).length ?? 0;
const minutes = Math.max(1, Math.round(words / 230));
---
<Base title={d.title} description={d.summary} theme={d.theme} type="article" image={d.cover?.src}>
<article class="wrap section">
<a class="label back" href="/log">← All transmissions</a>
<header class="stack">
<p class="label">
<time datetime={d.date.toISOString()}>{d.date.toISOString().slice(0, 10)}</time>
· {minutes} min read
{d.tags.map((t) => <span class="tag">{t}</span>)}
</p>
<h1>{d.title}</h1>
<p class="summary muted">{d.summary}</p>
</header>
{
d.cover && (
<Image class="cover" src={d.cover} alt={d.coverAlt ?? ''} widths={[800, 1280]} sizes="(min-width: 68ch) 68ch, 100vw" />
)
}
<div class="prose">
<Content />
</div>
</article>
</Base>
<style>
article {
max-width: calc(var(--prose-w) + 2 * var(--gutter));
}
.back {
display: inline-block;
margin-bottom: var(--space-6);
text-decoration: none;
}
header {
margin-bottom: var(--space-7);
padding-bottom: var(--space-5);
border-bottom: var(--border-w) solid var(--line-strong);
}
header .tag {
margin-inline-start: var(--space-2);
}
.summary {
font-size: var(--step-1);
}
.cover {
width: 100%;
margin-bottom: var(--space-6);
border: var(--border-w) solid var(--line);
}
</style>
+87
View File
@@ -0,0 +1,87 @@
---
import { getCollection } from 'astro:content';
import Base from '../../layouts/Base.astro';
const posts = (await getCollection('log', ({ data }) => import.meta.env.DEV || !data.draft)).sort(
(a, b) => +b.data.date - +a.data.date,
);
const fmt = (d: Date) => d.toISOString().slice(0, 10).replaceAll('-', '.');
---
<Base title="Log" description="Weekly notes on what Johan Sandoval is building.">
<section class="wrap section">
<p class="label label--accent">// 02 — Weekly log</p>
<h1>Transmissions</h1>
<p class="muted intro">
What I'm building each week. Subscribe via <a href="/rss.xml">RSS</a>.
</p>
<ol class="posts">
{
posts.map((post, i) => (
<li>
<a href={`/log/${post.id}`}>
<span class="label n">{String(posts.length - 1 - i).padStart(3, '0')}</span>
<time class="label" datetime={post.data.date.toISOString()}>
{fmt(post.data.date)}
</time>
<span class="t">
{post.data.title}
{post.data.draft && <span class="tag">draft</span>}
</span>
<span class="muted s">{post.data.summary}</span>
</a>
</li>
))
}
</ol>
</section>
</Base>
<style>
h1 {
margin-block: var(--space-3) var(--space-3);
}
.intro {
margin-bottom: var(--space-7);
}
.posts {
list-style: none;
padding: 0;
border-top: var(--border-w) solid var(--line-strong);
}
.posts a {
display: grid;
grid-template-columns: 4rem 7rem 1fr;
gap: var(--space-1) var(--space-4);
padding-block: var(--space-5);
border-bottom: 1px solid var(--line);
color: inherit;
text-decoration: none;
}
.n {
color: var(--accent);
}
.t {
font-family: var(--font-display);
font-size: var(--step-2);
font-weight: 700;
text-transform: uppercase;
line-height: 1;
}
.s {
grid-column: 3;
}
.posts a:hover .t {
color: var(--signal);
}
@media (max-width: 40rem) {
.posts a {
grid-template-columns: auto 1fr;
}
.t,
.s {
grid-column: 1 / -1;
}
}
</style>
+100
View File
@@ -0,0 +1,100 @@
import type { APIRoute } from 'astro';
export const prerender = false;
/**
* Streams files from the Nextcloud share on the NAS (MEDIA_ORIGIN) so they're
* served from yoyos.sh. Range requests pass through for audio/video seeking.
*
* MEDIA_ORIGIN example (public share, WebDAV):
* https://cloud.example.com/public.php/dav/files/<SHARE_TOKEN>
*/
const PASS_HEADERS = [
'content-type',
'content-length',
'content-range',
'accept-ranges',
'etag',
'last-modified',
];
const TYPES: Record<string, string> = {
wasm: 'application/wasm',
pck: 'application/octet-stream',
glb: 'model/gltf-binary',
gltf: 'model/gltf+json',
mp3: 'audio/mpeg',
ogg: 'audio/ogg',
flac: 'audio/flac',
wav: 'audio/wav',
mp4: 'video/mp4',
webm: 'video/webm',
pdf: 'application/pdf',
js: 'text/javascript',
html: 'text/html; charset=utf-8',
data: 'application/octet-stream',
};
export const GET: APIRoute = async ({ params, request }) => {
const origin = (process.env.MEDIA_ORIGIN ?? import.meta.env.MEDIA_ORIGIN)?.replace(/\/+$/, '');
if (!origin) return new Response('Media storage not configured', { status: 503 });
const path = params.path ?? '';
if (!path || path.split('/').some((seg) => seg === '..' || seg === '.')) {
return new Response('Not found', { status: 404 });
}
const upstreamHeaders: HeadersInit = {};
const range = request.headers.get('range');
if (range) upstreamHeaders['range'] = range;
const inm = request.headers.get('if-none-match');
if (inm) upstreamHeaders['if-none-match'] = inm;
const encoded = path.split('/').map(encodeURIComponent).join('/');
let upstream: Response;
try {
upstream = await fetch(`${origin}/${encoded}`, { headers: upstreamHeaders, redirect: 'follow' });
} catch {
return new Response('Media storage unreachable', { status: 502 });
}
if (upstream.status === 404 || upstream.status === 403) {
return new Response('Not found', { status: 404 });
}
const headers = new Headers();
for (const h of PASS_HEADERS) {
const v = upstream.headers.get(h);
if (v) headers.set(h, v);
}
// fetch() transparently decodes transport compression, so the upstream length no longer applies.
if (upstream.headers.get('content-encoding')) headers.delete('content-length');
const name = path.split('/').pop()!;
let ext = name.split('.').pop()!.toLowerCase();
// Unity pre-compressed builds: foo.wasm.br / foo.data.gz
const compressed = ext === 'br' ? 'br' : ext === 'gz' ? 'gzip' : undefined;
if (compressed) {
headers.set('content-encoding', compressed);
ext = name.split('.').slice(-2, -1)[0]?.toLowerCase() ?? ext;
}
if (TYPES[ext]) headers.set('content-type', TYPES[ext]);
// Game builds may need cross-origin isolation (Godot threaded exports).
if (path.startsWith('games/')) {
headers.set('cross-origin-opener-policy', 'same-origin');
headers.set('cross-origin-embedder-policy', 'require-corp');
headers.set('cross-origin-resource-policy', 'same-origin');
}
headers.set('cache-control', 'public, max-age=3600, stale-while-revalidate=86400');
headers.set('x-content-type-options', 'nosniff');
if (ext === 'html' || ext === 'svg') {
// Uploaded HTML (game shells) runs on this origin; keep it from being framed elsewhere.
headers.set('x-frame-options', 'SAMEORIGIN');
}
return new Response(upstream.body, { status: upstream.status, headers });
};
export const HEAD = GET;
+53
View File
@@ -0,0 +1,53 @@
---
import { getCollection } from 'astro:content';
import Base from '../layouts/Base.astro';
import ModelViewer from '../components/ModelViewer.astro';
import { media } from '../lib/media';
const models = (await getCollection('models')).sort((a, b) => +b.data.date - +a.data.date);
---
<Base title="Models" description="3D models by Johan Sandoval, viewable in the browser." theme="overgrowth">
<section class="wrap section">
<p class="label label--accent">// 04 — Specimens</p>
<h1>Models</h1>
<p class="muted intro">Blender work you can spin around. Drag to orbit, scroll to zoom.</p>
<div class="grid">
{
models.map((m) => (
<figure class="stack">
<ModelViewer src={media(m.data.file)} poster={m.data.poster && media(m.data.poster)} alt={m.data.title} ratio="1 / 1" />
<figcaption>
<h2>{m.data.title}</h2>
<p class="label">
{m.data.date.toISOString().slice(0, 10)} · {m.data.tools.join(' · ')}
</p>
{m.data.notes && <p class="muted">{m.data.notes}</p>}
</figcaption>
</figure>
))
}
</div>
</section>
</Base>
<style>
h1 {
margin-block: var(--space-3);
}
.intro {
margin-bottom: var(--space-7);
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr));
gap: var(--space-6);
}
figure :global(.viewer) {
margin-bottom: 0;
}
h2 {
font-size: var(--step-2);
}
</style>
+91
View File
@@ -0,0 +1,91 @@
---
import { getCollection } from 'astro:content';
import Base from '../../layouts/Base.astro';
import { media } from '../../lib/media';
export async function getStaticPaths() {
const games = await getCollection('work', ({ data }) => !!data.game);
return games.map((project) => ({ params: { slug: project.id }, props: { project } }));
}
const { project } = Astro.props;
const game = project.data.game!;
const src = media(`${game.path}/${game.entry}`);
---
<Base title={`Play ${project.data.title}`} description={project.data.summary} theme={project.data.theme}>
<section class="wrap section">
<a class="label back" href={`/work/${project.id}`}>← {project.data.title}</a>
<div class="cabinet" style={`--ratio: ${game.aspect}`}>
<div class="top label">
<span>{project.data.title}</span>
<span>{game.engine} build</span>
</div>
<button class="placeholder boot" type="button">[ insert coin ▶ ]</button>
<div class="bottom cluster">
<button class="btn fs" type="button">Fullscreen</button>
<a class="btn" href={src} target="_blank" rel="noopener">Open in new tab ↗</a>
<span class="label">Click into the game to give it keyboard focus.</span>
</div>
</div>
</section>
</Base>
<script is:inline define:vars={{ src }}>
// Load the game on demand so the page itself stays light.
(() => {
const cab = document.querySelector('.cabinet');
const boot = cab.querySelector('.boot');
boot.addEventListener('click', () => {
const frame = document.createElement('iframe');
frame.src = src;
frame.title = 'Game';
frame.allow = 'fullscreen; autoplay; gamepad; cross-origin-isolated';
frame.className = 'screen';
boot.replaceWith(frame);
frame.focus();
});
cab.querySelector('.fs').addEventListener('click', () => {
(cab.querySelector('.screen') ?? cab).requestFullscreen?.();
});
})();
</script>
<style>
.back {
display: inline-block;
margin-bottom: var(--space-5);
text-decoration: none;
}
.cabinet {
border: var(--border-w) solid var(--line-strong);
background: var(--bg-sunken);
}
.top,
.bottom {
display: flex;
justify-content: space-between;
padding: var(--space-2) var(--space-4);
}
.top {
border-bottom: 1px solid var(--line);
}
.bottom {
justify-content: flex-start;
border-top: 1px solid var(--line);
}
.boot,
.cabinet :global(.screen) {
display: block;
width: 100%;
aspect-ratio: var(--ratio);
border: 0;
}
.boot {
cursor: pointer;
font-size: var(--step-1);
}
.boot:hover {
color: var(--accent);
}
</style>
+22
View File
@@ -0,0 +1,22 @@
import rss from '@astrojs/rss';
import { getCollection } from 'astro:content';
import type { APIContext } from 'astro';
import { SITE } from '../lib/site';
export async function GET(context: APIContext) {
const posts = (await getCollection('log', ({ data }) => !data.draft)).sort(
(a, b) => +b.data.date - +a.data.date,
);
return rss({
title: `${SITE.name} — Log`,
description: 'Weekly transmissions: code, builds, models and music.',
site: context.site!,
items: posts.map((post) => ({
title: post.data.title,
description: post.data.summary,
pubDate: post.data.date,
link: `/log/${post.id}/`,
categories: post.data.tags,
})),
});
}
+74
View File
@@ -0,0 +1,74 @@
---
import { getCollection } from 'astro:content';
import Base from '../layouts/Base.astro';
import AudioPlayer from '../components/AudioPlayer';
import { media } from '../lib/media';
const tracks = (await getCollection('sound')).sort((a, b) => +b.data.date - +a.data.date);
---
<Base title="Sound" description="Guitar and original music by Johan Sandoval." theme="nostromo">
<section class="wrap section">
<p class="label label--accent">// 03 — Audio logs</p>
<h1 class="glow">Sound</h1>
<p class="muted intro">Guitar, recordings and experiments. Self-hosted, no streaming service in the middle.</p>
<ol class="tracks">
{
tracks.map((t, i) => (
<li class="panel" data-tab={`Track ${String(i + 1).padStart(2, '0')}`}>
<div class="info">
<h2>{t.data.title}</h2>
<p class="label">
{t.data.date.toISOString().slice(0, 10)}
{t.data.gear.length > 0 && ` · ${t.data.gear.join(' · ')}`}
</p>
{t.data.notes && <p class="muted">{t.data.notes}</p>}
</div>
<AudioPlayer client:visible src={media(t.data.file)} title={t.data.title} />
</li>
))
}
</ol>
</section>
</Base>
<style>
h1 {
margin-block: var(--space-3);
}
.intro {
margin-bottom: var(--space-8);
}
.tracks {
display: grid;
gap: var(--space-8);
list-style: none;
padding: 0;
}
.info {
margin-bottom: var(--space-4);
}
h2 {
font-size: var(--step-2);
}
.tracks :global(.player) {
display: grid;
grid-template-columns: auto 1fr auto;
align-items: center;
gap: var(--space-4);
}
.tracks :global(.play) {
width: 3.25rem;
height: 3.25rem;
justify-content: center;
padding: 0;
font-size: 1rem;
}
.tracks :global(.wave) {
min-height: 64px;
display: grid;
align-items: center;
border-block: 1px dashed var(--line);
}
</style>
+125
View File
@@ -0,0 +1,125 @@
---
import { getCollection, render } from 'astro:content';
import { Image } from 'astro:assets';
import Base from '../../layouts/Base.astro';
import ModelViewer from '../../components/ModelViewer.astro';
import { media } from '../../lib/media';
export async function getStaticPaths() {
const work = await getCollection('work');
return work.map((project) => ({ params: { slug: project.id }, props: { project } }));
}
const { project } = Astro.props;
const { Content } = await render(project);
const d = project.data;
---
<Base title={d.title} description={d.summary} theme={d.theme} type="article" image={d.cover?.src}>
<article class="wrap section">
<a class="label back" href="/work">← All case files</a>
<header class="head">
<div class="stack">
<p class="label label--accent">// {d.disciplines.join(' · ')}</p>
<h1 transition:name={`title-${project.id}`}>{d.title}</h1>
<p class="summary">{d.summary}</p>
{
d.links.length > 0 && (
<div class="cluster">
{d.links.map((l, i) => (
<a class:list={['btn', { 'btn--primary': i === 0 }]} href={l.href} rel="noopener">
{l.label} ↗
</a>
))}
{d.game && (
<a class="btn btn--primary" href={`/play/${project.id}`}>
Play ▶
</a>
)}
</div>
)
}
{
d.links.length === 0 && d.game && (
<a class="btn btn--primary" href={`/play/${project.id}`}>
Play ▶
</a>
)
}
</div>
<dl class="readout panel" data-tab="Spec">
<dt>Status</dt>
<dd>{d.status.replace('-', ' ')}</dd>
<dt>Date</dt>
<dd>{d.date.toISOString().slice(0, 7)}</dd>
{
d.role && (
<>
<dt>Role</dt>
<dd>{d.role}</dd>
</>
)
}
{
d.stack.length > 0 && (
<>
<dt>Stack</dt>
<dd>{d.stack.join(' · ')}</dd>
</>
)
}
</dl>
</header>
{
d.cover && (
<Image
class="cover"
src={d.cover}
alt={d.coverAlt ?? ''}
widths={[800, 1280, 1920]}
sizes="(min-width: 76rem) 76rem, 100vw"
loading="eager"
transition:name={`cover-${project.id}`}
/>
)
}
{d.model && <ModelViewer src={media(d.model)} alt={`3D model: ${d.title}`} />}
<div class="prose body">
<Content />
</div>
</article>
</Base>
<style>
.back {
display: inline-block;
margin-bottom: var(--space-6);
text-decoration: none;
}
.head {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr));
gap: var(--space-7);
align-items: end;
margin-bottom: var(--space-7);
}
.head .stack {
--stack-gap: var(--space-4);
}
.summary {
font-size: var(--step-1);
max-width: 50ch;
}
.cover {
width: 100%;
border: var(--border-w) solid var(--line-strong);
margin-bottom: var(--space-7);
}
.body {
margin-inline: auto;
}
</style>
+77
View File
@@ -0,0 +1,77 @@
---
import { getCollection } from 'astro:content';
import Base from '../../layouts/Base.astro';
import ProjectCard from '../../components/ProjectCard.astro';
import { DISCIPLINES } from '../../content.config';
const work = (await getCollection('work')).sort((a, b) => +b.data.date - +a.data.date);
---
<Base title="Work" description="Software, web, games, hardware and 3D projects by Johan Sandoval.">
<section class="wrap section">
<p class="label label--accent">// 01 — Archive</p>
<h1>Case files</h1>
<div class="cluster filters" role="group" aria-label="Filter by discipline">
<button class="btn" data-filter="all" aria-pressed="true">All</button>
{
DISCIPLINES.map((d) => (
<button class="btn" data-filter={d} aria-pressed="false">
{d}
</button>
))
}
</div>
<div class="grid">
{work.map((p, i) => <ProjectCard project={p} index={i + 1} />)}
</div>
<p class="empty label" hidden>No files in this category yet.</p>
</section>
</Base>
<style>
h1 {
margin-block: var(--space-3) var(--space-6);
}
.filters {
margin-bottom: var(--space-6);
}
.filters .btn[aria-pressed='true'] {
--btn-bg: var(--accent);
--btn-fg: var(--accent-fg);
--btn-line: var(--accent);
}
.grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
gap: var(--space-5);
}
</style>
<script>
function setup() {
const buttons = document.querySelectorAll<HTMLButtonElement>('[data-filter]');
const cards = document.querySelectorAll<HTMLElement>('[data-disciplines]');
const empty = document.querySelector<HTMLElement>('.empty');
if (!buttons.length) return;
const apply = (filter: string) => {
let shown = 0;
buttons.forEach((b) => b.setAttribute('aria-pressed', String(b.dataset.filter === filter)));
cards.forEach((c) => {
const match = filter === 'all' || c.dataset.disciplines!.split(' ').includes(filter);
c.hidden = !match;
if (match) shown++;
});
if (empty) empty.hidden = shown > 0;
const url = new URL(location.href);
filter === 'all' ? url.searchParams.delete('d') : url.searchParams.set('d', filter);
history.replaceState(history.state, '', url);
};
buttons.forEach((b) => b.addEventListener('click', () => apply(b.dataset.filter!)));
apply(new URL(location.href).searchParams.get('d') ?? 'all');
}
document.addEventListener('astro:page-load', setup);
</script>
+401
View File
@@ -0,0 +1,401 @@
@layer reset, tokens, base, layout, components, utilities, page;
@import '@fontsource-variable/big-shoulders';
@import '@fontsource-variable/ibm-plex-sans';
@import '@fontsource/ibm-plex-mono/400.css';
@import '@fontsource/ibm-plex-mono/500.css';
@import './tokens.css' layer(tokens);
@import './themes/index.css' layer(tokens);
/*
* Page-specific styles should go in the page's own <style> block (Astro scopes
* it automatically). Unscoped overrides belong in `@layer page { ... }` so
* they always win over everything here without !important.
*/
@layer reset {
*,
*::before,
*::after {
box-sizing: border-box;
}
* {
margin: 0;
}
html {
-webkit-text-size-adjust: none;
text-size-adjust: none;
}
body {
min-height: 100dvh;
line-height: 1.6;
-webkit-font-smoothing: antialiased;
}
img,
picture,
video,
canvas,
svg {
display: block;
max-width: 100%;
height: auto;
}
input,
button,
textarea,
select {
font: inherit;
color: inherit;
}
p,
h1,
h2,
h3,
h4 {
overflow-wrap: break-word;
}
}
@layer base {
html {
background: var(--bg);
color: var(--fg);
font-family: var(--font-body);
font-size: 100%;
scrollbar-color: var(--accent) var(--bg-sunken);
}
/* Themes can be applied to any element, not just <html>. */
[data-theme] {
background: var(--bg);
color: var(--fg);
font-family: var(--font-body);
}
body {
font-size: var(--step-0);
background: var(--bg);
position: relative;
isolation: isolate;
}
/* film grain */
body::before {
content: '';
position: fixed;
inset: 0;
z-index: 9998;
pointer-events: none;
opacity: var(--grain);
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 0 0.5 0 0 0 1.1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
mix-blend-mode: overlay;
}
/* scanlines */
body::after {
content: '';
position: fixed;
inset: 0;
z-index: 9999;
pointer-events: none;
opacity: calc(var(--scanlines) * 0.35);
background: repeating-linear-gradient(
to bottom,
transparent 0 2px,
color-mix(in oklab, var(--bg-sunken) 55%, transparent) 2px 3px
);
}
h1,
h2,
h3,
h4 {
font-family: var(--font-display);
font-weight: 800;
line-height: 0.95;
letter-spacing: 0.005em;
text-transform: uppercase;
text-wrap: balance;
}
h1 {
font-size: var(--step-4);
}
h2 {
font-size: var(--step-3);
}
h3 {
font-size: var(--step-2);
}
h4 {
font-size: var(--step-1);
}
p {
text-wrap: pretty;
}
a {
color: var(--accent);
text-decoration-thickness: 1px;
text-underline-offset: 0.2em;
}
a:hover {
color: var(--signal);
}
code,
kbd,
pre,
samp {
font-family: var(--font-mono);
font-size: 0.9em;
}
pre {
padding: var(--space-4);
overflow-x: auto;
background: var(--bg-sunken);
border: var(--border-w) solid var(--line);
}
::selection {
background: var(--signal);
color: var(--signal-fg);
}
:focus-visible {
outline: 2px solid var(--signal);
outline-offset: 3px;
}
hr {
border: 0;
border-top: var(--border-w) solid var(--line);
}
}
@layer layout {
.wrap {
width: min(100% - 2 * var(--gutter), var(--max-w));
margin-inline: auto;
}
.stack > * + * {
margin-block-start: var(--stack-gap, var(--space-4));
}
.cluster {
display: flex;
flex-wrap: wrap;
gap: var(--cluster-gap, var(--space-3));
align-items: center;
}
.section {
padding-block: var(--space-8);
}
.prose {
max-width: var(--prose-w);
}
.prose > * + * {
margin-block-start: 1.1em;
}
.prose h2,
.prose h3 {
margin-block-start: 1.8em;
}
.prose img {
border: var(--border-w) solid var(--line);
}
.prose ul,
.prose ol {
padding-inline-start: 1.25em;
}
.prose li + li {
margin-block-start: 0.35em;
}
.prose li::marker {
color: var(--accent);
}
.prose blockquote {
border-inline-start: 4px solid var(--signal);
padding-inline-start: var(--space-4);
color: var(--fg-muted);
}
}
@layer components {
/* monospaced micro label: "// 01 — SECTION" */
.label {
font-family: var(--font-mono);
font-size: var(--step--1);
font-weight: 500;
letter-spacing: 0.12em;
text-transform: uppercase;
color: var(--fg-muted);
}
.label--accent {
color: var(--accent);
}
.label--signal {
color: var(--signal);
}
/* bordered slab with an optional tab label */
.panel {
position: relative;
background: var(--bg-raised);
border: var(--border-w) solid var(--line-strong);
border-radius: var(--radius);
padding: var(--space-5);
}
.panel[data-tab]::before {
content: attr(data-tab);
position: absolute;
top: calc(-1 * var(--border-w));
left: calc(-1 * var(--border-w));
translate: 0 -100%;
padding: 0.15em 0.6em;
background: var(--line-strong);
color: var(--bg);
font-family: var(--font-mono);
font-size: 0.7rem;
letter-spacing: 0.14em;
text-transform: uppercase;
}
.btn {
--btn-bg: transparent;
--btn-fg: var(--fg);
--btn-line: var(--line-strong);
display: inline-flex;
align-items: center;
gap: 0.6em;
padding: 0.7em 1.15em;
border: var(--border-w) solid var(--btn-line);
border-radius: var(--radius);
background: var(--btn-bg);
color: var(--btn-fg);
font-family: var(--font-mono);
font-size: var(--step--1);
font-weight: 500;
letter-spacing: 0.1em;
text-transform: uppercase;
text-decoration: none;
cursor: pointer;
transition:
background 0.15s var(--ease),
color 0.15s var(--ease),
box-shadow 0.15s var(--ease),
translate 0.15s var(--ease);
}
.btn:hover {
--btn-bg: var(--fg);
--btn-fg: var(--bg);
box-shadow: 4px 4px 0 var(--signal);
translate: -2px -2px;
}
.btn--primary {
--btn-bg: var(--accent);
--btn-fg: var(--accent-fg);
--btn-line: var(--accent);
}
.btn--primary:hover {
--btn-bg: var(--signal);
--btn-fg: var(--signal-fg);
--btn-line: var(--signal);
box-shadow: 4px 4px 0 var(--fg);
}
.btn[disabled] {
opacity: 0.5;
pointer-events: none;
}
.tag {
display: inline-block;
padding: 0.1em 0.55em;
border: 1px solid var(--line);
font-family: var(--font-mono);
font-size: 0.72rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--fg-muted);
}
/* key/value system readout */
.readout {
display: grid;
grid-template-columns: max-content 1fr;
gap: 0.35em 1.25em;
font-family: var(--font-mono);
font-size: var(--step--1);
}
.readout dt {
color: var(--fg-muted);
text-transform: uppercase;
letter-spacing: 0.1em;
}
.readout dd {
margin: 0;
color: var(--fg);
}
.blink {
animation: blink 1.1s steps(1) infinite;
}
@keyframes blink {
50% {
opacity: 0;
}
}
/* placeholder art for projects without media yet */
.placeholder {
display: grid;
place-items: center;
aspect-ratio: var(--ratio, 16 / 10);
background:
linear-gradient(var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
linear-gradient(90deg, var(--line) 1px, transparent 1px) 0 0 / 24px 24px,
var(--bg-sunken);
color: var(--fg-muted);
font-family: var(--font-mono);
font-size: var(--step--1);
letter-spacing: 0.12em;
text-transform: uppercase;
}
}
@layer utilities {
.visually-hidden {
position: absolute !important;
width: 1px;
height: 1px;
overflow: hidden;
clip-path: inset(50%);
white-space: nowrap;
}
.mono {
font-family: var(--font-mono);
}
.muted {
color: var(--fg-muted);
}
.accent {
color: var(--accent);
}
.signal {
color: var(--signal);
}
.glow {
text-shadow: var(--glow);
}
}
@media (prefers-reduced-motion: reduce) {
*,
*::before,
*::after {
animation-duration: 0.01ms !important;
animation-iteration-count: 1 !important;
transition-duration: 0.01ms !important;
scroll-behavior: auto !important;
}
}
+22
View File
@@ -0,0 +1,22 @@
/* Daylight brutalism: cream paper, poured-ink borders, emerald + rust stamps. */
[data-theme='concrete'] {
color-scheme: light;
--bg: var(--cream-100);
--bg-raised: var(--cream-50);
--bg-sunken: var(--cream-300);
--fg: var(--ink-900);
--fg-muted: var(--peat-500);
--line: color-mix(in oklab, var(--ink-900) 25%, transparent);
--line-strong: var(--ink-900);
--accent: var(--emerald-700);
--accent-fg: var(--cream-50);
--signal: var(--rust-500);
--signal-fg: var(--ink-950);
--earth: var(--peat-700);
--border-w: 2px;
--radius: 0;
--grain: 0.12;
--scanlines: 0;
--glow: none;
}
+9
View File
@@ -0,0 +1,9 @@
/*
* Every theme lives in its own file and only overrides semantic tokens.
* To add one: copy terminal.css, rename the selector, import it here,
* and add its name to src/lib/themes.ts.
*/
@import './terminal.css';
@import './concrete.css';
@import './nostromo.css';
@import './overgrowth.css';
+23
View File
@@ -0,0 +1,23 @@
/* Ship's-computer amber on peat. Heavier CRT. */
[data-theme='nostromo'] {
color-scheme: dark;
--bg: var(--peat-900);
--bg-raised: color-mix(in oklab, var(--peat-900) 80%, var(--peat-700));
--bg-sunken: #170f09;
--fg: var(--rust-300);
--fg-muted: var(--peat-300);
--line: color-mix(in oklab, var(--rust-300) 22%, transparent);
--line-strong: var(--rust-400);
--accent: var(--rust-400);
--accent-fg: var(--peat-900);
--signal: var(--emerald-300);
--signal-fg: var(--peat-900);
--earth: var(--peat-500);
--font-body: var(--font-mono);
--border-w: 1px;
--radius: 0;
--grain: 0.08;
--scanlines: 1;
--glow: 0 0 0.7em color-mix(in oklab, var(--accent) 55%, transparent);
}
+22
View File
@@ -0,0 +1,22 @@
/* Moss over concrete: deep emerald, cream, rust. */
[data-theme='overgrowth'] {
color-scheme: dark;
--bg: var(--emerald-900);
--bg-raised: color-mix(in oklab, var(--emerald-900) 82%, var(--emerald-700));
--bg-sunken: #06211a;
--fg: var(--cream-50);
--fg-muted: var(--cream-300);
--line: color-mix(in oklab, var(--cream-50) 20%, transparent);
--line-strong: var(--cream-300);
--accent: var(--emerald-300);
--accent-fg: var(--emerald-900);
--signal: var(--rust-400);
--signal-fg: var(--ink-950);
--earth: var(--peat-300);
--border-w: 1px;
--radius: 0;
--grain: 0.1;
--scanlines: 0;
--glow: none;
}
+23
View File
@@ -0,0 +1,23 @@
/* Default. Night-shift terminal: ink, cream phosphor, emerald + rust signals. */
:root,
[data-theme='terminal'] {
color-scheme: dark;
--bg: var(--ink-900);
--bg-raised: var(--ink-800);
--bg-sunken: var(--ink-950);
--fg: var(--cream-100);
--fg-muted: var(--cream-500);
--line: color-mix(in oklab, var(--cream-100) 18%, transparent);
--line-strong: var(--cream-300);
--accent: var(--emerald-400);
--accent-fg: var(--ink-950);
--signal: var(--rust-500);
--signal-fg: var(--ink-950);
--earth: var(--peat-500);
--border-w: 1px;
--radius: 0;
--grain: 0.06;
--scanlines: 1;
--glow: 0 0 0.6em color-mix(in oklab, var(--accent) 45%, transparent);
}
+61
View File
@@ -0,0 +1,61 @@
/*
* Raw palette. Themes map these onto the semantic tokens below; components
* should only ever use the semantic ones (--bg, --fg, --accent, ...).
*/
:root {
--ink-950: #0a0c09;
--ink-900: #11140f;
--ink-800: #1a1e16;
--ink-700: #262b20;
--cream-50: #f4eedf;
--cream-100: #eae0c8;
--cream-300: #cfc1a0;
--cream-500: #a3967a;
--emerald-300: #63d6a0;
--emerald-400: #33b87c;
--emerald-500: #1c9a63;
--emerald-700: #0f5d3d;
--emerald-900: #0a3123;
--rust-300: #f7a86a;
--rust-400: #f08a3c;
--rust-500: #de6119;
--rust-700: #993e0b;
--peat-300: #a58063;
--peat-500: #6c4b34;
--peat-700: #3f2b1e;
--peat-900: #22170f;
/* type */
--font-display: 'Big Shoulders Variable', 'Arial Narrow', sans-serif;
--font-body: 'IBM Plex Sans Variable', system-ui, sans-serif;
--font-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', monospace;
--step--1: clamp(0.8rem, 0.78rem + 0.1vw, 0.875rem);
--step-0: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
--step-1: clamp(1.2rem, 1.13rem + 0.35vw, 1.4rem);
--step-2: clamp(1.5rem, 1.35rem + 0.75vw, 2rem);
--step-3: clamp(2rem, 1.7rem + 1.5vw, 3rem);
--step-4: clamp(2.75rem, 2.1rem + 3.2vw, 5rem);
--step-5: clamp(3.5rem, 2.3rem + 6vw, 8.5rem);
/* space */
--space-1: 0.25rem;
--space-2: 0.5rem;
--space-3: 0.75rem;
--space-4: 1rem;
--space-5: 1.5rem;
--space-6: 2rem;
--space-7: 3rem;
--space-8: 4.5rem;
--space-9: 7rem;
--gutter: clamp(1rem, 4vw, 2.5rem);
--max-w: 76rem;
--prose-w: 68ch;
--ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}
+11
View File
@@ -0,0 +1,11 @@
{
"extends": "astro/tsconfigs/strict",
"include": [".astro/types.d.ts", "**/*"],
"exclude": ["dist"],
"compilerOptions": {
"jsx": "react-jsx",
"jsxImportSource": "react",
"baseUrl": ".",
"paths": { "@/*": ["src/*"] }
}
}