-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
113 lines (113 loc) · 2.13 KB
/
index.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
<!DOCTYPE html>
<html>
<title>AcornScript</title>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Fira+Code:wght@300&display=swap" rel="stylesheet">
<style>
body {
background: white;
}
#txt {
position: absolute;
top: 10%;
height: 85%;
left: 5%;
width: 45%;
background: transparent;
color: #181818;
font-size: 15px;
font-family: 'Fira Code', monospace;
font-weight: bold;
}
#txt:focus {
outline-width: 0;
border: 1px solid red;
}
#r {
position: absolute;
top: 15px;
right: 155px;
height: 50px;
background: #dc1b1b;
color: white;
font-size: 20px;
border: none;
border-radius: 6px;
cursor: pointer;
}
#r:hover {
opacity: 0.7;
}
#c {
position: absolute;
top: 15px;
right: 80px;
height: 50px;
background: #dc1b1b;
color: white;
font-size: 20px;
border: none;
border-radius: 6px;
cursor: pointer;
}
#c:hover {
opacity: 0.7;
}
#open {
position: absolute;
top: 15px;
right: 10px;
height: 50px;
background: #dc1b1b;
color: white;
font-size: 20px;
border: none;
border-radius: 6px;
cursor: pointer;
}
#open:hover {
opacity: 0.7;
}
#div {
position: absolute;
top: 10%;
height: 85%;
right: 5%;
width: 43%;
background: white;
font-family: arial;
overflow: auto;
}
#logo {
color: #dc1b1b;
pointer-events: none;
user-select: none;
position: absolute;
top: 0px;
left: 5%;
font-family: 'Fira Code', monospace;
font-weight: bold;
}
</style>
<body onload="load(); myFunction()">
<h1 id="logo">AcornScript</h1>
<button onclick="myFunction(); run()" id="r">Run code</button>
<button onclick="copy()" id="c" title="Copy code"><span id="span">Copy</span></button>
<a href="docs" target="_blank">
<button id="open">More</button></a>
<textarea id="txt" placeholder="Write code here..."></textarea>
<div id="div"></div>
<script src="https://lb123658.github.io/AcornScript/updated-script.js"></script>
<script>
function copy() {
var copyText = document.getElementById("txt");
copyText.select();
copyText.setSelectionRange(0, 99999)
document.execCommand("copy");
document.getElementById("span").innerHTML = "Copied";
document.getElementById("r").style.right = "170px";
}
</script>
<script src="run.js"></script>
</body>
</html>