Skip to content

Commit 2a7e63e

Browse files
Dale-Blackclaude
andcommitted
Playground: match warm theme, add capability warning, style cleanup
- Playground CSS: warm neutral palette + Julia Purple accent (was catppuccin blue) - Homepage: warning note explaining browser playground is a subset of full JST with links to API (50+ operations) and Getting Started for full transpiler - Playground container: rounded-xl border with shadow for visual distinction - iframe border-radius matches container Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f18feef commit 2a7e63e

2 files changed

Lines changed: 26 additions & 13 deletions

File tree

docs/src/playground/index.html

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@
66
<title>Julia Playground — JavaScriptTarget.jl</title>
77
<style>
88
:root {
9-
--bg: #1e1e2e;
10-
--surface: #282840;
11-
--border: #3e3e5e;
12-
--text: #cdd6f4;
13-
--text-dim: #888;
14-
--accent: #89b4fa;
15-
--accent-hover: #74a8fc;
16-
--green: #a6e3a1;
17-
--red: #f38ba8;
18-
--yellow: #f9e2af;
9+
--bg: #1a1918;
10+
--surface: #252422;
11+
--border: #3a3835;
12+
--text: #d4d0c8;
13+
--text-dim: #8a8680;
14+
--accent: #9558b2;
15+
--accent-hover: #a96bc5;
16+
--green: #389826;
17+
--red: #cb3c33;
18+
--yellow: #f0c040;
1919
}
2020

2121
* { margin: 0; padding: 0; box-sizing: border-box; }

docs/src/routes/index.jl

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,22 @@ println(result.js) # Clean JS output""")
4444
# Live Playground
4545
Div(:class => "space-y-4",
4646
H2(:class => "text-xl font-semibold text-warm-800 dark:text-warm-200 text-center", "Try it Live"),
47-
P(:class => "text-sm text-warm-600 dark:text-warm-400 text-center", "Write Julia in the left panel — see transpiled JavaScript on the right. Runs entirely in your browser."),
48-
Div(:class => "w-full rounded-lg overflow-hidden border border-warm-200 dark:border-warm-800",
49-
RawHtml("""<iframe src="./playground/index.html" style="width:100%;height:500px;border:none;" title="JST Playground"></iframe>""")
47+
P(:class => "text-sm text-warm-600 dark:text-warm-400 text-center",
48+
"Write Julia on the left — see transpiled JavaScript on the right. Runs entirely in your browser."),
49+
# Warning: browser playground vs full JST
50+
Div(:class => "mx-auto max-w-3xl px-4 py-3 rounded-lg border border-accent-300 dark:border-accent-700 bg-accent-50 dark:bg-accent-950/30 text-sm text-warm-700 dark:text-warm-300",
51+
P(
52+
Strong(:class => "text-accent-600 dark:text-accent-400", "Note: "),
53+
"This is a lightweight browser-only playground with a subset of JST's capabilities. ",
54+
"The full ", Code(:class => "text-accent-500", "JavaScriptTarget.jl"),
55+
" package runs in Julia and supports the complete transpilation pipeline — arrays, broadcasting, structs, closures, package registry, and ",
56+
A(:href => "./api/", :class => "text-accent-500 hover:text-accent-600 underline", "50+ Julia operations"),
57+
". See the ", A(:href => "./getting-started/", :class => "text-accent-500 hover:text-accent-600 underline", "Getting Started"),
58+
" guide to use the full transpiler."
59+
)
60+
),
61+
Div(:class => "w-full rounded-xl overflow-hidden border-2 border-warm-300 dark:border-warm-700 shadow-lg",
62+
RawHtml("""<iframe src="./playground/index.html" style="width:100%;height:480px;border:none;border-radius:0.75rem;" title="JST Playground"></iframe>""")
5063
)
5164
),
5265

0 commit comments

Comments
 (0)