basex-lsp/webapp/static/clients/codemirror/beer.html
2025-09-14 18:15:03 +01:00

152 lines
No EOL
5.6 KiB
HTML

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Beer example using BaseX LSP</title>
<link rel="icon" type="image/png" href="../favicon.png" />
<link href="../beercss-3.12.3/beer.min.css" rel="stylesheet" />
<link href="beer.css" rel="stylesheet" />
<script src="popover.js" defer></script>
</head>
<body>
<div class="wrapper">
<header class="header row tertiary">
<a id="help">XQuery 4.0 LSP client</a>
<button popovertarget="popHelp" class="circle transparent"><i>info</i></button>
<div class="max"></div>
<a class="nav-link active" aria-current="page" href="#">Editor</a>
<a class="nav-link" href="#">Msgs</a>
<a class="nav-link" href="/dba/logs" target="dba">Dba</a>
<div class="max"></div>
<button id="popcon" popovertarget="popConnect" class="circle transparent error">
<i>Cloud_Off</i>
</button>
</header>
<article class="sidebar">
<div id="msg">(msgs)</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>
<ul id="traffic" style="overflow: scroll;">
<li>-</li>
</ul>
</article>
<main class="content">
<div class="row top">
<nav class="group connected">
<label for="file">File:</label>
<input id="iFile" type="url" value="file:///some/file.xqm" />
<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="symbols">Symbols:</label><select id="symbols" disabled="disabled"></select>
</nav>
<nav class="group connected">
<button id="search" title="Search" type="button" class=""><i>Search</i></button>
<button id="lint" title="Diagnostics" type="button" class=""><i>Data_Alert</i></button>
<button id="sync" title="Sync changes to server" type="button" class="btn btn-light">
<i>Sync</i>
</button>
<button id="fullscreen" title="Full screen" type="button" class="btn btn-light">
<i>Fullscreen</i>
</button>
</nav>
<nav class="group connected">
<button id="syntax" type="button" class="btn btn-light" title="Syntax">
<i>Chat</i></button>
<button id="format" type="button" class="btn btn-light" title="Format (Shift-Alt-f)">
<i>Format_Align_Left</i></button>
<button id="cmd" type="button" class="btn btn-light" title="Cmd ">
<i>Order_Play</i>
</button>
<button type="button" class="btn btn-light" popovertarget="popSettings" title="Settings">
<i>Settings</i></button>
</nav>
</div>
<!-- Editor goes in here -->
<div id="editor"></div>
</main>
</div>
<!-- Popovers -->
<dialog id="popConnect" popover>
<header>Connect to LSP
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
</header>
<div class="modal-body">
<div id="state">🔴</div>
<input id="iServer" type="text" style="width:25em" />
</div>
<div class="modal-footer">
<button id="connect">connect</button>
</div>
</dialog>
<popup-info id="popHelp">hhhh</popup-info>
<dialog id="popSettings" popover>
<header>Editor configuration
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"
onclick="$('popSettings').hidePopover(); "></button>
</header>
<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 type="module" src="../beercss-3.12.3/beer.min.js"></script>
<script src="./beer.js"></script>
</body>
</html>