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

head_navbar_home.tmpl 9.1 kB

3 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
3 years ago
4 years ago
4 years ago
4 years ago
3 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <div class="ui container" id="navbar">
  2. <div class="item brand" style="justify-content: space-between;">
  3. <a href="https://openi.org.cn/">
  4. <img class="ui mini image" src="{{StaticUrlPrefix}}/img/logo.svg">
  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. <div class="item edge" >
  12. <div class="dropdown-menu">
  13. <a class=" item lfpd" href="/dashboard">
  14. {{.i18n.Tr "index"}} <i class="dropdown icon mglf"></i>
  15. </a>
  16. <div class="dropdown-content" style="min-width: 110px;border-radius:4px;min-width: max-content;">
  17. <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
  18. <a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
  19. <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/milestones">{{.i18n.Tr "milestones"}}</a>
  20. <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a>
  21. </div>
  22. </div>
  23. </div>
  24. <a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a>
  25. <a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "custom.head.dataset"}}</a>
  26. <div class="ui dropdown item" id='dropdown_explore'>
  27. {{.i18n.Tr "explore"}}
  28. <i class="dropdown icon"></i>
  29. <div class="menu">
  30. <a class="item" href="{{AppSubUrl}}/explore/users">{{.i18n.Tr "explore.users"}}</a>
  31. <a class="item" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "explore.organizations"}}</a>
  32. <a class="item" href="{{AppSubUrl}}/explore/images">{{.i18n.Tr "explore.images"}}</a>
  33. {{if .IsOperator}}
  34. <a class="item" href="{{AppSubUrl}}/explore/data_analysis">{{.i18n.Tr "explore.data_analysis"}}</a>
  35. {{end}}
  36. <a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a>
  37. </div>
  38. </div>
  39. {{else if .IsLandingPageHome}}
  40. <div class="item edge" >
  41. <div class="dropdown-menu">
  42. <a class=" item lfpd" href="/user/login">
  43. {{.i18n.Tr "home"}} <i class="dropdown icon mglf"></i>
  44. </a>
  45. <div class="dropdown-content" style="min-width: 110px;border-radius:4px;min-width: max-content;">
  46. <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "issues"}}</a>
  47. <a style="border: none;color: #000; white-space: nowrap;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "pull_requests"}}</a>
  48. <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/user/login">{{.i18n.Tr "milestones"}}</a>
  49. <a style="border: none;color: #000;" class=" item" href="{{AppSubUrl}}/cloudbrains">{{.i18n.Tr "repo.cloudbrain.task"}}</a>
  50. </div>
  51. </div>
  52. </div>
  53. <a class="item" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "custom.head.project"}}</a>
  54. <a class="item" href="{{AppSubUrl}}/explore/datasets">{{.i18n.Tr "custom.head.dataset"}}</a>
  55. <div class="ui dropdown item" id='dropdown_PageHome'>
  56. {{.i18n.Tr "explore"}}
  57. <i class="dropdown icon"></i>
  58. <div class="menu">
  59. <a class="item" href="{{AppSubUrl}}/explore/users">{{.i18n.Tr "explore.users"}}</a>
  60. <a class="item" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "explore.organizations"}}</a>
  61. <a class="item" href="{{AppSubUrl}}/explore/images">{{.i18n.Tr "explore.images"}}</a>
  62. {{if .IsOperator}}
  63. <a class="item" href="{{AppSubUrl}}/explore/data_analysis">{{.i18n.Tr "explore.data_analysis"}}</a>
  64. {{end}}
  65. <a class="item" href="{{AppSubUrl}}/OpenI">{{.i18n.Tr "custom.head.openi.repo"}}</a>
  66. </div>
  67. </div>
  68. {{else if .IsLandingPageExplore}}
  69. <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "home"}}</a>
  70. {{else if .IsLandingPageOrganizations}}
  71. <a class="item {{if .PageIsExplore}}active{{end}}" href="{{AppSubUrl}}/explore/organizations">{{.i18n.Tr "home"}}</a>
  72. {{end}}
  73. {{template "custom/extra_links" .}}
  74. {{/*
  75. <div class="item">
  76. <div class="ui icon input">
  77. <input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
  78. <i class="search icon"></i>
  79. </div>
  80. </div>
  81. */}}
  82. {{if .IsSigned}}
  83. <div class="right stackable menu">
  84. <a href="{{AppSubUrl}}/notifications" class="item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
  85. <span class="text">
  86. <span class="fitted">{{svg "octicon-bell" 16}}</span>
  87. <span class="sr-mobile-only">{{.i18n.Tr "notifications"}}</span>
  88. {{$notificationUnreadCount := 0}}
  89. {{if .NotificationUnreadCount}}{{$notificationUnreadCount = call .NotificationUnreadCount}}{{end}}
  90. <span class="ui red label {{if not $notificationUnreadCount}}hidden{{end}} notification_count">
  91. {{$notificationUnreadCount}}
  92. </span>
  93. </span>
  94. </a>
  95. <div class="ui dropdown jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
  96. <span class="text">
  97. <span class="fitted">{{svg "octicon-plus" 16}}</span>
  98. <span class="sr-mobile-only">{{.i18n.Tr "create_new"}}</span>
  99. <span class="fitted not-mobile">{{svg "octicon-triangle-down" 16}}</span>
  100. </span>
  101. <div class="menu">
  102. <a class="item" href="{{AppSubUrl}}/repo/create">
  103. <span class="fitted">{{svg "octicon-plus" 16}}</span> {{.i18n.Tr "new_repo"}}
  104. </a>
  105. <a class="item" href="{{AppSubUrl}}/repo/migrate">
  106. <span class="fitted">{{svg "octicon-repo-clone" 16}}</span> {{.i18n.Tr "new_migrate"}}
  107. </a>
  108. {{if .SignedUser.CanCreateOrganization}}
  109. <a class="item" href="{{AppSubUrl}}/org/create">
  110. <span class="fitted">{{svg "octicon-organization" 16}}</span> {{.i18n.Tr "new_org"}}
  111. </a>
  112. {{end}}
  113. </div><!-- end content create new menu -->
  114. </div><!-- end dropdown menu create new -->
  115. <div class="ui dropdown jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
  116. <span class="text">
  117. <img class="ui tiny avatar image" width="24" height="24" src="{{.SignedUser.RelAvatarLink}}">
  118. <span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
  119. <span class="mobile-only">{{.SignedUser.Name}}</span>
  120. <span class="fitted not-mobile" tabindex="-1">{{svg "octicon-triangle-down" 16}}</span>
  121. </span>
  122. <div class="menu user-menu" tabindex="-1">
  123. <div class="ui header">
  124. {{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
  125. </div>
  126. <div class="divider"></div>
  127. <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
  128. {{svg "octicon-person" 16}}
  129. {{.i18n.Tr "your_profile"}}<!-- Your profile -->
  130. </a>
  131. <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
  132. {{svg "octicon-star" 16}}
  133. {{.i18n.Tr "your_starred"}}
  134. </a>
  135. <a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
  136. {{svg "octicon-settings" 16}}
  137. {{.i18n.Tr "your_settings"}}<!-- Your settings -->
  138. </a>
  139. <!--a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">
  140. {{svg "octicon-question" 16}}
  141. {{.i18n.Tr "help"}}<!-- Help -->
  142. </a-->
  143. <a class="item" href="https://git.openi.org.cn/zeizei/OpenI_Learning" target="_blank">
  144. <i class="tutorial_icon">
  145. <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16">
  146. <path fill="none" d="M0 0h24v24H0z"/><path d="M2 3.993A1 1 0 0 1 2.992 3h18.016c.548 0 .992.445.992.993v16.014a1 1 0 0 1-.992.993H2.992A.993.993 0 0 1 2 20.007V3.993zM12 5v14h8V5h-8zm1 2h6v2h-6V7zm0 3h6v2h-6v-2z"/>
  147. </svg>
  148. </i>
  149. {{.i18n.Tr "custom.Platform_Tutorial"}}
  150. </a>
  151. {{if .IsAdmin}}
  152. <div class="divider"></div>
  153. <a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
  154. <i class="icon settings"></i>
  155. {{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
  156. </a>
  157. {{end}}
  158. <div class="divider"></div>
  159. <a class="item link-action" href data-url="{{AppSubUrl}}/user/logout" data-redirect="{{AppSubUrl}}/">
  160. {{svg "octicon-sign-out" 16}}
  161. {{.i18n.Tr "sign_out"}}<!-- Sign Out -->
  162. </a>
  163. </div><!-- end content avatar menu -->
  164. </div><!-- end dropdown avatar menu -->
  165. </div><!-- end signed user right menu -->
  166. {{else}}
  167. <!--a class="item" target="_blank" rel="noopener noreferrer" href="https://docs.gitea.io">{{.i18n.Tr "help"}}</a-->
  168. <div class="right stackable menu">
  169. {{if .ShowRegistrationButton}}
  170. <a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
  171. {{svg "octicon-person" 16}} {{.i18n.Tr "register"}}
  172. </a>
  173. {{end}}
  174. <a class="item{{if .PageIsSignIn}} active{{end}}" rel="nofollow" href="{{AppSubUrl}}/user/login">
  175. {{svg "octicon-sign-in" 16}} {{.i18n.Tr "sign_in"}}
  176. </a>
  177. </div><!-- end anonymous right menu -->
  178. {{end}}
  179. </div>