dashboard.tmpl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278
  1. {{template "base/head" .}}
  2. <div class="dashboard feeds">
  3. {{template "user/dashboard/navbar" .}}
  4. <div class="ui container">
  5. {{if not .Feeds}}
  6. {{if not .ContextUser.IsOrganization}}
  7. {{if .PageIsDashboard}}
  8. {{if .IsAdmin}}
  9. {{template "user/dashboard/bootcamp" .}}
  10. {{end}}
  11. {{end}}
  12. {{end}}
  13. {{end}}
  14. <div class="ui grid">
  15. <div class="ten wide column">
  16. {{template "user/dashboard/feeds" .}}
  17. {{if .AfterID}}
  18. <center>
  19. <button class="ui basic green show-modal button ajax-load-button" data-url="{{.Link}}?after_id={{.AfterID}}">🔮 More</button>
  20. </center>
  21. {{end}}
  22. <div class="ui stackable grid container home-footer">
  23. <div class="seven wide left floated column">
  24. <span class="ui header"><img src="https://cdn.jsdelivr.net/npm/gitote@1.0.1/logo.png">© 2018 Gitote</span>
  25. </div>
  26. <div class="three wide column">
  27. <div class="ui link list">
  28. <a class="item" href="https://blog.gitote.in">Blog</a>
  29. <a class="item" href="{{AppURL}}about">About</a>
  30. <a class="item" href="{{AppURL}}shop">Shop</a>
  31. <a class="item" href="{{AppURL}}contact">Contact</a>
  32. </div>
  33. </div>
  34. <div class="three wide column">
  35. <div class="ui link list">
  36. <a class="item" href="{{AppURL}}faq">FAQ</a>
  37. <a class="item" href="https://status.gitote.in">Status</a>
  38. <a class="item" href="{{AppURL}}security">Security</a>
  39. </div>
  40. </div>
  41. <div class="three wide column">
  42. <div class="ui link list">
  43. <a class="item" href="{{AppURL}}terms">Terms</a>
  44. <a class="item" href="{{AppURL}}privacy">Privacy</a>
  45. <a class="item" href="{{AppURL}}help">Help</a>
  46. </div>
  47. </div>
  48. </div>
  49. </div>
  50. <div class="six wide column">
  51. {{if not .ContextUser.IsOrganization}}
  52. <div class="ui cards">
  53. <div class="profile-card card">
  54. <div class="content">
  55. <img class="right floated mini ui image" src="{{.LoggedUser.RelAvatarLink}}">
  56. <div class="header">
  57. <a style="color:#212121" href="{{AppSubURL}}/{{.LoggedUser.Name}}">
  58. {{.Owner.FullName}}
  59. {{if .Owner.IsVerified}}<a class="poping up" target="_blank" href="/verified" data-content="Verified" data-variation="inverted tiny" data-position="right center"><i class="verified octicon octicon-verified"></i></a>{{end}}
  60. {{if .Owner.IsMaker}}<a class="poping up" target="_blank" href="/maker" data-content="Maker" data-variation="inverted tiny" data-position="right center"><i class="maker octicon octicon-paintcan"></i></a>{{end}}
  61. {{if .Owner.IsBugHunter}}<a class="poping up" target="_blank" href="/security" data-content="Bug Hunter" data-variation="inverted tiny" data-position="right center"><i class="bughunter octicon octicon-gist-secret"></i></a>{{end}}
  62. {{if .Owner.IsBeta}}<a class="poping up" target="_blank" href="/developer" data-content="Beta Member" data-variation="inverted tiny" data-position="right center"><i class="developer octicon octicon-circuit-board"></i></a>{{end}}
  63. {{if .Owner.IsStaff}}<a class="poping up" target="_blank" href="/jobs" data-content="Staff" data-variation="inverted tiny" data-position="right center"><i class="isstaff octicon octicon-tools"></i></a>{{end}}
  64. </a>
  65. </div>
  66. <div class="meta">
  67. @{{.Owner.Name}}
  68. </div>
  69. <div class="profile-card meta">
  70. {{if .Owner.Description}}
  71. <div class="description card-desc">
  72. <span>{{.Owner.Description}}</span>
  73. </div>
  74. {{end}}
  75. {{if .Owner.Website}}
  76. <div class="description">
  77. <a target="_blank" rel="noopener noreferrer" href="{{.Owner.Website}}"><i class="menu-icon octicon">🔗</i> {{.Owner.Website}}</a>
  78. </div>
  79. {{end}}
  80. </div>
  81. </div>
  82. <div class="extra content">
  83. <div class="ui two buttons">
  84. <div style="font-weight:bold;font-size:15px" class="ui basic button">
  85. <a href="{{.Owner.HomeLink}}/followers">{{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}</a>
  86. </div>
  87. <div class="v-divider"></div>
  88. <div style="font-weight:bold;font-size:15px" class="ui basic button">
  89. <a href="{{.Owner.HomeLink}}/following">{{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}</a>
  90. </div>
  91. </div>
  92. </div>
  93. </div>
  94. </div>
  95. {{end}}
  96. <div class="ui {{if not .ContextUser.IsOrganization}}three{{else}}two{{end}} item tabable menu">
  97. <a class="item active" data-tab="repos">{{.i18n.Tr "repository"}}</a>
  98. {{if not .ContextUser.IsOrganization}}
  99. <a class="item" data-tab="orgs">{{.i18n.Tr "organization"}}</a>
  100. {{end}}
  101. <a class="item" data-tab="mirrors">{{.i18n.Tr "mirror"}}</a>
  102. </div>
  103. <div class="ui tab active list" data-tab="repos">
  104. <div class="ui top attached header">
  105. <i class="menu-icon octicon">📁</i> {{.i18n.Tr "home.my_repos"}} <span class="ui grey label">{{.RepoCount}}</span>
  106. <div class="ui right">
  107. <a class="poping up" href="{{AppSubURL}}/repo/create{{if .ContextUser.IsOrganization}}?org={{.ContextUser.ID}}{{end}}" data-content="{{.i18n.Tr "new_repo"}}" data-variation="tiny inverted" data-position="left center">
  108. <i class="plus icon"></i>
  109. <span class="sr-only">{{.i18n.Tr "new_repo"}}</span>
  110. </a>
  111. </div>
  112. </div>
  113. <div class="ui attached table segment">
  114. <ul class="repo-owner-name-list">
  115. {{if not .RepoCount}}
  116. <center>
  117. <h5 style="padding-top:20px">No Repos Found 🤷</h5>
  118. <a href="{{AppSubURL}}/repo/create">
  119. <button style="margin-bottom:20px" class="ui green button">
  120. {{.i18n.Tr "repo.create_repo"}}
  121. </button>
  122. </a>
  123. </center>
  124. {{end}}
  125. {{range .Repos}}
  126. <li {{if .IsPrivate}}class="private"{{end}}>
  127. <a href="{{AppSubURL}}/{{$.ContextUser.Name}}/{{.Name}}">
  128. <i class="octicon octicon-{{if .IsFork}}repo-forked{{else if .IsPrivate}}lock{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
  129. <strong class="text truncate item-name">{{.Name}}</strong>
  130. <span class="ui right text light grey">
  131. {{.NumStars}} <i class="menu-icon octicon">⭐</i>
  132. </span>
  133. </a>
  134. </li>
  135. {{end}}
  136. {{if gt .ContextUser.NumRepos .MaxShowRepoNum}}
  137. <li>
  138. <a href="{{.ContextUser.HomeLink}}">{{.i18n.Tr "home.show_more_repos"}}</a>
  139. </li>
  140. {{end}}
  141. </ul>
  142. </div>
  143. {{if not .ContextUser.IsOrganization}}
  144. <h4 class="ui top attached header">
  145. <i class="menu-icon octicon">👯</i> {{.i18n.Tr "home.collaborative_repos"}}
  146. </h4>
  147. <div class="ui attached table segment">
  148. <ul id="collaborative-repo-list">
  149. {{if not .CollaborativeRepos}}
  150. <center>
  151. <h5 style="padding-top:20px">No Repos Found 🤷</h5>
  152. <a href="{{AppSubURL}}/explore/repos">
  153. <button style="margin-bottom:20px" class="ui green button">
  154. {{.i18n.Tr "explore"}}
  155. </button>
  156. </a>
  157. </center>
  158. {{end}}
  159. {{range .CollaborativeRepos}}
  160. <li {{if .IsPrivate}}class="private"{{end}}>
  161. <a href="{{AppSubURL}}/{{.Owner.Name}}/{{.Name}}">
  162. <i class="octicon octicon-{{if .IsPrivate}}lock{{else if .IsFork}}repo-forked{{else if .IsMirror}}repo-clone{{else}}repo{{end}}"></i>
  163. <span class="text truncate owner-and-repo">
  164. <span class="text truncate owner-name">{{.Owner.Name}}</span> / <strong>{{.Name}}</strong>
  165. </span>
  166. <span class="ui right text light grey">
  167. {{.NumStars}} <i class="menu-icon octicon">⭐</i>
  168. </span>
  169. </a>
  170. </li>
  171. {{end}}
  172. </ul>
  173. </div>
  174. {{end}}
  175. </div>
  176. {{if not .ContextUser.IsOrganization}}
  177. <div class="ui tab list" data-tab="orgs">
  178. <div class="ui top attached header">
  179. <i class="menu-icon octicon">🏢</i> {{.i18n.Tr "home.my_orgs"}} <span class="ui grey label">{{.ContextUser.GetOrganizationCount}}</span>
  180. {{if .LoggedUser.CanCreateOrganization}}
  181. <div class="ui right">
  182. <a class="poping up" href="{{AppSubURL}}/org/create" data-content="{{.i18n.Tr "new_org"}}" data-variation="tiny inverted" data-position="left center">
  183. <i class="plus icon"></i>
  184. <span class="sr-only">{{.i18n.Tr "new_org"}}</span>
  185. </a>
  186. </div>
  187. {{end}}
  188. </div>
  189. <div class="ui attached table segment">
  190. <ul class="repo-owner-name-list">
  191. {{if not .ContextUser.Orgs}}
  192. <center>
  193. <h5 style="padding-top:20px">No Orgs Found 🤷</h5>
  194. <a href="{{AppSubURL}}/explore/organizations">
  195. <button style="margin-bottom:20px" class="ui green button">
  196. {{.i18n.Tr "explore"}}
  197. </button>
  198. </a>
  199. </center>
  200. {{end}}
  201. {{range .ContextUser.Orgs}}
  202. <li>
  203. <a href="{{AppSubURL}}/{{.Name}}">
  204. <i class="octicon octicon-organization"></i>
  205. <strong class="text truncate item-name">{{.Name}}</strong>
  206. <span class="ui right text light grey">
  207. {{.NumRepos}} <i class="menu-icon octicon">📁</i>
  208. </span>
  209. </a>
  210. </li>
  211. {{end}}
  212. </ul>
  213. </div>
  214. </div>
  215. {{end}}
  216. <div class="ui tab list" data-tab="mirrors">
  217. <div class="ui top attached header">
  218. <i class="menu-icon octicon">🤳</i> {{.i18n.Tr "home.my_mirrors"}} <span class="ui grey label">{{.MirrorCount}}</span>
  219. <div class="ui right">
  220. <a class="poping up" href="{{AppSubURL}}/repo/migrate?mirror=1" data-content="{{.i18n.Tr "new_mirror"}}" data-variation="tiny inverted" data-position="left center">
  221. <i class="plus icon"></i>
  222. <span class="sr-only">{{.i18n.Tr "new_mirror"}}</span>
  223. </a>
  224. </div>
  225. </div>
  226. <div class="ui attached table segment">
  227. <ul class="repo-owner-name-list">
  228. {{if not .Mirrors}}
  229. <center>
  230. <h5 style="padding-top:20px">No Mirrors Found 🤷</h5>
  231. <a href="{{AppSubURL}}/repo/migrate?mirror=1">
  232. <button style="margin-bottom:20px" class="ui green button">
  233. {{.i18n.Tr "repo.create_repo"}}
  234. </button>
  235. </a>
  236. </center>
  237. {{end}}
  238. {{range .Mirrors}}
  239. <li {{if .IsPrivate}}class="private"{{end}}>
  240. <a href="{{AppSubURL}}/{{$.ContextUser.Name}}/{{.Name}}">
  241. <i class="octicon octicon-repo-clone"></i>
  242. <strong class="text truncate item-name">{{.Name}}</strong>
  243. <span class="ui right text light grey">
  244. {{.Interval}}H <i class="octicon octicon-sync rear"></i>
  245. </span>
  246. </a>
  247. </li>
  248. {{end}}
  249. </ul>
  250. </div>
  251. </div>
  252. {{template "misc/sponsor" .}}
  253. {{template "misc/ad" .}}
  254. <div class="side-footer">
  255. <span class="side-footer">© 2018 Gitote</span>
  256. <a class="contents" href="{{AppURL}}about">About</a>
  257. <a class="contents" href="{{AppURL}}faq">FAQ</a>
  258. <a class="contents" href="{{AppURL}}help">Help</a>
  259. <a class="contents" href="https://status.gitote.in" target="_blank">
  260. Status
  261. <span style="font-size:8px" class="sitestatus ui empty circular label mini"></span>
  262. </a>
  263. <a class="contents" href="{{AppURL}}tos">Terms</a>
  264. <a class="contents" href="{{AppURL}}privacy">Privacy</a>
  265. <a class="contents" href="{{AppURL}}brand">Brand</a>
  266. <a class="contents" href="https://blog.gitote.in">Blog</a>
  267. <a class="contents" href="{{AppURL}}contact">Contact</a>
  268. </div>
  269. </div>
  270. </div>
  271. </div>
  272. </div>
  273. {{template "base/footer" .}}