head.tmpl 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159
  1. <!DOCTYPE html>
  2. <html>
  3. <head data-suburl="{{AppSubUrl}}">
  4. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge"/>
  6. <meta name="author" content="Gogs - Go Git Service" />
  7. <meta name="description" content="Gogs(Go Git Service) a painless self-hosted Git Service written in Go" />
  8. <meta name="keywords" content="go, git, self-hosted, gogs">
  9. <meta name="referrer" content="no-referrer" />
  10. <meta name="_csrf" content="{{.CsrfToken}}" />
  11. {{if .GoGetImport}}
  12. <meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
  13. {{end}}
  14. <link rel="shortcut icon" href="{{AppSubUrl}}/img/favicon.png" />
  15. {{if CdnMode}}
  16. <script src="//code.jquery.com/jquery-1.11.3.min.js"></script>
  17. <link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css">
  18. {{else}}
  19. <script src="{{AppSubUrl}}/js/jquery-1.11.3.min.js"></script>
  20. <link rel="stylesheet" href="{{AppSubUrl}}/css/font-awesome.min.css">
  21. {{end}}
  22. <!-- Stylesheet -->
  23. <link rel="stylesheet" href="{{AppSubUrl}}/css/semantic.min.css?v={{AppVer}}">
  24. <link rel="stylesheet" href="{{AppSubUrl}}/css/gogs.min.css?v={{AppVer}}">
  25. <!-- JavaScript -->
  26. <script src="{{AppSubUrl}}/js/semantic.min.js?v={{AppVer}}"></script>
  27. <script src="{{AppSubUrl}}/js/gogs.js?v={{AppVer}}"></script>
  28. <!-- Third-party libraries -->
  29. {{if .RequireMinicolors}}
  30. <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.minicolors.css?v={{AppVer}}">
  31. <script src="{{AppSubUrl}}/js/libs/jquery.minicolors.min.js?v={{AppVer}}"></script>
  32. {{end}}
  33. {{if .RequireDatetimepicker}}
  34. <link rel="stylesheet" href="{{AppSubUrl}}/css/jquery.datetimepicker.css?v={{AppVer}}">
  35. <script src="{{AppSubUrl}}/js/libs/jquery.datetimepicker.js?v={{AppVer}}"></script>
  36. {{end}}
  37. {{if .RequireDropzone}}
  38. <link rel="stylesheet" href="{{AppSubUrl}}/css/dropzone.css?v={{AppVer}}">
  39. <script src="{{AppSubUrl}}/js/libs/dropzone.js?v={{AppVer}}"></script>
  40. {{end}}
  41. <title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>
  42. </head>
  43. <body>
  44. <div class="full height">
  45. <noscript>Please enable JavaScript in your browser!</noscript>
  46. {{if not .PageIsInstall}}
  47. <div class="following bar light">
  48. <div class="ui container">
  49. <div class="ui grid">
  50. <div class="column">
  51. <div class="ui top secondary menu">
  52. <a class="item brand" href="{{AppSubUrl}}/">
  53. <img class="ui mini image" src="{{AppSubUrl}}/img/favicon.png">
  54. </a>
  55. {{if .IsSigned}}
  56. <a class="item{{if .PageIsDashboard}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
  57. {{else}}
  58. <a class="item{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
  59. {{end}}
  60. <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore"}}</a>
  61. <!-- <div class="item">
  62. <div class="ui icon input">
  63. <input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
  64. <i class="search icon"></i>
  65. </div>
  66. </div> -->
  67. {{if .IsSigned}}
  68. <a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
  69. <div class="right menu">
  70. <div class="ui dropdown head link jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
  71. <span class="text">
  72. <i class="octicon octicon-plus"></i>
  73. <i class="octicon octicon-triangle-down"></i>
  74. </span>
  75. <div class="menu">
  76. <a class="item" href="{{AppSubUrl}}/repo/create">
  77. <i class="octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}
  78. </a>
  79. <a class="item" href="{{AppSubUrl}}/repo/migrate">
  80. <i class="octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
  81. </a>
  82. <a class="item" href="{{AppSubUrl}}/org/create">
  83. <i class="octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
  84. </a>
  85. </div><!-- end content create new menu -->
  86. </div><!-- end dropdown menu create new -->
  87. <div class="ui dropdown head link jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
  88. <span class="text avatar">
  89. <img class="ui small rounded image" src="{{.SignedUser.AvatarLink}}">
  90. <i class="octicon octicon-triangle-down" tabindex="-1"></i>
  91. </span>
  92. <div class="menu" tabindex="-1">
  93. <div class="ui header">
  94. {{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
  95. </div>
  96. <div class="divider"></div>
  97. <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
  98. <i class="octicon icon octicon-person"></i>
  99. {{.i18n.Tr "your_profile"}}<!-- Your profile -->
  100. </a>
  101. <a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
  102. <i class="octicon icon octicon-settings"></i>
  103. {{.i18n.Tr "your_settings"}}<!-- Your settings -->
  104. </a>
  105. <a class="item" target="_blank" href="http://gogs.io/docs" rel="noreferrer">
  106. <i class="octicon icon octicon-question"></i>
  107. {{.i18n.Tr "help"}}<!-- Help -->
  108. </a>
  109. {{if .IsAdmin}}
  110. <div class="divider"></div>
  111. <a class="{{if .PageIsAdmin}}active{{end}} item" href="{{AppSubUrl}}/admin">
  112. <i class="icon settings"></i>
  113. {{.i18n.Tr "admin_panel"}}<!-- Admin Panel -->
  114. </a>
  115. {{end}}
  116. <div class="divider"></div>
  117. <a class="item" href="{{AppSubUrl}}/user/logout">
  118. <i class="octicon icon octicon-sign-out"></i>
  119. {{.i18n.Tr "sign_out"}}<!-- Sign Out -->
  120. </a>
  121. </div><!-- end content avatar menu -->
  122. </div><!-- end dropdown avatar menu -->
  123. </div><!-- end signed user right menu -->
  124. {{else}}
  125. <a class="item" target="_blank" href="http://gogs.io/docs" rel="noreferrer">{{.i18n.Tr "help"}}</a>
  126. <div class="right menu">
  127. {{if .ShowRegistrationButton}}
  128. <a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
  129. <i class="octicon octicon-person-add"></i> {{.i18n.Tr "register"}}
  130. </a>
  131. {{end}}
  132. <a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login">
  133. <i class="octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
  134. </a>
  135. </div><!-- end anonymous right menu -->
  136. {{end}}
  137. </div><!-- end top menu -->
  138. </div><!-- end column -->
  139. </div><!-- end grid -->
  140. </div><!-- end container -->
  141. </div><!-- end bar -->
  142. {{end}}