-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
75 lines (62 loc) · 3.38 KB
/
index.html
File metadata and controls
75 lines (62 loc) · 3.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Code Bot</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<div class="header-banner">Code Bot</div>
<!-- Navigation Tabs -->
<div class="tabs-container">
<button id="ai-gen-btn" class="tab-btn active" onclick="switchSection('ai-gen')">AI Gen</button>
<button id="mic-mode-btn" class="tab-btn" onclick="switchSection('mic-mode')">Mic Mode</button>
<button id="explainer-btn" class="tab-btn" onclick="switchSection('explainer')">Explainer</button>
<button id="live-preview-btn" class="tab-btn" onclick="switchSection('live-preview')">Live Preview</button>
</div>
<!-- AI Gen Section -->
<div id="ai-gen-section" class="app-section">
<textarea id="codePrompt" placeholder="Write a python loop or type your request..."></textarea>
<button class="primary-btn" onclick="generateCode()">Generate Code</button>
<div class="output-header">
<span>Generated Code:</span>
<button class="copy-btn" onclick="copyText('generatedCodeOutput')">Copy Code</button>
</div>
<textarea id="generatedCodeOutput" readonly placeholder="Your generated code will appear here..."></textarea>
</div>
<!-- Mic Mode Section -->
<div id="mic-mode-section" class="app-section">
<p class="status-text">SPEAK IN URDU, HINDI, OR ENGLISH:</p>
<button class="primary-btn voice-btn" onclick="startVoiceRecord()">🎤 Start Recording</button>
<div class="output-header">
<span>Voice Code Output:</span>
<button class="copy-btn" onclick="copyText('voiceCodeOutput')">Copy Code</button>
</div>
<textarea id="voiceCodeOutput" readonly placeholder="Code from voice command will appear here..."></textarea>
</div>
<!-- Explainer Section -->
<div id="explainer-section" class="app-section">
<textarea id="explainInput" placeholder="Paste any language code here (Python, JS, HTML etc.)..."></textarea>
<button class="primary-btn" onclick="explainCode()">Explain Code</button>
<div class="output-header">
<span>Translation & Logic Breakdown:</span>
<button class="copy-btn" onclick="copyText('explainOutput')">Copy Explanation</button>
</div>
<textarea id="explainOutput" readonly placeholder="The code analysis will appear here..."></textarea>
</div>
<!-- Live Preview Section -->
<div id="live-preview-section" class="app-section">
<p class="status-text">TYPE/PASTE HTML BELOW AND PRESS THE BIG BUTTON TO CHECK LIVE OUTPUT:</p>
<div class="output-header">
<span>Live Code Editor:</span>
<button class="copy-btn" onclick="copyText('previewCodeEditor')">Copy Editor Code</button>
</div>
<textarea id="previewCodeEditor" placeholder="Example: <div><h1>Hello World</h1></div>"></textarea>
<button class="primary-btn render-btn" onclick="runPreview()">⚡ Auto-Correct & Render Preview</button>
<p class="status-text center-text">Click the red button above to render code!</p>
<div id="liveRenderOutput" class="result-box"></div>
</div>
<script src="script.js"></script>
</body>
</html>