home.tmpl 4.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. {{template "ng/base/head" .}}
  2. {{template "ng/base/header" .}}
  3. <div id="repo-wrapper">
  4. {{template "repo/header" .}}
  5. <div id="repo-content" class="clear container">
  6. <div id="repo-main" class="left grid-5-6">
  7. <p id="repo-desc">{{if .Repository.DescriptionHtml}}
  8. <span class="description">{{.Repository.DescriptionHtml}}</span>
  9. <a class="link" href="{{.Repository.Website}}">{{.Repository.Website}}</a>{{else}}
  10. <span class="no-description text-italic"><i>No Description</i></span>
  11. {{end}}
  12. </p>
  13. <ul id="repo-file-nav" class="clear menu menu-line">
  14. <!-- <li>
  15. <a href="#">
  16. <button class="btn btn-green btn-small btn-radius" id="repo-compare-btn"><i class="octicon octicon-git-compare"></i></button>
  17. </a>
  18. </li> -->
  19. <li id="repo-branch-switch" class="down drop">
  20. <a>
  21. <button class="btn btn-gray btn-medium btn-radius">
  22. <i class="octicon octicon-git-branch"></i> {{if .IsViewBranch}}{{.i18n.Tr "repo.branch"}}{{else}}{{.i18n.Tr "repo.tree"}}{{end}}:
  23. <strong id="repo-branch-current">{{if .IsViewBranch}}{{.BranchName}}{{else}}{{ShortSha .BranchName}}{{end}}</strong>
  24. </button>
  25. </a>
  26. <div class="drop-down panel">
  27. <p class="panel-header text-bold">{{.i18n.Tr "repo.branch_and_tags"}}</p>
  28. <!-- <input id="repo-branch-filter-ipt" class="ipt ipt-large" type="text" placeholder="find branches / tags"/> -->
  29. <div id="repo-branch-tag">
  30. <ul class="menu menu-line tab-nav clear" id="repo-branch-tab-nav">
  31. <li class="js-tab-nav {{if not .IsTag}}js-tab-nav-show{{end}} left" data-tab-target="#repo-branch-list"><a>{{.i18n.Tr "repo.branches"}}</a></li>
  32. <li class="js-tab-nav {{if .IsTag}}js-tab-nav-show{{end}} left" data-tab-target="#repo-tag-list"><a>{{.i18n.Tr "repo.tags"}}</a></li>
  33. </ul>
  34. <ul class="menu menu-vertical switching-list {{if .IsTag}}hide{{end}}" id="repo-branch-list">
  35. {{range .Branches}}
  36. <li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{.}}"><i class="octicon octicon-check"></i>{{.}}</a></li>
  37. {{end}}
  38. </ul>
  39. <ul class="menu menu-vertical switching-list {{if not .IsTag}}hide{{end}}" id="repo-tag-list">
  40. {{range .Tags}}
  41. <li {{if eq . $.BranchName}}class="checked"{{end}}><a href="{{$.RepoLink}}/src/{{.}}"><i class="octicon octicon-check"></i>{{.}}</a></li>
  42. {{end}}
  43. </ul>
  44. </div>
  45. </div>
  46. </li>
  47. <li id="repo-bread" class="breads">
  48. <a class="title bread" href="{{.RepoLink}}">{{.Repository.Name}}</a>
  49. {{ $n := len .Treenames}}
  50. {{ $l := Subtract $n 1}}
  51. {{range $i, $v := .Treenames}}
  52. {{if eq $i $l}}
  53. <span class="bread">{{$v}}</span>
  54. {{else}}
  55. <span class="bread"><a href="{{$.BranchLink}}/{{index $.Paths $i}}">{{$v}}</a></span>
  56. {{end}}
  57. {{end}}
  58. </li>
  59. <!-- <li id="repo-commits-jump" class="repo-jump right">
  60. <a href="#">
  61. <button class="btn btn-small btn-gray btn-right-radius"><i class="octicon octicon-git-commit"></i></button>
  62. </a>
  63. </li>
  64. <li id="repo-find-jump" class="repo-jump right">
  65. <a href="#">
  66. <button class="btn btn-small btn-gray btn-left-radius"><i class="octicon octicon-list-unordered"></i></button>
  67. </a>
  68. </li> -->
  69. </ul>
  70. {{if .IsFile}}
  71. {{template "repo/view_file" .}}
  72. {{else}}
  73. {{template "repo/view_list" .}}
  74. {{end}}
  75. </div>
  76. {{template "repo/sidebar" .}}
  77. </div>
  78. </div>
  79. {{template "ng/base/footer" .}}