Skip to content

Commit 913bfd3

Browse files
authored
Add files via upload
1 parent 4dc45f2 commit 913bfd3

File tree

7 files changed

+174
-0
lines changed

7 files changed

+174
-0
lines changed

SnakeEdit.png

23.4 KB
Loading

code_editor.html

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>SnakeEdit</title>
7+
<link rel="icon" href="logo.jpg">
8+
<script src="https://cdn.jsdelivr.net/npm/[email protected]/brython.min.js" integrity="sha256-5S+uyI6JXTLNxOAgBefqpfBerBAl/sgb8DYOmGvBrE0=" crossorigin="anonymous"></script>
9+
<link rel="stylesheet" href="style.css">
10+
</head>
11+
<body onload="brython()">
12+
<div id="editor">
13+
<textarea id="python-code" placeholder="Write your Python code here..."></textarea>
14+
<button id="run-button">
15+
<span class="run-icon">&#9658;</span> Run Code
16+
</button>
17+
</div>
18+
19+
<script type="text/python">
20+
from browser import document
21+
22+
def run_python(event):
23+
try:
24+
exec(document["python-code"].value)
25+
except Exception as e:
26+
print("Error: " + str(e))
27+
document["run-button"].bind("click", run_python)
28+
</script>
29+
</body>
30+
</html>

intro.css

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
body {
2+
margin: 0;
3+
padding: 0;
4+
background-color: black;
5+
font-family: Verdana, Geneva, Tahoma, sans-serif;
6+
color: white;
7+
text-align: center;
8+
}
9+
10+
i {
11+
color: green;
12+
}
13+
14+
#logo {
15+
height: 100px;
16+
width: 100px;
17+
border: none;
18+
outline: none;
19+
border-radius: 50%;
20+
}
21+
22+
#intro {
23+
display: flex;
24+
padding: 20px;
25+
}
26+
27+
#gs {
28+
font-family: Verdana, Geneva, Tahoma, sans-serif;
29+
height: 50px;
30+
width: 200px;
31+
background-color: green;
32+
color: white;
33+
font-size: 20px;
34+
font-weight: bold;
35+
border: none;
36+
outline: none;
37+
border-radius: 10px;
38+
transition: all 1s ease;
39+
}
40+
41+
#gs:hover {
42+
transform: scale(1.5);
43+
cursor: pointer;
44+
}
45+
46+
#preview_img {
47+
height: 280px;
48+
width: 500px;
49+
transform: translate(250px, 10px);
50+
}
51+
52+
#g_img {
53+
height: 100px;
54+
width: 100px;
55+
border: none;
56+
outline: none;
57+
border-radius: 50%;
58+
}
59+
60+
#github-osource {
61+
border: 5px solid white;
62+
margin: 0 auto;
63+
width: 500px;
64+
border-radius: 10px;
65+
}

intro.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>SnakeEdit: Easy to make python console application</title>
7+
<link rel="stylesheet" href="intro.css">
8+
<link rel="icon" href="logo.jpg">
9+
</head>
10+
<body>
11+
<img src="logo.jpg" id="logo" alt="offline">
12+
<div id="intro">
13+
<div id="about">
14+
<h1>Welcome to <i>SnakeEdit</i></h1>
15+
<h1>Create <i>Console Application</i></h1>
16+
<h1>Using <i>Python</i></h1>
17+
<button id="gs" onclick="gets()">Get Started</button>
18+
</div>
19+
<div id="preview">
20+
<img src="SnakeEdit.png" alt="offline" id="preview_img">
21+
</div>
22+
</div>
23+
<br><br><br><br>
24+
<div id="github-osource">
25+
<h1>Open Source</h1>
26+
<a href="https://github.com/Harshit2012/SnakeEdit" target="_blank"><img id="g_img" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcTZLNNYPJCZs8Nxqvgvw9l-ipz7jujAA-ifAA&s" alt="offline"></a>
27+
<h2>Github</h2>
28+
</div>
29+
<br>
30+
<script src="intro.js"></script>
31+
</body>
32+
</html>

intro.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
function gets(){
2+
window.location = "code_editor.html"
3+
}

logo.jpg

6.07 KB
Loading

style.css

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
body {
2+
margin: 0;
3+
display: flex;
4+
height: 100vh;
5+
font-family: Arial, sans-serif;
6+
overflow-x: hidden;
7+
}
8+
9+
#editor {
10+
flex: 1;
11+
background: #000;
12+
color: #0f0;
13+
padding: 10px;
14+
}
15+
16+
textarea {
17+
width: 100%;
18+
height: 90%;
19+
background: #000;
20+
color: #0f0;
21+
border: none;
22+
padding: 10px;
23+
resize: none;
24+
font-family: monospace;
25+
}
26+
27+
button {
28+
width: 200px;
29+
padding: 10px;
30+
margin-top: 10px;
31+
background-color: #04AA6D;
32+
color: white;
33+
border: none;
34+
border-radius: 4px;
35+
cursor: pointer;
36+
font-size: 16px;
37+
display: flex;
38+
align-items: center;
39+
justify-content: center;
40+
}
41+
42+
.run-icon {
43+
margin-right: 5px;
44+
}

0 commit comments

Comments
 (0)