- Created a new HTML page (`index.html`) for the interactive LLM context builder, allowing users to select and combine different `crawl4ai` context files. - Implemented JavaScript functionality (`llmtxt.js`) to manage component selection, context types, and file downloads. - Added CSS styles (`llmtxt.css`) for a terminal-themed UI. - Introduced a new Markdown file (`build.md`) detailing the requirements and functionality of the context builder. - Updated the navigation in `mkdocs.yml` to include links to the new context builder and demo apps. - Added a new Markdown file (`why.md`) explaining the motivation behind the new context structure and its benefits for AI coding assistants.
69 lines
2.1 KiB
HTML
69 lines
2.1 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
<head>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<title>Blockly Test</title>
|
|
<style>
|
|
body {
|
|
margin: 0;
|
|
padding: 20px;
|
|
background: #0e0e10;
|
|
color: #e0e0e0;
|
|
font-family: monospace;
|
|
}
|
|
#blocklyDiv {
|
|
height: 600px;
|
|
width: 100%;
|
|
border: 1px solid #2a2a2c;
|
|
}
|
|
#output {
|
|
margin-top: 20px;
|
|
padding: 15px;
|
|
background: #1a1a1b;
|
|
border: 1px solid #2a2a2c;
|
|
white-space: pre-wrap;
|
|
}
|
|
</style>
|
|
</head>
|
|
<body>
|
|
<h1>C4A-Script Blockly Test</h1>
|
|
<div id="blocklyDiv"></div>
|
|
<div id="output">
|
|
<h3>Generated C4A-Script:</h3>
|
|
<pre id="code-output"></pre>
|
|
</div>
|
|
|
|
<script src="https://unpkg.com/blockly/blockly.min.js"></script>
|
|
<script src="assets/c4a-blocks.js"></script>
|
|
<script>
|
|
// Simple test
|
|
const workspace = Blockly.inject('blocklyDiv', {
|
|
toolbox: `
|
|
<xml>
|
|
<category name="Test" colour="#1E88E5">
|
|
<block type="c4a_go"></block>
|
|
<block type="c4a_wait_time"></block>
|
|
<block type="c4a_click"></block>
|
|
</category>
|
|
</xml>
|
|
`,
|
|
theme: Blockly.Theme.defineTheme('dark', {
|
|
'base': Blockly.Themes.Classic,
|
|
'componentStyles': {
|
|
'workspaceBackgroundColour': '#0e0e10',
|
|
'toolboxBackgroundColour': '#1a1a1b',
|
|
'toolboxForegroundColour': '#e0e0e0',
|
|
'flyoutBackgroundColour': '#1a1a1b',
|
|
'flyoutForegroundColour': '#e0e0e0',
|
|
}
|
|
})
|
|
});
|
|
|
|
workspace.addChangeListener((event) => {
|
|
const code = Blockly.JavaScript.workspaceToCode(workspace);
|
|
document.getElementById('code-output').textContent = code;
|
|
});
|
|
</script>
|
|
</body>
|
|
</html> |