chore(ui): add module file and main stub

- chore(ui): add module file and main stub
- feat(ui): add layout, pages and partials
- feat(ui): add stylesheet and scripts
- feat(ui): add page renderer and static file handler
- test(ui): cover rendering, escaping and static serving
This commit is contained in:
bryanpedini committed 2026-11-19 15:46:12 +01:00
1 parent 7089a6f408
commit 5ac8f98f10
26 files changed
+3921

No files matched your search

+39
View File
@@ -0,0 +1,39 @@
{{- /* SPDX-License-Identifier: GPL-2.0-or-later */ -}}
{{- /* Copyright (C) 2026 Bryan Joshua Pedini */ -}}
{{define "title"}}Import {{.Zone}}{{end}}
{{define "content"}}<p class="crumbs"><a href="/">Zones</a> / <a id="zone-link" href="/">{{.Zone}}</a></p>
<div class="page-head">
<h1>Import into {{.Zone}}</h1>
</div>
<section class="card" aria-labelledby="import-source-title">
<h2 id="import-source-title">Zone file</h2>
<form class="form" id="import-form" novalidate>
<fieldset class="field">
<legend>Mode</legend>
<label class="choice"><input type="radio" name="mode" value="merge" checked> Merge: add missing records and update TTLs</label>
<label class="choice"><input type="radio" name="mode" value="replace"> Replace: also delete records that are not in the file</label>
</fieldset>
<div class="field">
<label for="import-file">Load a file</label>
<input id="import-file" type="file" accept=".zone,.txt,text/plain">
</div>
<div class="field">
<label for="import-content">Zone file contents</label>
<textarea id="import-content" name="content" rows="14" class="mono" spellcheck="false" autocomplete="off" autocapitalize="none"></textarea>
</div>
<div class="actions">
<button type="submit" class="btn btn-primary" id="import-preview">Preview</button>
</div>
</form>
</section>
<section class="card" id="import-result" aria-labelledby="import-result-title" hidden>
<h2 id="import-result-title">Preview</h2>
<div id="import-errors" hidden></div>
<div id="import-summary"></div>
<div id="import-tables"></div>
<div class="actions">
<button type="button" class="btn btn-primary" id="import-apply" hidden>Apply import</button>
</div>
</section>
{{end}}