diff options
author | Adam Strzelecki <ono@java.pl> | 2015-12-07 23:30:52 +0100 |
---|---|---|
committer | Adam Strzelecki <ono@java.pl> | 2015-12-08 00:57:46 +0100 |
commit | da2585c11e11023ffa7a8c69d21c6fecac520a8e (patch) | |
tree | 1c2a575dfc00e0e78f47c497a6d9347b3edeca9a /templates/explore | |
parent | dd8a06a397e26c46639eba1313102560dfa49c95 (diff) | |
download | gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.tar.gz gitea-da2585c11e11023ffa7a8c69d21c6fecac520a8e.zip |
Indent all templates with tabs
This commit improves templates readability, since all of them use consistent
indent with all template command blocks indented too.
1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks
such as {{if}} {{with}}
2. Cleans all trailing white-space
3. Adds trailing last line-break to each file
Diffstat (limited to 'templates/explore')
-rw-r--r-- | templates/explore/navbar.tmpl | 2 | ||||
-rw-r--r-- | templates/explore/repo_list.tmpl | 42 | ||||
-rw-r--r-- | templates/explore/repos.tmpl | 40 |
3 files changed, 42 insertions, 42 deletions
diff --git a/templates/explore/navbar.tmpl b/templates/explore/navbar.tmpl index 374376bf77..2b6aa93f5c 100644 --- a/templates/explore/navbar.tmpl +++ b/templates/explore/navbar.tmpl @@ -5,4 +5,4 @@ {{.i18n.Tr "explore.repos"}} </a> </div> -</div>
\ No newline at end of file +</div> diff --git a/templates/explore/repo_list.tmpl b/templates/explore/repo_list.tmpl index 5a459dedd8..a674bcc90a 100644 --- a/templates/explore/repo_list.tmpl +++ b/templates/explore/repo_list.tmpl @@ -1,23 +1,23 @@ <div class="ui repository list"> - {{range .Repos}} - <div class="item"> - <div class="ui header"> - <a href="{{AppSubUrl}}/{{if .Owner}}{{.Owner.Name}}{{else if $.Org}}{{$.Org.Name}}{{else}}{{$.Owner.Name}}{{end}}/{{.Name}}">{{if $.PageIsExplore}}{{.Owner.Name}} / {{end}}{{.Name}}</a> - {{if .IsPrivate}} - <span class="text gold"><i class="icon octicon octicon-lock"></i></span> - {{else if .IsFork}} - <span><i class="icon octicon octicon-repo-forked"></i></span> - {{else if .IsMirror}} - <span><i class="icon octicon octicon-repo-clone"></i></span> - {{end}} + {{range .Repos}} + <div class="item"> + <div class="ui header"> + <a href="{{AppSubUrl}}/{{if .Owner}}{{.Owner.Name}}{{else if $.Org}}{{$.Org.Name}}{{else}}{{$.Owner.Name}}{{end}}/{{.Name}}">{{if $.PageIsExplore}}{{.Owner.Name}} / {{end}}{{.Name}}</a> + {{if .IsPrivate}} + <span class="text gold"><i class="icon octicon octicon-lock"></i></span> + {{else if .IsFork}} + <span><i class="icon octicon octicon-repo-forked"></i></span> + {{else if .IsMirror}} + <span><i class="icon octicon octicon-repo-clone"></i></span> + {{end}} - <div class="ui right metas"> - <span class="text grey"><i class="octicon octicon-star"></i> {{.NumStars}}</span> - <span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span> - </div> - </div> - {{if .Description}}<p>{{.Description}}</p>{{end}} - <p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p> - </div> - {{end}} -</div>
\ No newline at end of file + <div class="ui right metas"> + <span class="text grey"><i class="octicon octicon-star"></i> {{.NumStars}}</span> + <span class="text grey"><i class="octicon octicon-git-branch"></i> {{.NumForks}}</span> + </div> + </div> + {{if .Description}}<p>{{.Description}}</p>{{end}} + <p class="time">{{$.i18n.Tr "org.repo_updated"}} {{TimeSince .Updated $.i18n.Lang}}</p> + </div> + {{end}} +</div> diff --git a/templates/explore/repos.tmpl b/templates/explore/repos.tmpl index 1d45a96ec5..5523295312 100644 --- a/templates/explore/repos.tmpl +++ b/templates/explore/repos.tmpl @@ -4,28 +4,28 @@ <div class="ui grid"> {{template "explore/navbar" .}} <div class="twelve wide column content"> - {{template "explore/repo_list" .}} + {{template "explore/repo_list" .}} {{with .Page}} - {{if gt .TotalPages 1}} - <div class="center page buttons"> - <div class="ui borderless pagination menu"> - <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}> - <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}} - </a> - {{range .Pages}} - {{if eq .Num -1}} - <a class="disabled item">...</a> - {{else}} - <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a> - {{end}} - {{end}} - <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}> - {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i> - </a> - </div> - </div> - {{end}} + {{if gt .TotalPages 1}} + <div class="center page buttons"> + <div class="ui borderless pagination menu"> + <a class="{{if not .HasPrevious}}disabled{{end}} item" {{if .HasPrevious}}href="{{$.Link}}?page={{.Previous}}"{{end}}> + <i class="left arrow icon"></i> {{$.i18n.Tr "repo.issues.previous"}} + </a> + {{range .Pages}} + {{if eq .Num -1}} + <a class="disabled item">...</a> + {{else}} + <a class="{{if .IsCurrent}}active{{end}} item" {{if not .IsCurrent}}href="{{$.Link}}?page={{.Num}}"{{end}}>{{.Num}}</a> + {{end}} + {{end}} + <a class="{{if not .HasNext}}disabled{{end}} item" {{if .HasNext}}href="{{$.Link}}?page={{.Next}}"{{end}}> + {{$.i18n.Tr "repo.issues.next"}} <i class="icon right arrow"></i> + </a> + </div> + </div> + {{end}} {{end}} </div> </div> |