code.gitea.io/gitea@v1.22.3/templates/shared/search/code/results.tmpl (about) 1 <div class="flex-text-block tw-flex-wrap"> 2 {{range $term := .SearchResultLanguages}} 3 <a class="ui {{if eq $.Language $term.Language}}primary{{end}} basic label tw-m-0" 4 href="?q={{$.Keyword}}{{if ne $.Language $term.Language}}&l={{$term.Language}}{{end}}&fuzzy={{$.IsFuzzy}}"> 5 <i class="color-icon tw-mr-2" style="background-color: {{$term.Color}}"></i> 6 {{$term.Language}} 7 <div class="detail">{{$term.Count}}</div> 8 </a> 9 {{end}} 10 </div> 11 <div class="repository search"> 12 {{range $result := .SearchResults}} 13 {{$repo := or $.Repo (index $.RepoMaps .RepoID)}} 14 <div class="diff-file-box diff-box file-content non-diff-file-content repo-search-result"> 15 <h4 class="ui top attached header tw-font-normal tw-flex tw-flex-wrap"> 16 {{if not $.Repo}} 17 <span class="file tw-flex-1"> 18 <a rel="nofollow" href="{{$repo.Link}}">{{$repo.FullName}}</a> 19 {{if $repo.IsArchived}} 20 <span class="ui basic label">{{ctx.Locale.Tr "repo.desc.archived"}}</span> 21 {{end}} 22 - {{.Filename}} 23 </span> 24 {{else}} 25 <span class="file tw-flex-1">{{.Filename}}</span> 26 {{end}} 27 <a role="button" class="ui basic tiny button" rel="nofollow" href="{{$repo.Link}}/src/commit/{{$result.CommitID | PathEscape}}/{{.Filename | PathEscapeSegments}}">{{ctx.Locale.Tr "repo.diff.view_file"}}</a> 28 </h4> 29 <div class="ui attached table segment"> 30 {{template "shared/searchfile" dict "RepoLink" $repo.Link "SearchResult" .}} 31 </div> 32 {{template "shared/searchbottom" dict "root" $ "result" .}} 33 </div> 34 {{end}} 35 </div> 36 {{template "base/paginate" .}}