vole
Clone
Read only, no credentials:
https://rodent.software/git/vole.git
Write over SSH with a registered key:
git clone ssh://git@0.0.0.0:2222/vole.git
A free and open-source forge that lives in your Git repo.
Merge change request 01M70WES5ZZDJ6RP226WB11BBZ: Let people rename and remove their own passkeys
keenan · 18m ago
4b8c9e1d
| 1 | {{define "code_search"}} |
| 2 | {{template "header" .}} |
| 3 | {{template "repohead" (nav .Page "code")}} |
| 4 | |
| 5 | <div class="page-head"> |
| 6 | <div class="page-head-main"> |
| 7 | <h1>Search code</h1> |
| 8 | <p class="page-sub">File names and contents on <code>{{.Ref}}</code>. Content search is case-insensitive and treats the query as plain text.</p> |
| 9 | </div> |
| 10 | <div class="page-head-actions"> |
| 11 | <a class="button secondary" href="/{{.Name}}/code?ref={{esc .Ref}}">{{icon "code"}}Browse</a> |
| 12 | </div> |
| 13 | </div> |
| 14 | |
| 15 | <form class="filters" method="get" action="/{{.Name}}/search" role="search"> |
| 16 | <input type="hidden" name="ref" value="{{.Ref}}"> |
| 17 | <div class="filters-search"> |
| 18 | <input type="search" name="q" value="{{.Query}}" placeholder="Search file names and content" aria-label="Search file names and content" autofocus> |
| 19 | <button type="submit">{{icon "search"}}Search</button> |
| 20 | </div> |
| 21 | </form> |
| 22 | |
| 23 | {{if .Error}}<div class="flash bad">{{.Error}}</div>{{end}} |
| 24 | |
| 25 | {{if not .Commit}} |
| 26 | <div class="empty-state"> |
| 27 | <p>There is no commit on <code>{{.Ref}}</code> to search.</p> |
| 28 | </div> |
| 29 | {{else if not .Query}} |
| 30 | <div class="empty-state"> |
| 31 | <p>Search this repository.</p> |
| 32 | <p class="muted">Names and file contents are searched at the selected branch. Binary files are skipped.</p> |
| 33 | </div> |
| 34 | {{else}} |
| 35 | <p class="muted">{{.Hits}} content match(es){{if .FileHits}} · {{len .FileHits}} file name match(es){{end}} for “{{.Query}}”{{if .Truncated}} · showing a partial result set{{end}}</p> |
| 36 | |
| 37 | <h2>Files</h2> |
| 38 | {{if .FileHits}} |
| 39 | <div class="panel"> |
| 40 | <table class="search-files"> |
| 41 | <tbody> |
| 42 | {{range .FileHits}} |
| 43 | <tr><td><a href="/{{$.Name}}/blob/{{esc $.Ref}}/{{pathurl .}}" hx-get="/{{$.Name}}/blob/{{esc $.Ref}}/{{pathurl .}}" hx-target="#code-main" hx-swap="outerHTML" hx-push-url="true">{{icon (fileicon .)}}{{.}}</a></td></tr> |
| 44 | {{end}} |
| 45 | </tbody> |
| 46 | </table> |
| 47 | </div> |
| 48 | {{else}} |
| 49 | <div class="empty-state"><p>No file names match.</p></div> |
| 50 | {{end}} |
| 51 | |
| 52 | <h2>Content</h2> |
| 53 | {{if .Groups}} |
| 54 | {{range .Groups}}{{$g := .}} |
| 55 | <section class="search-group"> |
| 56 | <h3><a href="/{{$.Name}}/blob/{{esc $.Ref}}/{{pathurl .Path}}">{{.Path}}</a></h3> |
| 57 | <table class="search-lines"> |
| 58 | <tbody> |
| 59 | {{range .Lines}} |
| 60 | <tr id="L{{.Line}}"> |
| 61 | <td class="ln"><a href="/{{$.Name}}/blob/{{esc $.Ref}}/{{pathurl $g.Path}}#L{{.Line}}">{{.Line}}</a></td> |
| 62 | <td class="code">{{.Text}}</td> |
| 63 | </tr> |
| 64 | {{end}} |
| 65 | </tbody> |
| 66 | </table> |
| 67 | </section> |
| 68 | {{end}} |
| 69 | {{else}} |
| 70 | <div class="empty-state"><p>No file content matches.</p></div> |
| 71 | {{end}} |
| 72 | {{end}} |
| 73 | {{template "footer" .}} |
| 74 | {{end}} |
| 75 |