You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

65 lines
4.0 KiB

10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
10 years ago
  1. <div class="masthead navbar" id="masthead">
  2. <div class="container">
  3. <nav class="nav">
  4. <a id="nav-logo" class="nav-item pull-left{{if .PageIsHome}} active{{end}}" href="/"><img src="/img/favicon.png" alt="Gogs Logo" id="logo"></a>
  5. <a class="nav-item pull-left{{if .PageIsUserDashboard}} active{{end}}" href="/">Dashboard</a>
  6. <a class="nav-item pull-left{{if .PageIsHelp}} active{{end}}" target="_blank" href="http://gogs.io/docs">Help</a>
  7. {{if .IsSigned}}
  8. {{if .HasAccess}}
  9. <form class="nav-item pull-left{{if .PageIsNewRepo}} active{{end}}" id="nav-search-form">
  10. <div class="input-group">
  11. <div class="input-group-btn">
  12. <button type="button" class="btn btn-sm btn-default dropdown-toggle" data-toggle="dropdown">{{if .Repository}}This Repository{{else}}All Repositories{{end}} <span class="caret"></span></button>
  13. <ul class="dropdown-menu">
  14. {{if .Repository}}
  15. <li><a href="#">This Repository</a></li>
  16. <li class="divider"></li>
  17. {{end}}
  18. <li><a href="#">All Repositories</a></li>
  19. </ul>
  20. </div>
  21. <input type="search" class="form-control input-sm" name="q" placeholder="search code, commits and issues"/>
  22. </div>
  23. </form>
  24. {{end}}
  25. <a id="nav-out" class="nav-item navbar-right navbar-btn btn btn-danger" href="/user/logout/"><i class="fa fa-power-off fa-lg"></i></a>
  26. <a id="nav-avatar" class="nav-item navbar-right{{if .PageIsUserProfile}} active{{end}}" href="{{.SignedUser.HomeLink}}" data-toggle="tooltip" data-placement="bottom" title="{{.SignedUserName}}">
  27. <img src="{{.SignedUser.AvatarLink}}?s=28" alt="user-avatar" title="username"/>
  28. </a>
  29. <a class="navbar-right nav-item{{if .PageIsUserSetting}} active{{end}}" href="/user/settings" data-toggle="tooltip" data-placement="bottom" title="Settings"><i class="fa fa-cogs fa-lg"></i></a>
  30. {{if .IsAdmin}}<a class="navbar-right nav-item{{if .PageIsAdmin}} active{{end}}" href="/admin" data-toggle="tooltip" data-placement="bottom" title="Admin"><i class="fa fa-gear fa-lg"></i></a>{{end}}
  31. <div class="navbar-right nav-item pull-right{{if .PageIsNewRepo}} active{{end}}" id="nav-repo-new" data-toggle="tooltip" data-placement="bottom" title="New Repo">
  32. <button type="button" class="dropdown-toggle" data-toggle="dropdown"><i class="fa fa-plus-square fa-lg"></i></button>
  33. <div class="dropdown-menu">
  34. <ul class="list-unstyled">
  35. <li><a href="/repo/create"><i class="fa fa-book"></i>Repository</a></li>
  36. <li><a href="/repo/migrate"><i class="fa fa-clipboard"></i>Migration</a></li>
  37. <!-- <li><a href="#"><i class="fa fa-users"></i>Organization</a></li> -->
  38. </ul>
  39. </div>
  40. </div>
  41. {{else}}
  42. <a id="nav-signin" class="nav-item navbar-right navbar-btn btn btn-danger" href="/user/login/" rel="nofollow">Sign In</a>
  43. <a id="nav-signup" class="nav-item navbar-right" href="/user/sign_up/" rel="nofollow">Sign Up</a>
  44. {{end}}
  45. </nav>
  46. </div>
  47. </div>
  48. <!--<nav class="navbar navbar-inverse navbar-fixed-top">
  49. <div class="container">
  50. <div class="navbar-header">
  51. <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#navbar-collapse">
  52. <i class="fa fa-bars"></i>
  53. </button>
  54. <a class="navbar-brand" href="/"><img src="/img/favicon.png" alt="Gogs Logo"></a>
  55. </div>
  56. <div class="collapse navbar-collapse" id="gopmweb-navbar-collapse">
  57. <ul class="nav navbar-nav">
  58. <li><a>{{.Title}}</a></li>
  59. </ul>
  60. <a href="/user/signin" class="navbar-right btn btn-success navbar-btn">Sign In</a>
  61. </div>
  62. </div>
  63. </nav>-->