head.tmpl 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  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. <meta name="_suburl" content="{{AppSubUrl}}" />
  12. {{if .GoGetImport}}
  13. <meta name="go-import" content="{{.GoGetImport}} git {{.CloneLink.HTTPS}}">
  14. {{end}}
  15. <link rel="shortcut icon" href="{{AppSubUrl}}/img/favicon.png" />
  16. <script src="{{AppSubUrl}}/js/jquery-1.11.3.min.js"></script>
  17. <link rel="stylesheet" href="{{AppSubUrl}}/css/font-awesome-4.4.0.min.css">
  18. <!-- Stylesheet -->
  19. <link rel="stylesheet" href="{{AppSubUrl}}/css/semantic-2.1.3.min.css">
  20. <link rel="stylesheet" href="{{AppSubUrl}}/css/gogs.min.css?v={{AppVer}}">
  21. <!-- JavaScript -->
  22. <script src="{{AppSubUrl}}/js/semantic-2.1.3.min.js"></script>
  23. <script src="{{AppSubUrl}}/js/gogs.js?v={{AppVer}}"></script>
  24. <title>{{if .Title}}{{.Title}} - {{end}}{{AppName}}</title>
  25. </head>
  26. <body>
  27. <div class="full height">
  28. <noscript>Please enable JavaScript in your browser!</noscript>
  29. {{if not .PageIsInstall}}
  30. <div class="following bar light">
  31. <div class="ui container">
  32. <div class="ui grid">
  33. <div class="column">
  34. <div class="ui top secondary menu">
  35. <a class="item brand" href="{{AppSubUrl}}/">
  36. <img class="ui mini image" src="{{AppSubUrl}}/img/favicon.png">
  37. </a>
  38. {{if .IsSigned}}
  39. <a class="item{{if .PageIsDashboard}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "dashboard"}}</a>
  40. <a class="item{{if .PageIsIssues}} active{{end}}" href="{{AppSubUrl}}/issues">{{.i18n.Tr "issues"}}</a>
  41. <a class="item{{if .PageIsPulls}} active{{end}}" href="{{AppSubUrl}}/pulls">{{.i18n.Tr "pull_requests"}}</a>
  42. {{else}}
  43. <a class="item{{if .PageIsHome}} active{{end}}" href="{{AppSubUrl}}/">{{.i18n.Tr "home"}}</a>
  44. {{end}}
  45. <a class="item{{if .PageIsExplore}} active{{end}}" href="{{AppSubUrl}}/explore">{{.i18n.Tr "explore"}}</a>
  46. <!-- <div class="item">
  47. <div class="ui icon input">
  48. <input class="searchbox" type="text" placeholder="{{.i18n.Tr "search_project"}}">
  49. <i class="search icon"></i>
  50. </div>
  51. </div> -->
  52. {{if .IsSigned}}
  53. <div class="right menu">
  54. <div class="ui dropdown head link jump item poping up" data-content="{{.i18n.Tr "create_new"}}" data-variation="tiny inverted">
  55. <span class="text">
  56. <i class="octicon octicon-plus"></i>
  57. <i class="octicon octicon-triangle-down"></i>
  58. </span>
  59. <div class="menu">
  60. <a class="item" href="{{AppSubUrl}}/repo/create">
  61. <i class="icon octicon octicon-repo-create"></i> {{.i18n.Tr "new_repo"}}
  62. </a>
  63. <a class="item" href="{{AppSubUrl}}/repo/migrate">
  64. <i class="icon octicon octicon-repo-clone"></i> {{.i18n.Tr "new_migrate"}}
  65. </a>
  66. <a class="item" href="{{AppSubUrl}}/org/create">
  67. <i class="icon octicon octicon-organization"></i> {{.i18n.Tr "new_org"}}
  68. </a>
  69. </div><!-- end content create new menu -->
  70. </div><!-- end dropdown menu create new -->
  71. <div class="ui dropdown head link jump item poping up" tabindex="-1" data-content="{{.i18n.Tr "user_profile_and_more"}}" data-variation="tiny inverted">
  72. <span class="text avatar">
  73. <img class="ui small rounded image" src="{{.SignedUser.AvatarLink}}">
  74. <i class="octicon octicon-triangle-down" tabindex="-1"></i>
  75. </span>
  76. <div class="menu" tabindex="-1">
  77. <div class="ui header">
  78. {{.i18n.Tr "signed_in_as"}} <strong>{{.SignedUser.Name}}</strong>
  79. </div>
  80. <div class="divider"></div>
  81. <a class="item" href="{{AppSubUrl}}/{{.SignedUser.Name}}">
  82. <i class="icon octicon octicon-person"></i>
  83. {{.i18n.Tr "your_profile"}}<!-- Your profile -->
  84. </a>
  85. <a class="{{if .PageIsUserSettings}}active{{end}} item" href="{{AppSubUrl}}/user/settings">
  86. <i class="icon octicon octicon-settings"></i>
  87. {{.i18n.Tr "your_settings"}}<!-- Your settings -->
  88. </a>
  89. <a class="item" target="_blank" href="http://gogs.io/docs" rel="noreferrer">
  90. <i class="icon 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="icon 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" href="http://gogs.io/docs" rel="noreferrer">{{.i18n.Tr "help"}}</a>
  110. <div class="right menu">
  111. {{if .ShowRegistrationButton}}
  112. <a class="item{{if .PageIsSignUp}} active{{end}}" href="{{AppSubUrl}}/user/sign_up">
  113. <i class="icon octicon octicon-person-add"></i> {{.i18n.Tr "register"}}
  114. </a>
  115. {{end}}
  116. <a class="item{{if .PageIsSignIn}} active{{end}}" href="{{AppSubUrl}}/user/login">
  117. <i class="icon octicon octicon-sign-in"></i> {{.i18n.Tr "sign_in"}}
  118. </a>
  119. </div><!-- end anonymous right menu -->
  120. {{end}}
  121. </div><!-- end top menu -->
  122. </div><!-- end column -->
  123. </div><!-- end grid -->
  124. </div><!-- end container -->
  125. </div><!-- end bar -->
  126. {{end}}