-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy patheditor.html
96 lines (95 loc) · 2.77 KB
/
editor.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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<title>gnaw | Editor</title>
<link rel="icon" sizes="512x512" href="images/icon.png">
<link rel="icon" sizes="64x64" href="images/icon64.png">
<link rel="manifest" href="manifest.webmanifest">
<link rel="stylesheet" href="styles.css">
<style>
body {
background-color: #010409;
color: #fff;
margin: 0;
overflow: scroll;
}
.page {
margin: 0;
max-width: 100%;
}
.navbar {
background-color: #0d1117;
height: 50px;
box-shadow: 0 0 4px rgba(0, 0, 0, 0.6);
position: fixed;
width: 100%;
}
.inner-nav {
margin: 0;
flex-basis: auto;
}
.container {
margin: 5px;
position: relative; /* Add position relative to the container */
}
#code-editor {
cursor: text;
font-family: monospace;
width: 100%;
}
.cursor {
width: 2px; /* Adjust cursor width */
background-color: #fff; /* Cursor color */
position: absolute;
animation: blink 0.8s step-end infinite; /* Blinking animation */
height: 16px; /* Adjust cursor height */
top: 0; /* Position cursor at the top of the container */
}
span {
display: block;
width: 100%;
white-space: pre;
position: relative; /* Add position relative to the spans */
height: 16px; /* Set the height of spans to 16px */
}
span:nth-child(even) {
background-color: #070a0e; /* Darker background for even lines */
}
ul {
list-style: none; /* Remove default list bullet */
padding: 0; /* Remove default list padding */
}
li {
margin: 0;
}
@keyframes blink {
0%, 100% {
opacity: 0;
}
50% {
opacity: 1;
}
}
</style>
</head>
<body>
<div class="nav">
<div class="inner-nav">
<div class="nav-item">
<a class="icon desktop" href="index.html">gnaw</a>
<a class="icon mobile" href="index.html">g</a>
</div>
</div>
</div>
<div class="page">
<div class="container">
<div id="code-editor"></div>
<div class="cursor" id="text-cursor"></div>
</div>
</div>
</body>
<script src="editor.js">
</script>
</html>