261029.4 · 00011b6688dc6372821c09b0a62727dbb8effcb3
A search's recent pages come only from the page's own tree
Recent pages crossed trees, so on the web address a search in one repo listed pages from repos read before. Each page's search box now names its tree, and each stored entry keeps the tree it was opened in. A version counts as its tree. Entries stored before this have no tree and are dropped.
reading declarations
Changes to assets/layout.html. All files
@@ -13,7 +13,7 @@ <nav>{{range $i, $c := .Crumbs}}{{if $i}} / {{end}}{{if $c.Href}}<a href="{{$c.Href}}"{{with $c.Title}} title="{{.}}"{{end}}>{{$c.Label}}</a>{{else if $c.Title}}<span title="{{$c.Title}}">{{$c.Label}}</span>{{else}}<span>{{$c.Label}}</span>{{end}}{{end}}</nav> {{if not .Stopped}}<span>{{with .Status}}<span class="age">{{.}}</span>{{end}}{{if .Raw}}<a href="?raw">raw</a>{{end}}{{if not (or .Shared .NoStop)}}<form method="post" action="{{ownPath}}stop">{{if .Tree}}<input type="hidden" name="tree" value="{{.Tree}}"><button>Delete lock</button>{{else}}<button class="kill">Kill server</button>{{end}}</form>{{end}}</span>{{end}} </header>-{{if not .Stopped}}{{with .Search}}<div class="search"><input type="search" class="search" data-search="{{.}}" placeholder="search" aria-label="Search this directory" autocomplete="off"><span class="tools"><button class="copy" title="copy the page's text" aria-label="copy the page's text">⧉</button>{{if $.Forge}}<button class="share" data-forge="{{$.Forge}}" data-lines="{{$.ForgeLines}}" title="copy the forge's link to what is selected, or to the page" aria-label="copy the forge's link to what is selected, or to the page">⤴</button>{{else}}<button class="share" title="copy a link to what is selected, or to the page" aria-label="copy a link to what is selected, or to the page">⤴</button>{{end}}</span></div>+{{if not .Stopped}}{{with .Search}}<div class="search"><input type="search" class="search" data-search="{{.}}" data-recents="{{$.Recents}}" placeholder="search" aria-label="Search this directory" autocomplete="off"><span class="tools"><button class="copy" title="copy the page's text" aria-label="copy the page's text">⧉</button>{{if $.Forge}}<button class="share" data-forge="{{$.Forge}}" data-lines="{{$.ForgeLines}}" title="copy the forge's link to what is selected, or to the page" aria-label="copy the forge's link to what is selected, or to the page">⤴</button>{{else}}<button class="share" title="copy a link to what is selected, or to the page" aria-label="copy a link to what is selected, or to the page">⤴</button>{{end}}</span></div> {{end}}{{end}}<main> {{.Body}} </main>