97 lines
2.8 KiB
HTML
97 lines
2.8 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en">
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||
<title>HighFive Counter - Ritz Framework</title>
|
||
<link rel="stylesheet" href="../runtime/ritz-debug.css">
|
||
<style>
|
||
body {
|
||
font-family: system-ui, sans-serif;
|
||
background: #f5f5f5;
|
||
}
|
||
#app {
|
||
max-width: 800px;
|
||
margin: 50px auto;
|
||
padding: 40px;
|
||
background: white;
|
||
border-radius: 8px;
|
||
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
|
||
}
|
||
.high-five-app {
|
||
text-align: center;
|
||
}
|
||
.high-five-app p {
|
||
font-size: 18px;
|
||
margin: 15px 0;
|
||
color: #333;
|
||
}
|
||
.high-five-app .count {
|
||
font-size: 48px;
|
||
font-weight: bold;
|
||
color: #0066cc;
|
||
margin: 30px 0;
|
||
}
|
||
.high-five-app button {
|
||
font-size: 18px;
|
||
padding: 15px 40px;
|
||
background: #0066cc;
|
||
color: white;
|
||
border: none;
|
||
border-radius: 8px;
|
||
cursor: pointer;
|
||
transition: all 0.2s;
|
||
}
|
||
.high-five-app button:hover {
|
||
background: #0052a3;
|
||
transform: scale(1.05);
|
||
}
|
||
.high-five-app button:active {
|
||
transform: scale(0.98);
|
||
}
|
||
</style>
|
||
</head>
|
||
<body>
|
||
<div id="app"></div>
|
||
|
||
<div id="ritz-debug" class="ritz-debug hidden">
|
||
<div class="debug-header">
|
||
<h3>🎭 Ritz Debug</h3>
|
||
<button onclick="ritzDebug.toggle()">×</button>
|
||
</div>
|
||
<div id="status" class="status">Loading...</div>
|
||
<div class="debug-content">
|
||
<div class="debug-section">
|
||
<h4>Component</h4>
|
||
<pre>HighFive.py (Reactive Signals)</pre>
|
||
</div>
|
||
<div class="debug-section">
|
||
<h4>Features</h4>
|
||
<pre>✓ Signal in WASM memory
|
||
✓ Event handlers
|
||
✓ Reactive updates</pre>
|
||
</div>
|
||
<div class="debug-section">
|
||
<h4>Console Commands</h4>
|
||
<pre>ritzRuntime.getLog()
|
||
ritzInstance.exports.get_high_fives()
|
||
ritzInstance.exports.increment()</pre>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<script src="../runtime/ritz-runtime.js"></script>
|
||
<script src="../runtime/ritz-debug.js"></script>
|
||
<script>
|
||
// Wait for DOM to be ready
|
||
if (document.readyState === 'loading') {
|
||
document.addEventListener('DOMContentLoaded', () => {
|
||
new RitzLoader().load('HighFive.wasm', 'HighFive');
|
||
});
|
||
} else {
|
||
new RitzLoader().load('HighFive.wasm', 'HighFive');
|
||
}
|
||
</script>
|
||
</body>
|
||
</html>
|