-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.html
More file actions
110 lines (103 loc) · 4.4 KB
/
Copy pathindex.html
File metadata and controls
110 lines (103 loc) · 4.4 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
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Simple Programming Language - Online IDE</title>
<link rel="stylesheet" href="style.css">
<script src="https://cdn.jsdelivr.net/pyodide/v0.24.1/full/pyodide.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.js"></script>
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/codemirror.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/theme/monokai.min.css">
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.65.2/mode/python/python.min.js"></script>
</head>
<body>
<div class="container">
<header class="header">
<h1>Simple Programming Language - Online IDE</h1>
<div id="status" class="status">Loading Pyodide...</div>
<div class="toolbar">
<button id="run-btn" class="btn-run" disabled>
<span class="btn-icon">▶</span>
Run Code
</button>
<button id="clear-btn" class="btn-clear">
<span class="btn-icon">🗑</span>
Clear Output
</button>
<button id="example-btn" class="btn-example">
<span class="btn-icon">📝</span>
Load Example
</button>
</div>
</header>
<div class="ide-container">
<div class="editor-panel">
<div class="panel-header">
<h3>Code Editor</h3>
<span class="panel-info">Write your SPL code here</span>
</div>
<div class="editor-container">
<textarea id="code-editor" placeholder="# Write your Simple Programming Language code here
# Examples:
x = 5
y = x + 3
print(x + y)
if x > 0:
print("x is positive")
while x < 10:
x = x + 1
print(x)"></textarea>
</div>
</div>
<div class="divider"></div>
<div class="output-panel">
<div class="panel-header">
<h3>Output</h3>
<span class="panel-info">Program output appears here</span>
</div>
<div class="output-container">
<div id="output" class="output">
<div class="welcome-output">
<p>🚀 Simple Programming Language IDE</p>
<p>Write code on the left, click "Run Code" to execute.</p>
<p>Supported features: variables, arithmetic, if/while statements, print function</p>
<hr>
</div>
</div>
</div>
</div>
</div>
<div class="help-section">
<h3>Language Features:</h3>
<div class="features-grid">
<div class="feature">
<strong>Variables:</strong>
<code>x = 5</code>
</div>
<div class="feature">
<strong>Arithmetic:</strong>
<code>x + y * 2</code>
</div>
<div class="feature">
<strong>Print:</strong>
<code>print("hello")</code>
</div>
<div class="feature">
<strong>If statements:</strong>
<code>if x > 0: ...</code>
</div>
<div class="feature">
<strong>While loops:</strong>
<code>while x < 10: ...</code>
</div>
<div class="feature">
<strong>Strings:</strong>
<code>"hello world"</code>
</div>
</div>
</div>
</div>
<script src="script.js"></script>
</body>
</html>