mirror of
https://github.com/go-gitea/gitea
synced 2025-07-27 04:38:36 +00:00
Add whitespace removal inside template curly brackes (#20853)
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
{{template "base/alert" .}}
|
||||
<div class="ui repo-description">
|
||||
<div id="repo-desc">
|
||||
{{ $description := .Repository.DescriptionHTML $.Context}}
|
||||
{{$description := .Repository.DescriptionHTML $.Context}}
|
||||
{{if $description}}<span class="description">{{$description}}</span>{{else if .IsRepositoryAdmin}}<span class="no-description text-italic">{{.locale.Tr "repo.no_desc"}}</span>{{end}}
|
||||
<a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>
|
||||
</div>
|
||||
@@ -13,12 +13,12 @@
|
||||
<div class="ui repo-search">
|
||||
<form class="ui form ignore-dirty" action="{{.RepoLink}}/search" method="get">
|
||||
<div class="field">
|
||||
<div class="ui action input{{if .CodeIndexerUnavailable }} disabled left icon tooltip{{end}}"{{if .CodeIndexerUnavailable }} data-content="{{.locale.Tr "repo.search.code_search_unavailable"}}"{{end}}>
|
||||
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable }} disabled{{end}} placeholder="{{.locale.Tr "repo.search.search_repo"}}">
|
||||
{{if .CodeIndexerUnavailable }}
|
||||
<div class="ui action input{{if .CodeIndexerUnavailable}} disabled left icon tooltip{{end}}"{{if .CodeIndexerUnavailable}} data-content="{{.locale.Tr "repo.search.code_search_unavailable"}}"{{end}}>
|
||||
<input name="q" value="{{.Keyword}}"{{if .CodeIndexerUnavailable}} disabled{{end}} placeholder="{{.locale.Tr "repo.search.search_repo"}}">
|
||||
{{if .CodeIndexerUnavailable}}
|
||||
<i class="icon df ac jc">{{svg "octicon-alert"}}</i>
|
||||
{{end}}
|
||||
<button class="ui icon button"{{if .CodeIndexerUnavailable }} disabled{{end}} type="submit">
|
||||
<button class="ui icon button"{{if .CodeIndexerUnavailable}} disabled{{end}} type="submit">
|
||||
{{svg "octicon-search"}}
|
||||
</button>
|
||||
</div>
|
||||
@@ -63,8 +63,8 @@
|
||||
<div class="repo-button-row df ac sb fw">
|
||||
<div class="df ac">
|
||||
{{template "repo/branch_dropdown" dict "root" .}}
|
||||
{{ $n := len .TreeNames}}
|
||||
{{ $l := Subtract $n 1}}
|
||||
{{$n := len .TreeNames}}
|
||||
{{$l := Subtract $n 1}}
|
||||
<!-- If home page, show new PR. If not, show breadcrumb -->
|
||||
{{if eq $n 0}}
|
||||
{{if and .CanCompareOrPull .IsViewBranch (not .Repository.IsArchived)}}
|
||||
@@ -99,7 +99,7 @@
|
||||
</button>
|
||||
{{end}}
|
||||
{{else}}
|
||||
<span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section" title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{ $p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span>
|
||||
<span class="ui breadcrumb repo-path"><a class="section" href="{{.RepoLink}}/src/{{.BranchNameSubURL}}" title="{{.Repository.Name}}">{{EllipsisString .Repository.Name 30}}</a>{{range $i, $v := .TreeNames}}<span class="divider">/</span>{{if eq $i $l}}<span class="active section" title="{{$v}}">{{EllipsisString $v 30}}</span>{{else}}{{$p := index $.Paths $i}}<span class="section"><a href="{{$.BranchLink}}/{{PathEscapeSegments $p}}" title="{{$v}}">{{EllipsisString $v 30}}</a></span>{{end}}{{end}}</span>
|
||||
{{end}}
|
||||
</div>
|
||||
<div class="df ac">
|
||||
@@ -130,7 +130,7 @@
|
||||
</button>
|
||||
</div>
|
||||
{{end}}
|
||||
{{if and (ne $n 0) (not .IsViewFile) (not .IsBlame) }}
|
||||
{{if and (ne $n 0) (not .IsViewFile) (not .IsBlame)}}
|
||||
<a class="ui button" href="{{.RepoLink}}/commits/{{.BranchNameSubURL}}/{{.TreePath | PathEscapeSegments}}">
|
||||
{{svg "octicon-history" 16 "mr-3"}}{{.locale.Tr "repo.file_history"}}
|
||||
</a>
|
||||
|
Reference in New Issue
Block a user