oficina / mapa Public

Clone
git clone https://amadan.net/oficina/mapa

Plain git — no account needed to clone.

Download

Download this file

1{{define "content"}}{{$d := .Data}}{{$page := $d.Page}}
2{{template "mapa-doc-head" dict "Page" $page "Edit" (or (and (not $d.Editing) (printf "/d/%s/edit" $page.Date)) "") "Day" $d.Pill}}
3{{template "notice" $d.Notice}}
4{{with $d.Draft}}{{template "mapa-unsaved" dict "Draft" . "Save" (printf "/d/%s/draft/save" $page.Date) "Discard" (printf "/d/%s/draft/discard" $page.Date) "Href" (or (and $d.Written (not $d.Editing) $page.Href) "") "Saved" $d.Saved}}{{end}}
5{{range $d.Orphans}}<div mapa-unsaved role="status"><p><strong>You have unsaved changes to a page that was deleted.</strong></p><form method="post" action="/p/{{.Public}}/draft/scratch"><button rst-btn="primary" type="submit">Save as a scratch page</button></form><form method="post" action="/p/{{.Public}}/draft/discard"><input type="hidden" name="version" value="{{.Version}}"><button rst-btn type="submit">Discard</button></form></div>{{end}}
6{{range $d.Elsewhere}}<p mapa-unsaved role="status"><span><strong>You have unsaved changes</strong> on another page.</span> <a rst-btn href="/p/{{.Public}}">Open it</a></p>{{end}}
7{{if $d.Editing}}
8<form rst-form method="post" action="/d/{{$page.Date}}" mapa-edit-form data-drafts="{{$d.Drafts}}" data-version="{{$d.Version}}">
9<input type="hidden" name="revision" value="{{$d.Revision}}">
10<input type="hidden" name="version" value="{{$d.Version}}">
11{{template "mapa-editor" dict "Body" $d.Body "Error" $d.Error "Upload" (printf "/d/%s?upload=1" $page.Date)}}
12<div rst-form-foot>{{if $d.Written}}<a rst-btn href="/d/{{$page.Date}}">Cancel</a>{{end}}<button rst-btn="primary" type="submit">Save</button></div>
13{{if not $d.Written}}<p mapa-meta>Nothing is saved until you write something and save it.</p>{{end}}
14</form>
15{{template "mapa-page-images" dict "Images" $d.Images "Back" (printf "/d/%s/edit" $page.Date)}}
16{{else}}
17{{template "mapa-island" $d.Island}}<article mapa-body rst-section>{{$page.HTML}}</article>
18{{end}}
19<footer mapa-foot-refs rst-stack rst-section>
20{{template "mapa-linked" dict "ID" "backlinks" "Heading" "Linked from" "Items" $page.Backlinks "Empty" "Nothing links to this day yet." "Target" 0}}
21{{if $d.Written}}{{template "mapa-links-out" $page}}{{end}}
22</footer>
23{{template "mapa-links-panel" dict "Page" $page "Week" $d.Week "State" $.Frame.Panel}}
24{{end}}
25