dashboard.tmpl 11 KB

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