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.

209 lines
9.0 KiB

10 years ago
9 years ago
9 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
10 years ago
9 years ago
9 years ago
  1. <!DOCTYPE html>
  2. <html>
  3. <head data-suburl="{{AppSubUrl}}">
  4. <meta charset="utf-8">
  5. <meta http-equiv="x-ua-compatible" content="ie=edge">
  6. <title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>
  7. <meta name="theme-color" content="{{ThemeColorMetaTag}}">
  8. <meta name="author" content="{{if .Repository}}{{.Owner.Name}}{{else}}{{MetaAuthor}}{{end}}" />
  9. <meta name="description" content="{{if .Repository}}{{.Repository.Name}}{{if .Repository.Description}} - {{.Repository.Description}}{{end}}{{else}}{{MetaDescription}}{{end}}" />
  10. <meta name="keywords" content="{{MetaKeywords}}">
  11. <meta name="referrer" content="no-referrer" />
  12. <meta name="_csrf" content="{{.CsrfToken}}" />
  13. <meta name="_suburl" content="{{AppSubUrl}}" />
  14. {{if .GoGetImport}}
  15. <meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
  16. <meta name="go-source" content="{{.GoGetImport}} _ {{.GoDocDirectory}} {{.GoDocFile}}">
  17. {{end}}
  18. <link rel="shortcut icon" href="{{AppSubUrl}}/img/favicon.png" />
  19. <link rel="stylesheet" href="{{AppSubUrl}}/assets/font-awesome-4.6.3/css/font-awesome.min.css">
  20. <link rel="stylesheet" href="{{AppSubUrl}}/assets/octicons-4.3.0/octicons.min.css">
  21. {{if .RequireSimpleMDE}}
  22. <link rel="stylesheet" href="{{AppSubUrl}}/plugins/simplemde-1.10.1/simplemde.min.css">
  23. {{end}}
  24. {{if .RequireGitGraph}}
  25. <!-- graph -->
  26. <link rel="stylesheet" href="{{AppSubUrl}}/css/gitgraph.css">
  27. {{end}}
  28. <!-- Stylesheet -->
  29. <link rel="stylesheet" href="{{AppSubUrl}}/css/semantic-2.2.1.min.css">
  30. <link rel="stylesheet" href="{{AppSubUrl}}/css/index.css?v={{MD5 AppVer}}">
  31. {{if .RequireHighlightJS}}
  32. <link rel="stylesheet" href="{{AppSubUrl}}/plugins/highlight-9.6.0/github.css">
  33. {{end}}
  34. {{if .RequireMinicolors}}
  35. <link rel="stylesheet" href="{{AppSubUrl}}/plugins/jquery.minicolors-2.2.3/jquery.minicolors.css">
  36. {{end}}
  37. {{if .RequireDatetimepicker}}
  38. <link rel="stylesheet" href="{{AppSubUrl}}/plugins/jquery.datetimepicker-2.4.5/jquery.datetimepicker.css">
  39. {{end}}
  40. {{if .RequireDropzone}}
  41. <link rel="stylesheet" href="{{AppSubUrl}}/plugins/dropzone-4.2.0/dropzone.css">
  42. {{end}}
  43. <style class="list-search-style"></style>
  44. <!-- Open Graph -->
  45. {{if .PageIsUserProfile}}
  46. <meta property="og:title" content="{{.Owner.Name}}" />
  47. <meta property="og:type" content="profile" />
  48. <meta property="og:image" content="{{.Owner.AvatarLink}}" />
  49. <meta property="og:url" content="{{.Owner.HTMLURL}}" />
  50. <meta property="og:site_name" content="{{AppName}}" />
  51. {{else if .Repository}}
  52. <meta property="og:title" content="{{.Repository.Name}}" />
  53. <meta property="og:type" content="object" />
  54. <meta property="og:image" content="{{.Repository.Owner.AvatarLink}}" />
  55. <meta property="og:url" content="{{.Repository.HTMLURL}}" />
  56. {{if .Repository.Description}}
  57. <meta property="og:description" content="{{.Repository.Description}}" />
  58. {{end}}
  59. <meta property="og:site_name" content="{{AppName}}" />
  60. {{else}}
  61. <meta property="og:title" content="{{AppName}}">
  62. <meta property="og:type" content="website" />
  63. <meta property="og:image" content="{{AppSubUrl}}/img/gitea-lg.png" />
  64. <meta property="og:url" content="{{AppUrl}}" />
  65. <meta property="og:description" content="{{MetaDescription}}">
  66. {{end}}
  67. </head>
  68. <body>
  69. <div class="full height">
  70. <noscript>Please enable JavaScript in your browser!</noscript>
  71. {{if not .PageIsInstall}}
  72. <div class="following bar light">
  73. <div class="ui container">
  74. <div class="ui grid">
  75. <div class="column">
  76. <div class="ui top secondary menu">
  77. <a class="item brand" href="{{AppSubUrl}}/">
  78. <img class="ui mini image" src="{{AppSubUrl}}/img/favicon.png">
  79. </a>
  80. {{if .IsSigned}}
  81. <a class="item{{if .PageIsDashboard}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
  82. <a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
  83. <a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
  84. {{else}}
  85. <a class="item{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
  86. {{end}}
  87. <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore/repos">{{.i18n.Tr "explore"}}</a>
  88. {{/*<div class="item">
  89. <div class="ui icon input">
  90. <input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
  91. <i class="search icon"></i>
  92. </div>
  93. </div>*/}}
  94. {{if .IsSigned}}
  95. <div class="right menu">
  96. <a href="{{AppSubUrl}}/notifications" class="ui head link jump item poping up" data-content='{{.i18n.Tr "notifications"}}' data-variation="tiny inverted">
  97. <span class="text">
  98. <i class="octicon octicon-inbox"><span class="sr-only">{{.i18n.Tr "notifications"}}</span></i>
  99. {{if .NotificationUnreadCount}}
  100. <span class="ui red label">
  101. {{.NotificationUnreadCount}}
  102. </span>
  103. {{end}}
  104. </span>
  105. </a>
  106. <div class="ui dropdown head link jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
  107. <span class="text">
  108. <i class="octicon octicon-plus"><span class="sr-only">{{.i18n.Tr "create_new"}}</span></i>
  109. <i class="octicon octicon-triangle-down"></i>
  110. </span>
  111. <div class="menu">
  112. <a class="item" href="{{AppSubUrl}}/repo/create">
  113. <i class="octicon octicon-plus"></i> {{.i18n.Tr "new_repo"}}
  114. </a>
  115. <a class="item" href="{{AppSubUrl}}/repo/migrate">
  116. <i class="octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
  117. </a>
  118. {{if .SignedUser.CanCreateOrganization}}
  119. <a class="item" href="{{AppSubUrl}}/org/create">
  120. <i class="octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
  121. </a>
  122. {{end}}
  123. </div><!-- end content create new menu -->
  124. </div><!-- end dropdown menu create new -->
  125. <div class="ui dropdown head link jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
  126. <span class="text avatar">
  127. <img class="ui small rounded image" src="{{.SignedUser.RelAvatarLink}}">
  128. <span class="sr-only">{{.i18n.Tr "user_profile_and_more"}}</span>
  129. <i class="octicon octicon-triangle-down" tabindex="-1"></i>
  130. </span>
  131. <div class="menu" tabindex="-1">
  132. <div class="ui header">
  133. {{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
  134. </div>
  135. <div class="divider"></div>
  136. <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
  137. <i class="octicon octicon-person"></i>
  138. {{.i18n.Tr "your_profile"}}<!-- Your profile -->
  139. </a>
  140. <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}?tab=stars">
  141. <i class="octicon octicon-star"></i>
  142. {{.i18n.Tr "your_starred"}}
  143. </a>
  144. <a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
  145. <i class="octicon octicon-settings"></i>
  146. {{.i18n.Tr "your_settings"}}<!-- Your settings -->
  147. </a>
  148. <a class="item" target="_blank" rel="noopener" href="https://docs.gitea.io" rel="noreferrer">
  149. <i class="octicon octicon-question"></i>
  150. {{.i18n.Tr "help"}}<!-- Help -->
  151. </a>
  152. {{if .IsAdmin}}
  153. <div class="divider"></div>
  154. <a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
  155. <i class="icon settings"></i>
  156. {{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
  157. </a>
  158. {{end}}
  159. <div class="divider"></div>
  160. <a class="item" href="{{AppSubUrl}}/user/logout">
  161. <i class="octicon octicon-sign-out"></i>
  162. {{.i18n.Tr "sign_out"}}<!-- Sign Out -->
  163. </a>
  164. </div><!-- end content avatar menu -->
  165. </div><!-- end dropdown avatar menu -->
  166. </div><!-- end signed user right menu -->
  167. {{else}}
  168. <a class="item" target="_blank" rel="noopener" href="https://docs.gitea.io" rel="noreferrer">{{.i18n.Tr "help"}}</a>
  169. <div class="right menu">
  170. {{if .ShowRegistrationButton}}
  171. <a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
  172. <i class="octicon octicon-person"></i> {{.i18n.Tr "register"}}
  173. </a>
  174. {{end}}
  175. <a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login?redirect_to={{.Link}}">
  176. <i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
  177. </a>
  178. </div><!-- end anonymous right menu -->
  179. {{end}}
  180. </div><!-- end top menu -->
  181. </div><!-- end column -->
  182. </div><!-- end grid -->
  183. </div><!-- end container -->
  184. </div><!-- end bar -->
  185. {{end}}
  186. {{/*
  187. </div>
  188. </body>
  189. </html>
  190. */}}