79cd9c08d8
- Bulk replace Clojure/Nim → Bara Lang in src/, lib/, examples/, benchmarks/, experiments/, books/, LICENSE, cljnim.nimble, PLAN.md, AI_AGENT.md - Rename book chapters: 05-clojure-nim.md → 05-bara-lang.md (en + bg) - Update all chapter index links and anchors - Replace project-specific 'Clojure' references with 'Bara Lang' in experiments/, src/ai_assist.nim, src/tui_screens.nim, src/emitter.nim, src/reader.nim, src/types.nim, lib/cljnim_runtime*.nim - Keep legitimate JVM Clojure/ClojureScript/Clojure CLR references intact
51 lines
2.0 KiB
HTML
51 lines
2.0 KiB
HTML
<!DOCTYPE html>
|
|
<html>
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<title>Bara Lang → JS Demo</title>
|
|
<style>
|
|
body { font-family: monospace; max-width: 800px; margin: 40px auto; padding: 20px; background: #1a1a2e; color: #eee; }
|
|
h1 { color: #e94560; }
|
|
.result { background: #16213e; padding: 15px; margin: 10px 0; border-radius: 5px; }
|
|
.label { color: #0f3460; font-weight: bold; }
|
|
button { background: #e94560; color: white; border: none; padding: 10px 20px; cursor: pointer; border-radius: 3px; }
|
|
button:hover { background: #ff6b6b; }
|
|
input { padding: 8px; font-size: 16px; border-radius: 3px; border: 1px solid #0f3460; background: #16213e; color: white; }
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>🔥 Bara Lang → JavaScript</h1>
|
|
<p>Bara Lang code compiled to Nim, then to JavaScript. Running in your browser.</p>
|
|
|
|
<div class="result">
|
|
<div class="label">square(7)</div>
|
|
<div id="square-result">Click button to calculate</div>
|
|
<br>
|
|
<button onclick="document.getElementById('square-result').textContent = jsSquare(7)">Calculate</button>
|
|
</div>
|
|
|
|
<div class="result">
|
|
<div class="label">factorial(5)</div>
|
|
<div id="fact-result">Click button to calculate</div>
|
|
<br>
|
|
<button onclick="document.getElementById('fact-result').textContent = jsFactorial(5)">Calculate</button>
|
|
</div>
|
|
|
|
<div class="result">
|
|
<div class="label">greet("World")</div>
|
|
<div id="greet-result">Click button to greet</div>
|
|
<br>
|
|
<button onclick="document.getElementById('greet-result').textContent = jsGreet('World')">Greet</button>
|
|
</div>
|
|
|
|
<div class="result">
|
|
<div class="label">Interactive: factorial of</div>
|
|
<input type="number" id="n-input" value="10" min="0" max="20">
|
|
<button onclick="document.getElementById('interactive-result').textContent = jsFactorial(parseInt(document.getElementById('n-input').value))">Compute</button>
|
|
<div id="interactive-result" style="margin-top:10px;"></div>
|
|
</div>
|
|
|
|
<script src="../build/math.js"></script>
|
|
</body>
|
|
</html>
|