basex-lsp/webapp/static/clients/codemirror/index.html

83 lines
No EOL
3.4 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Codemirror6 example using BaseX LSP</title>
<link rel="icon" type="image/png" href="../favicon.png" />
<link href="../bootstrap@5.3.7.css" rel="stylesheet"
integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
<link rel="stylesheet" href="styles.css" />
</head>
<body>
<nav class="navbar bg-body-tertiary">
<div class="container-fluid">
<a class="navbar-brand">BaseX LSP client</a>
<a href="/dba/logs" target="dba">#</a>
<form class="d-flex">
<span id="state">🔴</span>
<input id="iServer" type="text" value="ws://localhost:3000/ws/lsp2" style="width:25em" />
<button id="connect">connect</button>
</form>
<div class="row">
<div>
<select id="language">
<option selected>Language</option>
<option value="plaintext">plaintext</option>
<option value="xquery">xquery</option>
<option value="xml">xml</option>
</select>
<label for="file">File:</label>
<input id="iFile" type="url" value="file:///some/file.xml" />
<button id="search">🔍</button>
<button id="lint">⚠️</button>
<button id="sync">🔄</button>
</div>
</div>
</div>
</nav>
<div class="container-fluid">
<div class="row " style="overflow:hidden">
<div class="col-2">
<div id="msg"> </div>
<select id="load">
<option selected value="">load..</option>
<optgroup label="XQuery3">
<option value="https://raw.githubusercontent.com/expkg-zone58/pdfbox/refs/heads/main/src/Pdfbox3.xqm">Pdfbox3.xqm</option>
<option value="https://raw.githubusercontent.com/Quodatum/xqdoca/refs/heads/master/src/main/lib/model.xqm">model.xqm</option>
</optgroup>
<optgroup label="XQuery4">
<option value="https://git.quodatum.duckdns.org/quodatum/basex-lsp/raw/branch/main/webapp/lsp/lsp-text.xqm">lsp-text.xqm</option>
</optgroup>
<optgroup label="xpath">
<option value="https://raw.githubusercontent.com/dnovatchev/Articles/refs/heads/main/Generators/Code/generator.xpath">generator.xpath</option>
</optgroup>
</select>
<label for="symbols">Symbols:</label><select id="symbols" disabled="disabled"></select>
<ul id="traffic" style="overflow: scroll;">
<li>-</li>
</ul>
</div>
<div class="col flex-grow-1" style="overflow: auto;">
<!-- Editor goes in here -->
<div id="editor"></div>
</div>
</div>
</div>
<!-- CodeMirror 6 -->
<script src="./lsp.bundle.js"></script>
<script src="./script.js"></script>
</body>
</html>