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.tmpl 5.9KB

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