Skip to content

Commit ed3b513

Browse files
committed
Homepage: wire up hero-editor textarea and hero-preview div
1 parent 002d22f commit ed3b513

1 file changed

Lines changed: 14 additions & 27 deletions

File tree

index.html

Lines changed: 14 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -177,37 +177,24 @@
177177

178178
<div class="page-body">
179179
<div class="main">
180-
<div class="left">
181-
<pre style="font-family:monospace;font-size:11.5px;color:#555;line-height:1.7;background:#f8f8f8;padding:1.2rem 1.4rem;border-radius:8px;border:1px solid #e0e0e0;overflow:hidden;"><code>enum PartType {
182-
HALF_O, PLUS, PLUS_SHADOW
183-
};
184-
struct Part {
185-
PartType type;
186-
float x, y, rot, r, t, s;
187-
color col;
188-
};
189-
Part parts[] = {
190-
{PLUS_SHADOW, 411,340,-0.5f,
191-
0,55,170, color(190,145,85)},
192-
{HALF_O, 261,344,0,
193-
180,70,0, color(255,210,60)},
194-
{PLUS, 319,348,-0.5f,
195-
0,55,170, color(255,210,60)},
196-
};
197-
void setup() { size(600,700); noLoop(); }
198-
void draw() {
199-
background(255);
200-
for (auto& p : parts) show(p);
201-
}</code></pre>
202-
<div class="hero-actions" style="margin-top:1rem;">
180+
<div class="left" style="display:flex;flex-direction:column;gap:0.75rem;min-width:0;flex:1;">
181+
<div style="border:1px solid #e0e0e0;border-radius:8px;overflow:hidden;box-shadow:0 2px 8px rgba(0,0,0,0.06);">
182+
<div style="background:#f5f5f5;border-bottom:1px solid #e0e0e0;padding:6px 12px;display:flex;align-items:center;gap:8px;">
183+
<span style="font-family:monospace;font-size:11px;color:#888;flex:1;">sketch.cpp</span>
184+
<button id="hero-run-btn" style="background:#e8b400;color:#111;border:none;padding:4px 14px;border-radius:4px;font-size:12px;font-weight:700;cursor:pointer;">&#9654; Run</button>
185+
</div>
186+
<textarea id="hero-editor"></textarea>
187+
</div>
188+
<div class="hero-actions">
203189
<a class="hero-link" href="/reference">Reference</a>
204190
<a class="hero-btn-download" href="/downloads">Download</a>
205191
</div>
206-
<p style="margin-top:1rem;font-size:0.8rem;color:#aaa;">Independently developed by Jose Gonzalez Llamas</p>
192+
<p style="font-size:0.8rem;color:#aaa;">Independently developed by Jose Gonzalez Llamas</p>
207193
</div>
208-
<div class="right" style="flex:1;display:flex;align-items:center;justify-content:flex-end;">
209-
<div style="width:320px;height:380px;position:relative;overflow:hidden;border-radius:8px;box-shadow:0 4px 24px rgba(0,0,0,0.08);flex-shrink:0;">
210-
<iframe sandbox="allow-scripts allow-same-origin"
194+
<div class="right" style="display:flex;align-items:center;gap:0.75rem;flex-shrink:0;">
195+
<svg width="36" height="36" viewBox="0 0 36 36"><path d="M4 18L28 18M20 10L28 18L20 26" stroke="#e8b400" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" fill="none"/></svg>
196+
<div id="hero-preview" style="width:320px;height:380px;position:relative;overflow:hidden;border-radius:8px;box-shadow:0 4px 24px rgba(0,0,0,0.08);flex-shrink:0;background:#fff;">
197+
<iframe id="hero-iframe" sandbox="allow-scripts allow-same-origin"
211198
style="position:absolute;top:0;left:0;width:600px;height:700px;border:none;transform-origin:top left;transform:scale(0.533);"
212199
src="/assets/logo_sketch.html"></iframe>
213200
</div>

0 commit comments

Comments
 (0)