clone

an offline map explorer where each world, from a game map to a city's open data, ships as one .atlas file

archive/golden-reference
atlas / cmd / cartograph / ui / volume.tmpl
volume.tmpl 3.0K
1{{define "title"}}Cartograph · {{.Volume.Title}}{{end}}2{{define "content"}}3<section class="page-head">4 <h1>{{.Volume.Title}} <span class="dim">{{.Volume.Slug}}</span></h1>5 <p class="dim">{{len .Volume.Builds}} builds, newest first — the first is the one the reader serves.</p>6</section>7{{if gt (len .Volume.Builds) 1}}8<form class="compare" action="/volume/{{.Volume.Slug}}/diff" method="get">9 <label>compare</label>10 <select name="a">11 {{range $at, $b := .Volume.Builds}}<option value="{{$b.File}}"{{if eq $at 1}} selected{{end}}>{{$b.File}}</option>{{end}}12 </select>13 <label>against</label>14 <select name="b">15 {{range $at, $b := .Volume.Builds}}<option value="{{$b.File}}"{{if eq $at 0}} selected{{end}}>{{$b.File}}</option>{{end}}16 </select>17 <button>What moved</button>18</form>19{{end}}20{{range $at, $b := .Volume.Builds}}21<section class="build{{if eq $at 0}} serving{{end}}">22 <h2>{{$b.File}}{{if eq $at 0}} <span class="tag">serving</span>{{end}}</h2>23 <p class="dim">captured {{$b.CreatedAt}} · revision {{$b.Revision}} · stamp {{$b.ShortStamp}}</p>24 <dl class="axes">25 <div><dt>annotation</dt><dd><b>{{$b.Pins}}</b> pins · {{$b.Described}} described ({{$b.DescribedPct}}) · median {{$b.MedianLength}} chars</dd></div>26 <div><dt>cartography</dt><dd><b>{{$b.TileCount}}</b> tiles · {{$b.RasterMB}} MB unique raster · depth z{{$b.Depth}} holds {{$b.DepthTiles}} tiles</dd></div>27 <div><dt>structure</dt><dd><b>{{$b.Categories}}</b> categories in {{$b.Groups}} groups · {{$b.TextSets}} text label sets · {{$b.Zones}} zones ({{$b.Vertices}} vertices) · {{$b.Lenses}} lenses</dd></div>28 <div><dt>icons</dt><dd><b>{{$b.IconsCarried}}</b> of {{$b.IconsWanted}} marker categories carry one ({{$b.IconPct}})</dd></div>29 </dl>30 {{if $b.Merges}}31 <table class="merges">32 <thead><tr>33 <th>map</th><th>source</th><th class="num">donor pins</th><th class="num">donor shapes</th><th class="num">matched</th>34 <th class="num">median px</th><th class="num">added</th><th class="num">adopted</th>35 <th class="num">held</th><th class="num">rejected</th><th>alignment</th>36 </tr></thead>37 <tbody>38 {{range $b.Merges}}39 <tr>40 <td>{{.Map}}</td><td>{{.Source}}</td>41 <td class="num">{{.DonorPins}}</td><td class="num">{{.DonorShapesN}}</td><td class="num">{{.MatchedN}}</td>42 <td class="num">{{.MedianMatchPx}}</td><td class="num">{{.Added}}</td>43 <td class="num">{{.AdoptedN}}</td><td class="num">{{.HeldN}}</td>44 <td class="num">{{.RejectedN}}</td><td class="dim">{{.Alignment}}</td>45 </tr>46 {{end}}47 </tbody>48 </table>49 {{range $b.Merges}}{{if .Held}}50 <details class="ledger">51 <summary>{{.Source}} · {{.Map}} — {{.HeldN}} pins held back</summary>52 <table>53 <thead><tr><th class="num">donor id</th><th>title</th><th>reason</th></tr></thead>54 <tbody>55 {{range .Held}}<tr><td class="num">{{.Donor}}</td><td>{{.Title}}</td><td class="dim">{{.Reason}}</td></tr>{{end}}56 </tbody>57 </table>58 </details>59 {{end}}{{end}}60 {{end}}61</section>62{{end}}63{{end}}