Files

56 lines
2.5 KiB
HTML

{{define "title"}}Documentation · {{.Repeater.Name}} · MeshTender{{end}}
{{define "header"}}{{template "repeater-header" .Nav}}{{end}}
{{define "content"}}
{{template "repeater-tabs" .Nav}}
{{if .IsOwner}}
<form method="post" action="/repeaters/{{.Repeater.PublicID}}/docs">
<div class="card">
<div class="card-header">
<h2 class="card-title">Public documentation {{if .Repeater.ExposePublicPage}}<span class="text-secondary">· visible on the public page</span>{{else}}<span class="text-secondary">· not published yet</span>{{end}}</h2>
</div>
<div class="card-body">
<p class="text-secondary">What it is and how to service it: hardware, antenna, power, firmware. Anyone can read it. <strong>Keep gate codes and other site-access secrets in the internal notes below.</strong> Markdown works.</p>
<textarea class="form-control font-monospace" name="doc_public" rows="10" maxlength="20000" placeholder="Hardware, antenna, power/solar, firmware, how to service…"
aria-label="Public documentation (Markdown)">{{.Repeater.DocPublic}}</textarea>
</div>
</div>
<div class="card mt-3">
<div class="card-header">
<h2 class="card-title">Internal notes <span class="text-secondary">· people with access only</span></h2>
</div>
<div class="card-body">
<p class="text-secondary">Site access: gate codes, lock combinations, who to call. Only you, its stewards and people you share it with can read these; they're never public.</p>
<textarea class="form-control font-monospace" name="doc_internal" rows="8" maxlength="20000" placeholder="Gate code, lock combo, who to call for site access…"
aria-label="Internal notes (Markdown, not public)">{{.Repeater.DocInternal}}</textarea>
</div>
</div>
<div class="btn-list mt-3">
<button type="submit" class="btn btn-primary">Save documentation</button>
</div>
</form>
{{else}}
<div class="card">
<div class="card-header"><h2 class="card-title">Documentation</h2></div>
<div class="card-body">
{{if .Repeater.DocPublic}}
<div style="white-space: pre-wrap">{{.Repeater.DocPublic}}</div>
{{else}}
<p class="text-secondary mb-0">No public documentation yet.</p>
{{end}}
</div>
</div>
{{if .Repeater.DocInternal}}
<div class="card mt-3">
<div class="card-header"><h2 class="card-title">Internal notes <span class="text-secondary">· people with access only</span></h2></div>
<div class="card-body">
<div style="white-space: pre-wrap">{{.Repeater.DocInternal}}</div>
</div>
</div>
{{end}}
{{end}}
{{end}}