[add] lsp manager
This commit is contained in:
parent
38a1909570
commit
c4f92f0402
39 changed files with 3481 additions and 25 deletions
78
webapp/lsp-manager/views/pdf/home.htm
Normal file
78
webapp/lsp-manager/views/pdf/home.htm
Normal file
|
|
@ -0,0 +1,78 @@
|
|||
<!DOCTYPE HTML5>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout.htm}">
|
||||
|
||||
<head>
|
||||
<title>PDF home</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div layout:fragment="content" class="container-fluid">
|
||||
|
||||
<nav class="navbar navbar-expand-lg navbar-light bg-light">
|
||||
|
||||
<a class="navbar-brand" href="#">PDF</a>
|
||||
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarNav"
|
||||
aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
|
||||
<span class="navbar-toggler-icon"></span>
|
||||
</button>
|
||||
<div class="collapse navbar-collapse" id="navbarNav">
|
||||
<ul class="navbar-nav">
|
||||
<li class="nav-item">
|
||||
<a href="/app/pdfs/_" class="nav-link">List</a>
|
||||
</li>
|
||||
<li class="nav-item">
|
||||
<a href="/app/pdfs/settings" class="nav-link">Settings</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-9 mb-3 mb-sm-0">
|
||||
<div class="card ">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">PDF slugs <span th:text="${count}" />
|
||||
,covers: <span th:text="${covers}" /></h5>
|
||||
<ul th:each="pdf: ${pdfs}">
|
||||
<li th:text="${pdf.slug}">aaa</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-3 mb-3 mb-sm-0">
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">PDF tasks</h5>
|
||||
|
||||
<form layout="column items:start gap">
|
||||
|
||||
<div class="row mb-3">
|
||||
<button name="action" value="delete" hx-confirm="Delete all covers?" hx-post="/app/pdfs"
|
||||
hx-target="#aresponse">
|
||||
Delete covers
|
||||
</button>
|
||||
<span id="aresponse" />
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="row mb-3">
|
||||
update covers
|
||||
<button name="action" value="update" hx-confirm="create all covers?" hx-post="/app/pdfs"
|
||||
hx-target="#bresponse">
|
||||
update covers
|
||||
</button>
|
||||
<span id="bresponse" />
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
</div>
|
||||
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
16
webapp/lsp-manager/views/pdf/item-iframe.htm
Normal file
16
webapp/lsp-manager/views/pdf/item-iframe.htm
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
<!DOCTYPE HTML5>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout.htm}">
|
||||
|
||||
<head>
|
||||
<title>PDF-view</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div layout:fragment="content">
|
||||
<iframe th:src="@{/pdfs/_/{id}/raw}" src="/pdfs/_/{id}/raw" allowScripts="true"
|
||||
style="width:100%;height:80vh;overflow:clip;"></iframe>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
60
webapp/lsp-manager/views/pdf/item.htm
Normal file
60
webapp/lsp-manager/views/pdf/item.htm
Normal file
|
|
@ -0,0 +1,60 @@
|
|||
<!DOCTYPE HTML5>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout.htm}">
|
||||
|
||||
<head>
|
||||
<title>PDF</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div layout:fragment="content" class="container-fluid">
|
||||
<sl-breadcrumb>
|
||||
<sl-breadcrumb-item href="/app/pdfs">PDF</sl-breadcrumb-item>
|
||||
<sl-breadcrumb-item href="/app/pdfs/_">list </sl-breadcrumb-item>
|
||||
<sl-breadcrumb-item><span th:text="${id}">#</span></sl-breadcrumb-item>
|
||||
|
||||
</sl-breadcrumb>
|
||||
<div class="card-group">
|
||||
<div class="card">
|
||||
<img th:src="@{/pdfs/_/{id}/cover}" src="" class="card-img-top object-fit-contain" alt="Image of cover page."
|
||||
style="height: 75vh;" />
|
||||
|
||||
</div>
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Card title</h5>
|
||||
<p class="card-text">This is a wider card with supporting text below as a natural lead-in to additional
|
||||
content. This card has even longer content than the first to show that equal height action.</p>
|
||||
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="card">
|
||||
<div class="card-body">
|
||||
<h5 class="card-title">Tasks</h5>
|
||||
<div class="card-text">
|
||||
<div class="btn-group-vertical" role="group" aria-label="Button group with nested dropdown">
|
||||
<button type="button" class="btn btn-primary">1</button>
|
||||
<button type="button" class="btn btn-primary">2</button>
|
||||
|
||||
<div class="btn-group" role="group">
|
||||
<button id="btnGroupDrop1" type="button" class="btn btn-primary dropdown-toggle"
|
||||
data-bs-toggle="dropdown" aria-expanded="false">
|
||||
Dropdown
|
||||
</button>
|
||||
<ul class="dropdown-menu" aria-labelledby="btnGroupDrop1">
|
||||
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
|
||||
<li><a class="dropdown-item" href="#">Dropdown link</a></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<p class="card-text"><small class="text-muted">Last updated 3 mins ago</small></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
53
webapp/lsp-manager/views/pdf/list.htm
Normal file
53
webapp/lsp-manager/views/pdf/list.htm
Normal file
|
|
@ -0,0 +1,53 @@
|
|||
<!DOCTYPE HTML5>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout.htm}">
|
||||
|
||||
<head>
|
||||
<title>Pdfs</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div layout:fragment="content" class="container-fluid">
|
||||
<sl-breadcrumb>
|
||||
<sl-breadcrumb-item href="/app/pdfs">PDF</sl-breadcrumb-item>
|
||||
<sl-breadcrumb-item>list (<span th:text="${count}">#</span>)</sl-breadcrumb-item>
|
||||
</sl-breadcrumb>
|
||||
|
||||
<div style="display:flex;flex-wrap:wrap;flex-direction:row;gap:10px;">
|
||||
|
||||
<sl-card th:each="pdf: ${pdfs}" class="card-overview">
|
||||
|
||||
<div slot="header">
|
||||
<sl-tooltip>
|
||||
<div th:text="${pdf.slug}" slot="content">path</div>
|
||||
<sl-badge th:text="${pdf.index}">{pdf.index}</sl-badge>
|
||||
</sl-tooltip>
|
||||
<sl-copy-button value="" th:value="${pdf.slug}" copy-label="copy PDF path">
|
||||
</sl-copy-button>
|
||||
<a th:href="@{/pdfs/_/{pdf.id}/raw}" href="/app/pdfs/_/{pdf.id}/details"><small>{pdf}</small></a>
|
||||
<sl-button-group label="History">
|
||||
<sl-icon-button name="file-earmark-pdf" label="Settings"
|
||||
th:href="@{/pdfs/_/{pdf.id}/view}" href="/app/pdfs/_/{pdf.id}/view"></sl-icon-button>
|
||||
|
||||
</sl-button-group>
|
||||
</div>
|
||||
<div>
|
||||
<a th:href="@{/pdfs/_/{pdf.id}}" href="/pdfs/_/{pdf.id}" class="holder center">
|
||||
<img th:src="@{/pdfs/_/{pdf.id}/cover}" src="" class="img-thumbnail object-fit-contain" loading="lazy"
|
||||
alt="Image of cover page." style="width:200px;height: 300px;"/>
|
||||
</a>
|
||||
</div>
|
||||
<div slot="footer">
|
||||
|
||||
<div>
|
||||
slug:<br /><small th:text="${pdf.id}">{pdf.id}</small><br />
|
||||
</div>
|
||||
</div>
|
||||
</sl-card>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
97
webapp/lsp-manager/views/pdf/settings.htm
Normal file
97
webapp/lsp-manager/views/pdf/settings.htm
Normal file
|
|
@ -0,0 +1,97 @@
|
|||
<!DOCTYPE HTML5>
|
||||
<html lang="en" xmlns:th="http://www.thymeleaf.org" xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
|
||||
layout:decorate="~{layout.htm}">
|
||||
|
||||
<head>
|
||||
<title>Settings</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="container-fluid" layout:fragment="content">
|
||||
<sl-breadcrumb>
|
||||
<sl-breadcrumb-item href="/app/pdfs">PDF</sl-breadcrumb-item>
|
||||
<sl-breadcrumb-item>settings</sl-breadcrumb-item>
|
||||
</sl-breadcrumb>
|
||||
<form method="post" action="/app/pdfs/settings" layout="column items:start gap" class="input-validation-required container">
|
||||
<fieldset>
|
||||
<legend>Settings</legend>
|
||||
<div class="row mb-3">
|
||||
<label for="inputdp" class="col-sm-2 col-form-label text-end">dataPath</label>
|
||||
<div class="col-sm-8">
|
||||
<sl-input id="inputdp" name="dataPath"
|
||||
clearable="clearable" filled="filled" required="required" value="{settings.dataPath}"
|
||||
th:value="${ settings.dataPath }"
|
||||
help-text="Root folder on server containing data files e.g.'/data/'"></sl-input>
|
||||
<div th:text="${error.dataPath}" class='error-message'></div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<hr />
|
||||
<div class="row mb-3 ">
|
||||
<label for="inputdrop" class="col-sm-2 col-form-label text-end">drop</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<sl-input id="inputdrop" name="drop"
|
||||
clearable="clearable" filled="filled"
|
||||
value="{settings.drop}" th:value="${ settings.drop }" help-text="optional sub-folder of dataPath e.g. drop-01e/"></sl-input>
|
||||
<div th:text="${error.drop}" class='error-message'></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
|
||||
<div class="row mb-3">
|
||||
<label for="selectam" class="col-sm-2 col-form-label text-end">Animation</label>
|
||||
|
||||
<div class="col-sm-8">
|
||||
<sl-select id="selectam" name="animation" value="{settings.animation}" th:value="${ settings.animation }"
|
||||
filled="filled" help-text="Animation for page transistions.">
|
||||
<sl-option value="">None</sl-option>
|
||||
<sl-option value="fade">Fade</sl-option>
|
||||
<sl-option value="slide-fade">slide-fade</sl-option>
|
||||
<sl-option value="bounce">bounce</sl-option>
|
||||
</sl-select>
|
||||
<div class='error-message'></div>
|
||||
</div>
|
||||
</div>
|
||||
<hr />
|
||||
</fieldset>
|
||||
<div class="mx-auto" style="width: 600px;">
|
||||
<sl-button type="submit" variant="primary">Save</sl-button>
|
||||
<sl-button type="reset">Reset to default values</sl-button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
||||
|
||||
<style>
|
||||
.errors {
|
||||
background-color: red;
|
||||
}
|
||||
|
||||
.label-on-left {
|
||||
--label-width: 8rem;
|
||||
--gap-width: 1rem;
|
||||
}
|
||||
|
||||
.label-on-left+.label-on-left {
|
||||
margin-top: var(--sl-spacing-medium);
|
||||
}
|
||||
|
||||
.label-on-left::part(form-control) {
|
||||
display: grid;
|
||||
grid: auto / var(--label-width) 1fr;
|
||||
gap: var(--sl-spacing-3x-small) var(--gap-width);
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
.label-on-left::part(form-control-label) {
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.label-on-left::part(form-control-help-text) {
|
||||
grid-column-start: 2;
|
||||
}
|
||||
</style>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Add table
Add a link
Reference in a new issue