Mirror to Gitea / mirror (push) Skipped
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.
379 lines
10 KiB
Plaintext
379 lines
10 KiB
Plaintext
---
|
|
import Base from '../layouts/Base.astro';
|
|
import Stamp from '../components/deco/Stamp.astro';
|
|
import { SITE } from '../lib/site';
|
|
import { Image, getImage } from 'astro:assets';
|
|
import hibiscus from '../assets/fx/hibiscus-toon.webp';
|
|
import botanical from '../assets/fx/botanical-riso.webp';
|
|
import back from '../assets/photos/postcard-back.jpg';
|
|
const year = new Date().getFullYear();
|
|
const fillBg = await getImage({ src: hibiscus, width: 900, format: 'webp' });
|
|
const backBg = await getImage({ src: back, width: 1200, format: 'webp' });
|
|
---
|
|
|
|
<Base title="Contact" description="Hire Johan Sandoval or get in touch." theme="postcard">
|
|
<section class="wrap section layout">
|
|
<div class="side stack">
|
|
<div class="greetings" aria-hidden="true" data-reveal="tilt">
|
|
<span class="from">Say hello!</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>
|
|
<h1 class="glitch" data-text="Get in touch">Get in touch</h1>
|
|
<p class="lead">
|
|
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.
|
|
</p>
|
|
<dl class="readout">
|
|
<dt>Email</dt>
|
|
<dd><a href={`mailto:${SITE.email}`}>{SITE.email}</a></dd>
|
|
<dt>Based in</dt>
|
|
<dd>{SITE.location} · open to remote</dd>
|
|
<dt>Status</dt>
|
|
<dd>{SITE.availability.text}</dd>
|
|
<dt>Résumé</dt>
|
|
<dd><a href={SITE.resume}>Download PDF</a></dd>
|
|
</dl>
|
|
</div>
|
|
|
|
<form class="card" method="post" action="/api/contact" style={`--back:url(${backBg.src})`}>
|
|
<div class="message">
|
|
<p class="hello">Hi Johan,</p>
|
|
<label class="msg">
|
|
<span class="visually-hidden">Message</span>
|
|
<textarea name="message" rows="9" required minlength="10" maxlength="5000" placeholder="Write your message here…"></textarea>
|
|
</label>
|
|
<div class="status" role="status" aria-live="polite"></div>
|
|
</div>
|
|
|
|
<div class="address">
|
|
<div class="top">
|
|
<div class="postmark" aria-hidden="true">
|
|
<span>Air mail</span>
|
|
<b>{year}</b>
|
|
<span>yoyos.sh</span>
|
|
</div>
|
|
<Stamp color="#fbf5e4" rotate={3} class="stamp">
|
|
<div class="stamp-art">
|
|
<Image src={botanical} alt="" widths={[160, 240]} sizes="7rem" />
|
|
<span>26¢</span>
|
|
</div>
|
|
</Stamp>
|
|
</div>
|
|
|
|
<label>
|
|
<span>From</span>
|
|
<input name="name" autocomplete="name" required maxlength="120" placeholder="Your name" />
|
|
</label>
|
|
<label>
|
|
<span>Reply to</span>
|
|
<input name="email" type="email" autocomplete="email" required maxlength="200" placeholder="you@company.com" />
|
|
</label>
|
|
<label>
|
|
<span>About</span>
|
|
<select name="reason">
|
|
<option value="hiring">A job opportunity</option>
|
|
<option value="freelance">A freelance project</option>
|
|
<option value="collab">A collaboration</option>
|
|
<option value="music">Music</option>
|
|
<option value="other">Something else</option>
|
|
</select>
|
|
</label>
|
|
<label class="hp" aria-hidden="true">
|
|
Leave this empty <input name="website" tabindex="-1" autocomplete="off" />
|
|
</label>
|
|
|
|
<button class="btn send" type="submit">Send message →</button>
|
|
</div>
|
|
</form>
|
|
</section>
|
|
</Base>
|
|
|
|
<style>
|
|
.layout {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
|
|
gap: var(--space-8);
|
|
align-items: start;
|
|
}
|
|
@media (max-width: 60rem) {
|
|
.layout {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
gap: var(--space-6);
|
|
}
|
|
}
|
|
.side {
|
|
--stack-gap: var(--space-5);
|
|
}
|
|
.greetings {
|
|
position: relative;
|
|
display: grid;
|
|
justify-items: center;
|
|
padding: 1rem 0.75rem 1.1rem;
|
|
background: #fbf5e4;
|
|
border: 2px solid #142033;
|
|
box-shadow: var(--shadow);
|
|
rotate: -2deg;
|
|
color: #142033;
|
|
overflow: hidden;
|
|
}
|
|
.from {
|
|
font-family: var(--ff-grotesk);
|
|
font-style: italic;
|
|
font-weight: 700;
|
|
font-size: clamp(1rem, 4vw, 1.3rem);
|
|
padding: 0.05rem 0.6rem;
|
|
background: var(--yellow);
|
|
border: 2px solid #142033;
|
|
rotate: -3deg;
|
|
z-index: 1;
|
|
}
|
|
.greetings .sparkle {
|
|
position: absolute;
|
|
}
|
|
.sp1 {
|
|
top: 0.6rem;
|
|
right: 1rem;
|
|
}
|
|
.sp2 {
|
|
bottom: 0.7rem;
|
|
left: 1.2rem;
|
|
}
|
|
.city {
|
|
font-family: var(--ff-mag);
|
|
font-size: clamp(2.5rem, 13.5vw, 6.4rem);
|
|
line-height: 0.9;
|
|
letter-spacing: -0.04em;
|
|
max-width: 100%;
|
|
text-transform: uppercase;
|
|
color: transparent;
|
|
background-size: cover;
|
|
background-position: center;
|
|
-webkit-background-clip: text;
|
|
background-clip: text;
|
|
-webkit-text-stroke: 2px #142033;
|
|
filter: drop-shadow(3px 3px 0 #e2321f);
|
|
}
|
|
h1 {
|
|
font-size: clamp(3.25rem, 8vw, 6rem);
|
|
line-height: 0.9;
|
|
}
|
|
.lead {
|
|
font-size: var(--step-1);
|
|
}
|
|
.readout a {
|
|
text-decoration-color: var(--accent);
|
|
}
|
|
|
|
.card {
|
|
display: grid;
|
|
grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
|
|
background:
|
|
linear-gradient(color-mix(in oklab, #fbf5e4 72%, transparent), color-mix(in oklab, #fbf5e4 72%, transparent)),
|
|
var(--back) center / cover,
|
|
#fbf5e4;
|
|
color: #142033;
|
|
border: 2px solid #142033;
|
|
box-shadow: var(--shadow);
|
|
rotate: -1deg;
|
|
--fg: #142033;
|
|
--fg-muted: #5b6577;
|
|
--line: #c9bfa6;
|
|
--line-strong: #142033;
|
|
}
|
|
@media (max-width: 40rem) {
|
|
.card {
|
|
grid-template-columns: minmax(0, 1fr);
|
|
rotate: 0deg;
|
|
}
|
|
}
|
|
.message {
|
|
display: grid;
|
|
align-content: start;
|
|
gap: var(--space-3);
|
|
padding: var(--space-5);
|
|
border-right: 2px dashed #c9bfa6;
|
|
}
|
|
@media (max-width: 40rem) {
|
|
.message {
|
|
border-right: 0;
|
|
border-bottom: 2px dashed #c9bfa6;
|
|
}
|
|
}
|
|
.hello {
|
|
font-family: var(--ff-grotesk);
|
|
font-weight: 700;
|
|
font-size: var(--step-1);
|
|
}
|
|
textarea {
|
|
width: 100%;
|
|
min-height: 16rem;
|
|
border: 0;
|
|
resize: vertical;
|
|
background: repeating-linear-gradient(transparent 0 calc(1.9rem - 1px), #c9bfa6 calc(1.9rem - 1px) 1.9rem);
|
|
line-height: 1.9rem;
|
|
color: #142033;
|
|
font-size: 1.05rem;
|
|
}
|
|
textarea:focus {
|
|
outline: none;
|
|
}
|
|
.address {
|
|
display: grid;
|
|
align-content: start;
|
|
gap: var(--space-4);
|
|
padding: var(--space-5);
|
|
}
|
|
.top {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: start;
|
|
gap: var(--space-3);
|
|
margin-bottom: var(--space-3);
|
|
}
|
|
.postmark {
|
|
display: grid;
|
|
place-items: center;
|
|
width: 6.5rem;
|
|
height: 6.5rem;
|
|
border: 3px double #b0302a;
|
|
border-radius: 50%;
|
|
color: #b0302a;
|
|
font-family: var(--ff-mono);
|
|
font-size: 0.62rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
rotate: -14deg;
|
|
opacity: 0.85;
|
|
padding-block: 0.8rem;
|
|
}
|
|
.postmark b {
|
|
font-family: var(--ff-grotesk);
|
|
font-size: 1.3rem;
|
|
line-height: 1;
|
|
}
|
|
.address :global(.stamp) {
|
|
width: 6.25rem;
|
|
}
|
|
.stamp-art {
|
|
position: relative;
|
|
background: #fbf5e4;
|
|
}
|
|
.stamp-art :global(img) {
|
|
width: 100%;
|
|
aspect-ratio: 4 / 5;
|
|
object-fit: cover;
|
|
object-position: center 30%;
|
|
}
|
|
.stamp-art span {
|
|
position: absolute;
|
|
left: 4px;
|
|
bottom: 2px;
|
|
font-family: var(--ff-grotesk);
|
|
font-weight: 800;
|
|
font-size: 0.9rem;
|
|
color: #b0302a;
|
|
}
|
|
label {
|
|
display: grid;
|
|
gap: 2px;
|
|
}
|
|
label > span {
|
|
font-family: var(--ff-mono);
|
|
font-size: 0.7rem;
|
|
text-transform: uppercase;
|
|
letter-spacing: 0.08em;
|
|
color: #5b6577;
|
|
}
|
|
input,
|
|
select {
|
|
width: 100%;
|
|
min-height: 44px;
|
|
font-size: 1rem;
|
|
padding: 0.35rem 0;
|
|
border: 0;
|
|
border-bottom: 2px solid #142033;
|
|
background: transparent;
|
|
color: #142033;
|
|
}
|
|
input:focus,
|
|
select:focus,
|
|
textarea:focus-visible {
|
|
outline: none;
|
|
border-color: var(--cobalt);
|
|
box-shadow: 0 2px 0 var(--cobalt);
|
|
}
|
|
.send {
|
|
justify-self: stretch;
|
|
justify-content: center;
|
|
min-height: 48px;
|
|
margin-top: var(--space-3);
|
|
--btn-bg: #142033;
|
|
--btn-fg: #fbf5e4;
|
|
--btn-line: #142033;
|
|
}
|
|
.send:hover {
|
|
--btn-bg: var(--yellow);
|
|
--btn-fg: #142033;
|
|
}
|
|
.hp {
|
|
position: absolute;
|
|
left: -10000px;
|
|
}
|
|
.status:empty {
|
|
display: none;
|
|
}
|
|
.status {
|
|
padding: var(--space-2) var(--space-3);
|
|
border: 2px solid currentColor;
|
|
font-weight: 600;
|
|
}
|
|
.status.ok {
|
|
color: var(--grass);
|
|
}
|
|
.status.err {
|
|
color: #b0302a;
|
|
}
|
|
</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 = 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 = 'Sending…';
|
|
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 message →';
|
|
}
|
|
});
|
|
}
|
|
document.addEventListener('astro:page-load', setup);
|
|
</script>
|