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.

head_navbar.tmpl 5.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. <div class="ui container" id="navbar">
  2. <div class="item brand" style="justify-content: space-between;">
  3. <a href="{{AppSubUrl}}/">
  4. <img class="ui mini image" src="{{StaticUrlPrefix}}/img/gitea-sm.png">
  5. </a>
  6. <div class="ui basic icon button mobile-only" id="navbar-expand-toggle">
  7. <i class="sidebar icon"></i>
  8. </div>
  9. </div>
  10. {{if .IsSigned}}
  11. <a class="item {{if .PageIsDashboard}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
  12. <a class="item {{if .PageIsIssues}}active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
  13. <a class="item {{if .PageIsPulls}}active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
  14. <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
  15. {{else if .IsLandingPageHome}}
  16. <a class="item {{if .PageIsHome}}active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
  17. <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
  18. {{else if .IsLandingPageExplore}}
  19. <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a>
  20. {{else if .IsLandingPageOrganizations}}
  21. <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a>
  22. {{end}}
  23. {{template "custom/extra_links" .}}
  24. {{/*
  25. <div class="item">
  26. <div class="ui icon input">
  27. <input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
  28. <i class="search icon"></i>
  29. </div>
  30. </div>
  31. */}}
  32. {{if .IsSigned}}
  33. <div class="right stackable menu">
  34. <a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
  35. <span class="text">
  36. <i class="fitted octicon octicon-bell"></i>
  37. <span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
  38. {{if .NotificationUnreadCount}}
  39. <span class="ui red label">
  40. {{.NotificationUnreadCount}}
  41. </span>
  42. {{end}}
  43. </span>
  44. </a>
  45. <div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
  46. <span class="text">
  47. <i class="fitted octicon octicon-plus"></i>
  48. <span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
  49. <i class="fitted octicon octicon-triangle-down not-mobile"></i>
  50. </span>
  51. <div class="menu">
  52. <a class="item" href="{{AppSubUrl}}/repo/create">
  53. <i class="octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
  54. </a>
  55. <a class="item" href="{{AppSubUrl}}/repo/migrate">
  56. <i class="octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
  57. </a>
  58. {{if .SignedUser.CanCreateOrganization}}
  59. <a class="item" href="{{AppSubUrl}}/org/create">
  60. <i class="octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
  61. </a>
  62. {{end}}
  63. </div><!-- end content create new menu -->
  64. </div><!-- end dropdown menu create new -->
  65. <div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
  66. <span class="text">
  67. <img class="ui tiny avatar image" src="{{.SignedUser.RelAvatarLink}}">
  68. <span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
  69. <span class="mobile-only">{{.SignedUser.Name}}</span>
  70. <i class="fitted octicon octicon-triangle-down not-mobile" tabindex="-1"></i>
  71. </span>
  72. <div class="menu user-menu" tabindex="-1">
  73. <div class="ui header">
  74. {{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
  75. </div>
  76. <div class="divider"></div>
  77. <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
  78. <i class="octicon octicon-person"></i>
  79. {{.i18n.Tr "your_profile"}}<!-- Your profile -->
  80. </a>
  81. <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
  82. <i class="octicon octicon-star"></i>
  83. {{.i18n.Tr "your_starred"}}
  84. </a>
  85. <a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
  86. <i class="octicon octicon-settings"></i>
  87. {{.i18n.Tr "your_settings"}}<!-- Your settings -->
  88. </a>
  89. <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
  90. <i class="octicon octicon-question"></i>
  91. {{.i18n.Tr "help"}}<!-- Help -->
  92. </a>
  93. {{if .IsAdmin}}
  94. <div class="divider"></div>
  95. <a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
  96. <i class="icon settings"></i>
  97. {{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
  98. </a>
  99. {{end}}
  100. <div class="divider"></div>
  101. <a class="item" href="{{AppSubUrl}}/user/logout">
  102. <i class="octicon octicon-sign-out"></i>
  103. {{.i18n.Tr "sign_out"}}<!-- Sign Out -->
  104. </a>
  105. </div><!-- end content avatar menu -->
  106. </div><!-- end dropdown avatar menu -->
  107. </div><!-- end signed user right menu -->
  108. {{else}}
  109. <a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a>
  110. <div class="right stackable menu">
  111. {{if .ShowRegistrationButton}}
  112. <a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
  113. <i class="octicon octicon-person"></i> {{.i18n.Tr "register"}}
  114. </a>
  115. {{end}}
  116. <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
  117. <i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
  118. </a>
  119. </div><!-- end anonymous right menu -->
  120. {{end}}
  121. </div>