- Reveal: in-viewport [data-sc-reveal]/schematic elements now reveal on the
first animation frame (getBoundingClientRect pass) and the safety-net timer
drops 1600ms -> 400ms (under the 1500ms capture settle). Fixes the ~10%
opacity above-the-fold KPI row + benchmark table and the washed-out About
"Recent releases" console, in both modes and for no-JS/no-scroll.
- Fonts: @font-face for Space Grotesk / Inter / JetBrains Mono against the
served /templates/scifi-clean/fonts/*.woff2 paths + typography refs in all
four presets (bundled_fonts is CMS dead code). --font-heading now resolves
to Space Grotesk live.
- Lexer trap: contact-form CSS `){#` -> `){ #` (was failing whole-theme
registration: "Newline not permitted in a single-line comment").
- Seed: set `title` so the navbar/site title shows "Halcyon Robotics" (was
leaking the gallery instance name); expanded the control-loop article to
~10 paragraphs to kill the footer dead space.
- SVG guard: explicit width/height on the <use> icon SVGs.
- Wave B gallery screenshots (home/about/article x light+dark), preview
= light home (light-canonical).
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
35 lines
4.0 KiB
Plaintext
35 lines
4.0 KiB
Plaintext
{# contact-form override — server-driven; block-id resolution, {% form %} wiring, honeypot, and field loop copied verbatim from the builtin, reskinned with sc-form primitives. #}
|
|
{% with bid=_block_id|default:context.blockId %}
|
|
<section id="contact-form-{{ bid }}" class="sc-section {{ class }}"><div class="sc-content-well" style="max-width:640px;">
|
|
{% if form.submitted %}
|
|
<div class="sc-card sc-card-accent sc-alert-ok" style="text-align:center;padding:2rem;">
|
|
<span class="sc-mark sc-mark-circle" aria-hidden="true" style="display:inline-block;margin-bottom:1rem;"></span>
|
|
<p class="sc-display" style="margin:0;font-size:1.125rem;">{{ form.message|default:successMessage|default:"Thanks — your message has been sent." }}</p>
|
|
</div>
|
|
{% else %}
|
|
{% if heading %}<h2 class="sc-heading" style="font-size:clamp(1.75rem, 3vw, 2.25rem);margin:0 0 0.75rem 0;"><span class="sc-heading-h2-accent">{{ heading }}</span></h2>{% endif %}
|
|
{% if description %}<p class="sc-lede" style="margin:0 0 2rem 0;color:hsl(var(--muted-foreground));">{{ description }}</p>{% endif %}
|
|
{% if form.errors._form %}<div class="sc-alert-err" style="margin-bottom:1.5rem;border:1px solid hsl(var(--destructive));border-radius:4px;padding:0.75rem 1rem;font-size:0.875rem;color:hsl(var(--destructive));background:hsl(var(--destructive) / 0.08);">{{ form.errors._form }}</div>{% endif %}
|
|
{% with formAction="/api/blocks/"|add:bid|add:"/submit" formTarget="#contact-form-"|add:bid %}
|
|
{% form action=formAction hx_target=formTarget hx_swap="outerHTML" class="sc-form-grid" %}
|
|
{% for field in fields %}
|
|
<div class="sc-field {% if field.width == "half" %}{% else %}sc-field--full{% endif %}">
|
|
{% if field.label %}<label class="sc-label" for="cf-{{ bid }}-{{ field.name }}">{{ field.label }}{% if field.required %} <span style="color:hsl(var(--destructive));">*</span>{% endif %}</label>{% endif %}
|
|
{% if field.type == "textarea" %}
|
|
<textarea id="cf-{{ bid }}-{{ field.name }}" name="{{ field.name }}" rows="5"{% if field.required %} required{% endif %}{% if field.placeholder %} placeholder="{{ field.placeholder }}"{% endif %} class="sc-input"></textarea>
|
|
{% elif field.type == "select" %}
|
|
<select id="cf-{{ bid }}-{{ field.name }}" name="{{ field.name }}"{% if field.required %} required{% endif %} class="sc-input">{% if field.placeholder %}<option value="">{{ field.placeholder }}</option>{% endif %}{% for opt in field.options %}<option value="{{ opt.value }}">{{ opt.label|default:opt.value }}</option>{% endfor %}</select>
|
|
{% else %}
|
|
<input id="cf-{{ bid }}-{{ field.name }}" name="{{ field.name }}" type="{{ field.type|default:"text" }}"{% if field.required %} required{% endif %}{% if field.placeholder %} placeholder="{{ field.placeholder }}"{% endif %} class="sc-input">
|
|
{% endif %}
|
|
</div>
|
|
{% endfor %}
|
|
<div class="sc-field--full" aria-hidden="true" style="display:none;"><label>Leave this field empty<input type="text" name="website" tabindex="-1" autocomplete="off"></label></div>
|
|
<div class="sc-field--full"><button type="submit" class="sc-btn-primary">{{ submitLabel|default:"Send message" }}</button></div>
|
|
{% endform %}
|
|
{% endwith %}
|
|
{% endif %}
|
|
</div></section>
|
|
<style>#contact-form-{{ bid }} .sc-form-grid{display:grid;grid-template-columns:repeat(2, minmax(0, 1fr));gap:1.25rem;margin-top:2rem;}@media (max-width:640px){ #contact-form-{{ bid }} .sc-form-grid{grid-template-columns:1fr;}}#contact-form-{{ bid }} .sc-field--full{grid-column:1 / -1;}#contact-form-{{ bid }} .sc-label{display:block;margin-bottom:0.375rem;font-size:0.8125rem;font-weight:500;color:hsl(var(--foreground));font-family:var(--font-heading, "Inter Tight", "Inter", system-ui, sans-serif);}#contact-form-{{ bid }} .sc-input{width:100%;padding:0.5rem 0.75rem;font-size:0.9375rem;font-family:var(--font-body, "Inter", system-ui, sans-serif);color:hsl(var(--foreground));background:hsl(var(--background));border:1px solid hsl(var(--input));border-radius:4px;box-sizing:border-box;}#contact-form-{{ bid }} .sc-input:focus{outline:2px solid hsl(var(--ring));outline-offset:1px;}</style>
|
|
{% endwith %}
|