Skip to content

Commit a9fbc07

Browse files
committed
Add generated data to git
1 parent dcb153c commit a9fbc07

File tree

15 files changed

+2352
-144
lines changed

15 files changed

+2352
-144
lines changed

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
gotty
2-
bindata/static
32
builds
3+
js/dist
44
js/node_modules/*

.vscode/launch.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
// Use IntelliSense to learn about possible attributes.
3+
// Hover to view descriptions of existing attributes.
4+
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5+
"version": "0.2.0",
6+
"configurations": [
7+
{
8+
"name": "Launch GoTTY",
9+
"type": "go",
10+
"request": "launch",
11+
"mode": "debug",
12+
"program": "${workspaceFolder}",
13+
"args": ["-a", "127.0.0.1", "-w", "bash"]
14+
}
15+
]
16+
}

Makefile

Lines changed: 12 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -9,50 +9,28 @@ gotty: main.go assets server/*.go webtty/*.go backend/*.go Makefile
99
docker:
1010
docker build . -t gotty-bash:$(VERSION)
1111

12-
.PHONY: assets
12+
.PHONY: all docker assets
1313
assets: bindata/static/js/gotty.js bindata/static/index.html bindata/static/icon.svg bindata/static/favicon.ico bindata/static/css/index.css bindata/static/css/xterm.css bindata/static/css/xterm_customize.css bindata/static/manifest.json bindata/static/icon_192.png
1414

15-
.PHONY: all
16-
all: gotty docker
15+
all: gotty
1716

18-
bindata/static:
19-
mkdir -p bindata/static
17+
bindata/static bindata/static/css bindata/static/js:
18+
mkdir -p $@
2019

21-
bindata/static/icon.svg: bindata/static resources/icon.svg
22-
cp resources/icon.svg bindata/static/icon.svg
20+
bindata/static/%: resources/% | bindata/static/css
21+
cp "$<" "$@"
2322

24-
bindata/static/index.html: bindata/static resources/index.html
25-
cp resources/index.html bindata/static/index.html
23+
bindata/static/css/%.css: resources/%.css | bindata/static
24+
cp "$<" "$@"
2625

27-
bindata/static/manifest.json: bindata/static resources/manifest.json
28-
cp resources/manifest.json bindata/static/manifest.json
29-
30-
bindata/static/favicon.ico: bindata/static resources/favicon.ico
31-
cp resources/favicon.ico bindata/static/favicon.ico
32-
33-
bindata/static/icon_192.png: bindata/static resources/icon_192.png
34-
cp resources/icon_192.png bindata/static/icon_192.png
35-
36-
bindata/static/js: bindata/static
37-
mkdir -p bindata/static/js
38-
39-
bindata/static/css: bindata/static
40-
mkdir -p bindata/static/css
41-
42-
bindata/static/css/index.css: bindata/static/css resources/index.css
43-
cp resources/index.css bindata/static/css/index.css
44-
45-
bindata/static/css/xterm_customize.css: bindata/static/css resources/xterm_customize.css
46-
cp resources/xterm_customize.css bindata/static/css/xterm_customize.css
47-
48-
bindata/static/css/xterm.css: bindata/static/css js/node_modules/xterm/css/xterm.css
49-
cp js/node_modules/xterm/css/xterm.css bindata/static/css/xterm.css
26+
bindata/static/css/xterm.css: js/node_modules/xterm/css/xterm.css | bindata/static
27+
cp "$<" "$@"
5028

5129
js/node_modules/xterm/dist/xterm.css:
5230
cd js && \
5331
npm install
5432

55-
bindata/static/js/gotty.js: js/src/* js/node_modules/webpack
33+
bindata/static/js/gotty.js: js/src/* | js/node_modules/webpack
5634
cd js && \
5735
npx webpack
5836

@@ -89,4 +67,4 @@ release:
8967
ghr -draft ${VERSION} ${OUTPUT_DIR}/dist # -c ${GIT_COMMIT} --delete --prerelease -u sorenisanerd -r gotty ${VERSION}
9068

9169
clean:
92-
rm -fr gotty builds js/dist bindata/static
70+
rm -fr gotty builds js/dist bindata/static js/node_modules

bindata/static/css/index.css

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
html, body, #terminal {
2+
background: black;
3+
height: 100%;
4+
width: 100%;
5+
padding: 0%;
6+
margin: 0%;
7+
}

bindata/static/css/xterm.css

Lines changed: 170 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,170 @@
1+
/**
2+
* Copyright (c) 2014 The xterm.js authors. All rights reserved.
3+
* Copyright (c) 2012-2013, Christopher Jeffrey (MIT License)
4+
* https://github.com/chjj/term.js
5+
* @license MIT
6+
*
7+
* Permission is hereby granted, free of charge, to any person obtaining a copy
8+
* of this software and associated documentation files (the "Software"), to deal
9+
* in the Software without restriction, including without limitation the rights
10+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
11+
* copies of the Software, and to permit persons to whom the Software is
12+
* furnished to do so, subject to the following conditions:
13+
*
14+
* The above copyright notice and this permission notice shall be included in
15+
* all copies or substantial portions of the Software.
16+
*
17+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
18+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
19+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
20+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
21+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
22+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
23+
* THE SOFTWARE.
24+
*
25+
* Originally forked from (with the author's permission):
26+
* Fabrice Bellard's javascript vt100 for jslinux:
27+
* http://bellard.org/jslinux/
28+
* Copyright (c) 2011 Fabrice Bellard
29+
* The original design remains. The terminal itself
30+
* has been extended to include xterm CSI codes, among
31+
* other features.
32+
*/
33+
34+
/**
35+
* Default styles for xterm.js
36+
*/
37+
38+
.xterm {
39+
position: relative;
40+
user-select: none;
41+
-ms-user-select: none;
42+
-webkit-user-select: none;
43+
}
44+
45+
.xterm.focus,
46+
.xterm:focus {
47+
outline: none;
48+
}
49+
50+
.xterm .xterm-helpers {
51+
position: absolute;
52+
top: 0;
53+
/**
54+
* The z-index of the helpers must be higher than the canvases in order for
55+
* IMEs to appear on top.
56+
*/
57+
z-index: 5;
58+
}
59+
60+
.xterm .xterm-helper-textarea {
61+
padding: 0;
62+
border: 0;
63+
margin: 0;
64+
/* Move textarea out of the screen to the far left, so that the cursor is not visible */
65+
position: absolute;
66+
opacity: 0;
67+
left: -9999em;
68+
top: 0;
69+
width: 0;
70+
height: 0;
71+
z-index: -5;
72+
/** Prevent wrapping so the IME appears against the textarea at the correct position */
73+
white-space: nowrap;
74+
overflow: hidden;
75+
resize: none;
76+
}
77+
78+
.xterm .composition-view {
79+
/* TODO: Composition position got messed up somewhere */
80+
background: #000;
81+
color: #FFF;
82+
display: none;
83+
position: absolute;
84+
white-space: nowrap;
85+
z-index: 1;
86+
}
87+
88+
.xterm .composition-view.active {
89+
display: block;
90+
}
91+
92+
.xterm .xterm-viewport {
93+
/* On OS X this is required in order for the scroll bar to appear fully opaque */
94+
background-color: #000;
95+
overflow-y: scroll;
96+
cursor: default;
97+
position: absolute;
98+
right: 0;
99+
left: 0;
100+
top: 0;
101+
bottom: 0;
102+
}
103+
104+
.xterm .xterm-screen {
105+
position: relative;
106+
}
107+
108+
.xterm .xterm-screen canvas {
109+
position: absolute;
110+
left: 0;
111+
top: 0;
112+
}
113+
114+
.xterm .xterm-scroll-area {
115+
visibility: hidden;
116+
}
117+
118+
.xterm-char-measure-element {
119+
display: inline-block;
120+
visibility: hidden;
121+
position: absolute;
122+
top: 0;
123+
left: -9999em;
124+
line-height: normal;
125+
}
126+
127+
.xterm {
128+
cursor: text;
129+
}
130+
131+
.xterm.enable-mouse-events {
132+
/* When mouse events are enabled (eg. tmux), revert to the standard pointer cursor */
133+
cursor: default;
134+
}
135+
136+
.xterm.xterm-cursor-pointer {
137+
cursor: pointer;
138+
}
139+
140+
.xterm.column-select.focus {
141+
/* Column selection mode */
142+
cursor: crosshair;
143+
}
144+
145+
.xterm .xterm-accessibility,
146+
.xterm .xterm-message {
147+
position: absolute;
148+
left: 0;
149+
top: 0;
150+
bottom: 0;
151+
right: 0;
152+
z-index: 10;
153+
color: transparent;
154+
}
155+
156+
.xterm .live-region {
157+
position: absolute;
158+
left: -9999px;
159+
width: 1px;
160+
height: 1px;
161+
overflow: hidden;
162+
}
163+
164+
.xterm-dim {
165+
opacity: 0.5;
166+
}
167+
168+
.xterm-underline {
169+
text-decoration: underline;
170+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
.terminal {
2+
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, Menlo, Terminal, monospace, "Apple Symbols";
3+
}
4+
5+
.xterm-overlay {
6+
font-family: "DejaVu Sans Mono", "Everson Mono", FreeMono, Menlo, Terminal, monospace, "Apple Symbols";
7+
border-radius: 15px;
8+
font-size: xx-large;
9+
color: black;
10+
background: white;
11+
opacity: 0.75;
12+
padding: 0.2em 0.5em 0.2em 0.5em;
13+
position: absolute;
14+
top: 50%;
15+
left: 50%;
16+
transform: translate(-50%, -50%);
17+
user-select: none;
18+
transition: opacity 180ms ease-in;
19+
}

bindata/static/favicon.ico

4.19 KB
Binary file not shown.

bindata/static/icon.svg

Lines changed: 66 additions & 0 deletions
Loading

bindata/static/icon_192.png

6.87 KB
Loading

bindata/static/index.html

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<title>{{ .title }}</title>
5+
<link rel="manifest" href="manifest.json">
6+
<link rel="icon" href="favicon.ico">
7+
<link rel="icon" href="icon.svg" type="image/svg+xml">
8+
<link rel="stylesheet" href="./css/index.css" />
9+
<link rel="stylesheet" href="./css/xterm.css" />
10+
<link rel="stylesheet" href="./css/xterm_customize.css" />
11+
</head>
12+
<body>
13+
<div id="terminal"></div>
14+
<script src="./auth_token.js"></script>
15+
<script src="./config.js"></script>
16+
<script src="./js/gotty.js"></script>
17+
</body>
18+
</html>

0 commit comments

Comments
 (0)