[mod] local bootstrap
This commit is contained in:
parent
ce69c61b6c
commit
74f2c74fb4
14 changed files with 387 additions and 33 deletions
6
webapp/static/codemirror/bootstrap@5.3.7.css
vendored
Normal file
6
webapp/static/codemirror/bootstrap@5.3.7.css
vendored
Normal file
File diff suppressed because one or more lines are too long
|
|
@ -6,7 +6,7 @@
|
|||
<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="https://cdn.jsdelivr.net/npm/bootstrap@5.3.7/dist/css/bootstrap.min.css" rel="stylesheet"
|
||||
<link href="bootstrap@5.3.7.css" rel="stylesheet"
|
||||
integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous">
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
|
||||
|
|
@ -15,40 +15,43 @@
|
|||
<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/lsp" style="width:25em" />
|
||||
<button id="connect">connect</button>
|
||||
</form>
|
||||
</div>
|
||||
<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/lsp" style="width:25em" />
|
||||
<button id="connect">connect</button>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid" >
|
||||
<div class="row " >
|
||||
<div class="container-fluid">
|
||||
<div class="row ">
|
||||
<div class="col-2">
|
||||
something
|
||||
</div>
|
||||
<div class="col flex-grow-1" >
|
||||
<div class="row" >
|
||||
<div >
|
||||
<div class="col flex-grow-1">
|
||||
<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>
|
||||
|
||||
|
||||
<label for="symbols">Symbols:</label><select id="symbols" disabled="disabled"></select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Editor goes in here -->
|
||||
|
||||
<div id="editor"></div>
|
||||
|
||||
|
||||
<div id="editor"></div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -90,7 +93,7 @@
|
|||
lsp.simpleWebSocketTransport(server)
|
||||
.then(transport => {
|
||||
let link = lsp.lsp(transport, file);
|
||||
const doc=view.state.doc.toString();
|
||||
const doc = view.state.doc.toString();
|
||||
const state = lsp.createEditorState(doc, [...lsp.baseExts, link]);
|
||||
view.setState(state);
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue