dashboard.tmpl 12 KB

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