diff --git a/packages/app/assets/index.html b/packages/app/assets/index.html index f12c959..58c0b04 100644 --- a/packages/app/assets/index.html +++ b/packages/app/assets/index.html @@ -14,7 +14,7 @@

browser-hosted editor and language server

This app demos an editor with language smarts (for JavaScript) by hosting the Monaco editor widget with a simple Monaco widget with an LSP server implemented via tower-lsp and tree-sitter. Everything is compiled to WASM and run @@ -22,7 +22,8 @@ code. (Monaco itself does use web workers, however).

- features: ⇧⌘O (macos) or ⇧⌃O (windows) opens the symbol view; the syntax area shows the JavaScript syntax tree (green for valid; red for errors) parsed from the text editor area + features: ⇧⌘O (macos) or ⇧⌃O (windows) opens symbol view; the syntax area shows + the JavaScript syntax tree (green for valid; red for errors) parsed from editor

@@ -34,15 +35,15 @@
- +
- +
- +
diff --git a/packages/app/assets/index.module.css b/packages/app/assets/index.module.css index 082df4b..b93c494 100644 --- a/packages/app/assets/index.module.css +++ b/packages/app/assets/index.module.css @@ -17,12 +17,9 @@ div[id=container] { display: grid; height: 90%; width: 75%; - grid-template-rows: auto auto auto repeat(5, minmax(0, 1fr)); + grid-template-rows: auto auto auto minmax(0, 1fr) auto auto auto; grid-template-columns: repeat(2, minmax(0, 1fr)); - gap: 2em; margin: auto; - margin-top: 0; - padding: 0; } h1[id=title] { @@ -30,8 +27,6 @@ h1[id=title] { grid-row: 1; font-family: monospace; font-size: 2em; - margin-bottom: 0; - padding: 0; } p[id=synopsis] { @@ -39,11 +34,9 @@ p[id=synopsis] { grid-column: 1 / 3; grid-row: 2; font-family: sans-serif; - font-style: italic; - font-size: 11pt; + font-size: 10pt; line-height: 1.5em; margin: 0; - padding: 0; } p[id=features] { @@ -52,26 +45,29 @@ p[id=features] { grid-row: 3; font-family: sans-serif; font-style: italic; - font-size: 11pt; + font-size: 10pt; line-height: 1.5em; - margin: 0; - padding: 0; + text-align: center; } div[id=cell-editor] { grid-column: 1 / 2; - grid-row: 4 / 6; + grid-row: 4; } [id=cell-editor] div[id=editor] { border: 1px solid black; - height: 100%; - overflow: auto; + height: calc(100% - 1px); + padding-right: 1.5em; } div[id=cell-syntax] { grid-column: 2 / 3; - grid-row: 4 / 6; + grid-row: 4; +} + +div[id=cell-syntax] textarea { + height: 100%; } [id=container] label { @@ -82,25 +78,24 @@ div[id=cell-syntax] { div[id=cell-console] { grid-column: 1 / 3; - grid-row: 6; + grid-row: 5; + margin-top: 2em; } div[id=cell-client] { grid-column: 1 / 3; - grid-row: 7; + grid-row: 6; } div[id=cell-server] { grid-column: 1 / 3; - grid-row: 8; + grid-row: 7; } div[id=container] textarea { display: block; - margin: 0; - padding: 0; - box-sizing: borcder-box; - height: 100%; + box-sizing: border-box; width: 100%; resize: none; + overflow: hidden; }