File tree Expand file tree Collapse file tree 4 files changed +104
-4
lines changed Expand file tree Collapse file tree 4 files changed +104
-4
lines changed Original file line number Diff line number Diff line change
1
+ # Simple workflow for deploying static content to GitHub Pages
2
+ name : Deploy static content to Pages
3
+
4
+ on :
5
+ # Runs on pushes targeting the default branch
6
+ push :
7
+ branches : ["main"]
8
+
9
+ # Allows you to run this workflow manually from the Actions tab
10
+ workflow_dispatch :
11
+
12
+ # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13
+ permissions :
14
+ contents : read
15
+ pages : write
16
+ id-token : write
17
+
18
+ # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
19
+ # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
20
+ concurrency :
21
+ group : " pages"
22
+ cancel-in-progress : false
23
+
24
+ jobs :
25
+ # Single deploy job since we're just deploying
26
+ deploy :
27
+ environment :
28
+ name : github-pages
29
+ url : ${{ steps.deployment.outputs.page_url }}
30
+ runs-on : ubuntu-latest
31
+ steps :
32
+ - name : Checkout
33
+ uses : actions/checkout@v3
34
+ - name : Setup Pages
35
+ uses : actions/configure-pages@v3
36
+ - uses : cachix/install-nix-action@v19
37
+ with :
38
+ nix_path : nixpkgs=channel:nixos-unstable
39
+ - name : Build WASM
40
+ run : nix-shell --run 'PATH=$(go env GOPATH)/bin:$PATH make bin/js_wasm/glj.wasm && cp bin/js_wasm/glj.wasm doc/repl/'
41
+ - name : Upload artifact
42
+ uses : actions/upload-pages-artifact@v2
43
+ with :
44
+ # Upload entire repository
45
+ path : ' ./doc/'
46
+ - name : Deploy to GitHub Pages
47
+ id : deployment
48
+ uses : actions/deploy-pages@v2
Original file line number Diff line number Diff line change
1
+ <!doctype html>
2
+ < html >
3
+
4
+ < head >
5
+ < meta charset ="utf-8 ">
6
+ < title > Glojure</ title >
7
+ < script src ="https://cdn.tailwindcss.com "> </ script >
8
+ < script >
9
+ window . onmessage = function ( event ) {
10
+ if ( event . data . type === "repl" ) {
11
+ // Hide loading screen
12
+ document . getElementById ( "loading" ) . style . display = "none" ;
13
+ }
14
+ } ;
15
+ </ script >
16
+ </ head >
17
+
18
+ < body >
19
+ < nav class ="bg-white border-gray-200 dark:bg-gray-900 ">
20
+ < div class ="max-w-screen-xl flex flex-wrap items-center justify-between mx-auto p-4 ">
21
+ < a href ="https://github.com/glojurelang/glojure "
22
+ class ="flex items-center space-x-3 rtl:space-x-reverse ">
23
+ < img src ="logo_small.webp "
24
+ class ="h-8 border-2 border-black rounded-full "
25
+ alt ="Glojure Logo " />
26
+ < span class ="self-center text-2xl font-semibold whitespace-nowrap dark:text-white "> Glojure</ span >
27
+ </ a >
28
+ </ div >
29
+ </ nav >
30
+
31
+ < div class ="mx-10 ">
32
+
33
+ < div class ="relative "
34
+ width ="800px " height ="500px ">
35
+ < div id ="loading "
36
+ class ="absolute inset-0 h-full w-[800px] text-white flex flex-col justify-center align-center items-center ">
37
+ < img src ="logo_small.webp "
38
+ class ="h-8 border-2 border-white rounded-full w-8 animate-spin "
39
+ alt ="Glojure Logo " />
40
+ < p > Loading REPL...</ p >
41
+ < p class ="text-sm "> This may take a few seconds</ p >
42
+ </ div >
43
+ < iframe src ="/repl " width ="800px " height ="500px " frameborder ="0 " />
44
+ </ div >
45
+
46
+ </ div >
47
+
48
+ </ body >
49
+
50
+ </ html >
Original file line number Diff line number Diff line change 2
2
< html >
3
3
< head >
4
4
< meta charset ="utf-8 ">
5
- < title > Go wasm</ title >
5
+ < title > Glojure REPL</ title >
6
+ < script src ="https://cdn.tailwindcss.com "> </ script >
6
7
< style >
7
8
# replContainer {
8
9
background-color : black;
12
13
border-radius : 15px ;
13
14
14
15
padding : 10px ;
15
- margin : 10 px 0 ;
16
+
16
17
font-family : monospace;
17
18
18
19
overflow-y : scroll;
19
- height : 500px ;
20
- width : 800px ;
21
20
}
22
21
# inputLine {
23
22
background-color : black;
37
36
38
37
< body >
39
38
< div id ="replContainer "
39
+ class ="flex h-screen w-screen "
40
40
onclick ="document.getElementById('inputLine').focus() ">
41
41
< div id ="output ">
42
42
< span id ="inputLine " contenteditable ="true " autocomplete ="off " spellcheck ="false "> </ span >
65
65
66
66
const decoder = new TextDecoder ( "utf-8" ) ;
67
67
globalThis . fs . writeSync = function ( fd , buf ) {
68
+ window . top . postMessage ( { type : "repl" , value : decoder . decode ( buf ) } ) ;
69
+
68
70
const output = document . getElementById ( "output" ) ;
69
71
const text = decoder . decode ( buf ) ;
70
72
You can’t perform that action at this time.
0 commit comments