[mod] ui
This commit is contained in:
parent
9331800656
commit
9f34c28efc
6 changed files with 264 additions and 146 deletions
|
|
@ -6,65 +6,42 @@
|
|||
<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" />
|
||||
|
||||
<link href="../bootstrap@5.3.7.css" rel="stylesheet" />
|
||||
<link rel="stylesheet" href="styles.css" />
|
||||
<script src="popover.js" defer></script>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<nav class="navbar bg-body-tertiary">
|
||||
<div class="container-fluid">
|
||||
|
||||
|
||||
<div class="btn-toolbar" role="toolbar" aria-label="Toolbar with button groups">
|
||||
<a class="navbar-brand">BaseX LSP client</a>
|
||||
<a class="navbar-brand">XQuery 4.0 LSP client</a>
|
||||
|
||||
<ul class="nav nav-pills">
|
||||
<li class="nav-item">
|
||||
<a class="nav-link active" aria-current="page" href="#">Editor</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="#">Msgs</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link" href="/dba/logs" target="dba">Dba</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a class="nav-link disabled" href="#" tabindex="-1" aria-disabled="true">Disabled</a>
|
||||
</li>
|
||||
</ul>
|
||||
<button id="popcon" popovertarget="popConnect" class="btn btn-danger">
|
||||
<i class="bi bi-router"></i>
|
||||
</button>
|
||||
|
||||
</div>
|
||||
<a href="/dba/logs" target="dba">#</a>
|
||||
</nav>
|
||||
<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.xqm" />
|
||||
|
||||
|
||||
|
||||
<!-- <div class="btn-group mr-2" role="group" aria-label="First group">
|
||||
<button type="button" class="btn btn-secondary">1</button>
|
||||
<button type="button" class="btn btn-secondary">2</button>
|
||||
<button type="button" class="btn btn-secondary">3</button>
|
||||
<button type="button" class="btn btn-secondary">4</button>
|
||||
</div> -->
|
||||
<div class="btn-group btn-group-sm " role="group" aria-label="Second group">
|
||||
<button id="search" type="button" class="btn btn-light"><i
|
||||
class="bi bi-search"></i></button>
|
||||
<button id="lint" type="button" class="btn btn-light"><i
|
||||
class="bi bi-info-square"></i></button>
|
||||
<button id="sync" type="button" class="btn btn-light">
|
||||
<i class="bi bi-arrow-repeat"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group" role="group" aria-label="Third group">
|
||||
<button type="button" class="btn btn-light" title="Format"><i class="bi bi-justify-left"></i></button>
|
||||
|
||||
<button type="button" class="btn btn-light"
|
||||
popovertarget="popSettings" title="Settings">
|
||||
<i class="bi bi-gear"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="container-fluid">
|
||||
|
|
@ -101,23 +78,70 @@
|
|||
</div>
|
||||
|
||||
<div class="col flex-grow-1" style="overflow: auto;">
|
||||
<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.xqm" />
|
||||
|
||||
|
||||
<!-- <div class="btn-group mr-2" role="group" aria-label="First group">
|
||||
<button type="button" class="btn btn-secondary">1</button>
|
||||
<button type="button" class="btn btn-secondary">2</button>
|
||||
<button type="button" class="btn btn-secondary">3</button>
|
||||
<button type="button" class="btn btn-secondary">4</button>
|
||||
</div> -->
|
||||
<div class="btn-group btn-group-sm " role="group" aria-label="Second group">
|
||||
<button id="search" type="button" class="btn btn-light"><i class="bi bi-search"></i></button>
|
||||
<button id="lint" type="button" class="btn btn-light"><i class="bi bi-info-square"></i></button>
|
||||
<button id="sync" type="button" class="btn btn-light">
|
||||
<i class="bi bi-arrow-repeat"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="btn-group" role="group" aria-label="Third group">
|
||||
<button type="button" class="btn btn-light" title="Format"><i
|
||||
class="bi bi-justify-left"></i></button>
|
||||
|
||||
<button type="button" class="btn btn-light" popovertarget="popSettings" title="Settings">
|
||||
<i class="bi bi-gear"></i></button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Editor goes in here -->
|
||||
<div id="editor"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Popovers -->
|
||||
<div id="popConnect" popover>
|
||||
<h2>Connect to LSP</h2>
|
||||
<div id="state">🔴</div>
|
||||
<input id="iServer" type="text" value="ws://localhost:3000/ws/lsp" style="width:25em" />
|
||||
<button id="connect">connect</button>
|
||||
</div>
|
||||
<dialog id="popConnect" popover>
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Connect to LSP</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div id="state">🔴</div>
|
||||
<input id="iServer" type="text" value="ws://localhost:3000/ws/lsp" style="width:25em" />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="connect">connect</button>
|
||||
</div>
|
||||
</dialog>
|
||||
|
||||
<div id="popSettings" popover>
|
||||
<h2>Settings</h2>
|
||||
<div>TODO</div>
|
||||
</div>
|
||||
<dialog id="popSettings" popover >
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title">Editor configuration</h5>
|
||||
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
@TODO
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button id="connect">ok</button>
|
||||
</div>
|
||||
</dialog>
|
||||
<!-- CodeMirror 6 -->
|
||||
<script src="./lsp.bundle.js"></script>
|
||||
<script src="./script.js"></script>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue