-
Notifications
You must be signed in to change notification settings - Fork 0
/
pythoneditor.html
131 lines (106 loc) · 3.03 KB
/
pythoneditor.html
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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="preconnect" href="https://fonts.gstatic.com" />
<link
href="https://fonts.googleapis.com/css2?family=Source+Code+Pro&display=swap"
rel="stylesheet"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/css/materialize.min.css"
/>
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/1.0.0/js/materialize.min.js"></script>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.min.css"
/>
<link
rel="stylesheet"
href="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/theme/base16-dark.css"
/>
<link
href="https://fonts.googleapis.com/icon?family=Material+Icons"
rel="stylesheet"
/>
<style>
body,
html {
height: 100vh;
box-sizing: border-box;
background-color: gray;
}
.CodeMirror {
border: 1px solid gray;
height: 90vh;
font-size: 16px;
}
#python-out {
border: 1px solid gray;
height: 90vh;
overflow-y: auto;
font-size: 16px;
background-color: black;
padding-left: 30px;
padding-top: 10px;
box-sizing: border-box;
color: lightgreen;
font-family: 'Source Code Pro', monospace;
animation-duration: 1.0s;
animation-name: colorthing;
animation-iteration-count: infinite;
animation-direction: alternate;
}
@keyframes colorthing {
from {
color: rgb(0, 255, 0);
}
to {
color: rgb(14, 161, 14);
}
}
.btn {
margin-top: 12px;
margin-left: 10px;
}
</style>
<script type="text/javascript">
window.languagePluginUrl =
"https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/";
</script>
<script src="https://cdn.jsdelivr.net/pyodide/v0.17.0a2/full/pyodide.js"></script>
<title>PyRunBrowser</title>
</head>
<body>
<center class="row">
<a class="waves-effect waves-light btn" id="run-btn"
><i class="material-icons right">code</i>Run</a>
<a class="waves-effect waves-light btn" href="https://ritabratamaiti.github.io/ritabratamaiti/" target="_blank"><i class="material-icons right">cloud</i>About Me!</a>
</center>
<br />
<div class="row">
<div class="col s6">
<textarea
name="codearea"
id="codearea"
cols="30"
rows="100"
></textarea>
</div>
<div class="col s6">
<div id="python-out" style="white-space: pre-line"></div>
</div>
</div>
<script src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.48.4/codemirror.js"></script>
<script
src="https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.60.0/mode/python/python.min.js"
integrity="sha512-jKm248sXyXbgbigmg1qdHZ7sKnQwpI2CW4Bv1DXbWHWcXRw7nafIjv8dxhbdt5wS0JGrwjxj+hBUEseM/PnjUA=="
crossorigin="anonymous"
></script>
<script src="./js/app.js"></script>
</body>
</html>