profile.tmpl 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. {{template "base/head" .}}
  2. {{if not .IsLogged}}
  3. {{template "misc/signup_prompt" .}}
  4. {{end}}
  5. <div class="mobile-card">
  6. <div class="content">
  7. <img class="right floated mini ui image" src="{{AppendAvatarSize .Owner.RelAvatarLink 300}}" title="{{.Owner.Name}}">
  8. <div class="header">
  9. {{if .Owner.FullName}}
  10. <span class="mobile-name">{{.Owner.FullName}}</span>
  11. {{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}}
  12. {{end}}
  13. </div>
  14. <div class="meta">
  15. @{{.Owner.Name}}
  16. </div>
  17. {{if .Owner.Status}}
  18. <div><p class="status" style="font-weight:500">{{.Owner.Status}}</p></div>
  19. {{end}}
  20. <div class="profile-card meta">
  21. {{if .Owner.Description}}
  22. <span class="user description">
  23. <p>{{.Owner.Description}}</p>
  24. </span>
  25. {{end}}
  26. {{if .Owner.Location}}
  27. <br/>
  28. <i class="menu-icon octicon">📍</i> {{.Owner.Location}}
  29. {{end}}
  30. {{if .Owner.Company}}
  31. <br/>
  32. <i class="menu-icon octicon">🏢</i> {{.Owner.Company}}
  33. {{if .Owner.IsStaff}}<span class="staff">Staff</span>{{end}}
  34. {{end}}
  35. {{if and .Owner.Email .IsLogged}}
  36. {{if not .Owner.PrivateEmail}}
  37. <br/>
  38. <i class="menu-icon octicon">📧</i>
  39. <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a>
  40. {{end}}
  41. {{else}}
  42. <br/>
  43. <i class="menu-icon octicon">📧</i>
  44. <a class="pro-truncate" href="{{AppURL}}login" rel="nofollow">{{.i18n.Tr "user.hide_email"}}</a>
  45. {{end}}
  46. {{if .Owner.Website}}
  47. <br/>
  48. <i class="menu-icon octicon">🔗</i>
  49. <a target="_blank" rel="noopener noreferrer me nofollow" href="{{.Owner.Website}}">{{.Owner.Website}}</a>
  50. {{end}}
  51. <br/>
  52. <i class="menu-icon octicon">🕒</i> {{.i18n.Tr "user.join_on"}} {{DateFmtShort .Owner.Created}}
  53. {{if .Owner.NumStars}}
  54. <br/>
  55. <i class="menu-icon octicon">⭐</i>
  56. {{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
  57. {{end}}
  58. <div>
  59. <i class="menu-icon octicon">🤵</i>
  60. <a href="{{.Owner.HomeLink}}/followers">
  61. {{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}
  62. </a>
  63. -
  64. <a href="{{.Owner.HomeLink}}/following">
  65. {{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}
  66. </a>
  67. </div>
  68. </div>
  69. {{if or .Owner.GitoteDeveloper .Owner.IsBeta .Owner.IsMaker}}
  70. <div style="margin-top:1rem" class="ui mini images">
  71. {{if .Owner.GitoteDeveloper}}<img class="ui image" src="https://gitote-cdn.netlify.com/img/badges/gitotedeveloper.png">{{end}}
  72. {{if .Owner.IsBeta}}<img class="ui image" src="https://gitote-cdn.netlify.com/img/badges/beta.png">{{end}}
  73. {{if .Owner.IsMaker}}<img class="ui image" src="https://gitote-cdn.netlify.com/img/badges/maker.png">{{end}}
  74. {{if .Owner.Twitch}}<img class="ui image" src="https://gitote-cdn.netlify.com/img/badges/streamer.png">{{end}}
  75. </div>
  76. {{end}}
  77. {{if and .IsLogged (ne .LoggedUserName .Owner.Name)}}
  78. <div class="follow">
  79. {{if .LoggedUser.IsFollowing .Owner.ID}}
  80. <form action="{{.Link}}/action/unfollow?redirect_to={{$.Link}}" method="POST">
  81. {{.CSRFTokenHTML}}
  82. <button class="ui basic red button mobile-card follow">
  83. <i class="menu-icon octicon">👦🏽</i> {{.i18n.Tr "user.unfollow"}}
  84. </button>
  85. </form>
  86. {{else}}
  87. <form action="{{.Link}}/action/follow?redirect_to={{$.Link}}" method="POST">
  88. {{.CSRFTokenHTML}}
  89. <button class="ui basic green button mobile-card follow">
  90. <i class="menu-icon octicon">👦</i> {{.i18n.Tr "user.follow"}}
  91. </button>
  92. </form>
  93. {{end}}
  94. </div>
  95. {{end}}
  96. </div>
  97. </div>
  98. <div class="user profile">
  99. <div class="ui container">
  100. <div class="ui grid">
  101. <div class="ui five wide column">
  102. <div class="ui card" style="border: 2px solid {{.Owner.ThemeColor}};box-shadow: 5px 6px 0px {{.Owner.ThemeColor}}">
  103. {{if eq .LoggedUserName .Owner.Name}}
  104. <a class="image poping up" href="{{AppSubURL}}/user/settings/avatar" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
  105. <img src="{{AppendAvatarSize .Owner.RelAvatarLink 400}}" title="{{.Owner.Name}}"/>
  106. </a>
  107. {{else}}
  108. <span class="image">
  109. <img src="{{AppendAvatarSize .Owner.RelAvatarLink 400}}" title="{{.Owner.Name}}"/>
  110. </span>
  111. {{end}}
  112. <div class="content">
  113. {{if .Owner.FullName}}
  114. <span class="header text center">
  115. {{.Owner.FullName}}
  116. {{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}}
  117. {{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}}
  118. </span>
  119. {{end}}
  120. <center>
  121. <span class="username text center">
  122. <i style="font-size:12px" class="menu-icon octicon">👨‍💻</i> {{.Owner.Name}} <i style="font-size:12px" class="menu-icon octicon">👨‍💻</i>
  123. </span>
  124. {{if .IsAdmin}}
  125. <a class="poping up" href="{{AppURL}}admin/users/{{.Owner.ID}}" data-content="Settings" data-variation="inverted tiny" data-position="right center">⚙️</a>
  126. {{end}}
  127. <center>
  128. </div>
  129. <div class="extra content">
  130. <ul class="text black">
  131. {{if .Owner.Status}}
  132. <li class="ui center">
  133. <p style="font-weight:500">{{.Owner.Status}}</p>
  134. </li>
  135. {{end}}
  136. {{if or .Owner.Twitter .Owner.Linkedin .Owner.Github .Owner.Stackoverflow .Owner.Twitch .Owner.Telegram .Owner.Codepen}}
  137. <li class="ui center">
  138. {{if .Owner.Twitter}}<a href="https://twitter.com/{{.Owner.Twitter}}" target="_blank"><i class="twitter icon"></i></a>{{end}}
  139. {{if .Owner.Linkedin}}<a href="https://linkedin.com/in/{{.Owner.Linkedin}}" target="_blank"><i class="linkedin icon"></i></a>{{end}}
  140. {{if .Owner.Github}}<a href="https://github.com/{{.Owner.Github}}" target="_blank"><i class="github icon"></i></a>{{end}}
  141. {{if .Owner.Stackoverflow}}<a href="https://stackoverflow.com/users/{{.Owner.Stackoverflow}}" target="_blank"><i class="stack overflow icon"></i></a>{{end}}
  142. {{if .Owner.Twitch}}<a href="https://www.twitch.tv/{{.Owner.Twitch}}" target="_blank"><i class="twitch icon"></i></a>{{end}}
  143. {{if .Owner.Telegram}}<a href="https://t.me/{{.Owner.Telegram}}" target="_blank"><i class="telegram icon"></i></a>{{end}}
  144. {{if .Owner.Codepen}}<a href="https://codepen.io/{{.Owner.Codepen}}" target="_blank"><i class="codepen icon"></i></a>{{end}}
  145. {{if .Owner.Gitlab}}<a href="https://gitlab.com/{{.Owner.Gitlab}}" target="_blank"><i class="gitlab icon"></i></a>{{end}}
  146. </li>
  147. {{end}}
  148. {{if .Owner.Description}}
  149. <li class="user description">
  150. <p>{{.Owner.Description}}</p>
  151. </li>
  152. {{end}}
  153. {{if .Owner.Location}}
  154. <li><i class="menu-icon octicon">📍</i> <span class="pro-truncate">{{.Owner.Location}}</span></li>
  155. {{end}}
  156. {{if .Owner.Company}}
  157. <li>
  158. <i class="menu-icon octicon">🏢</i>
  159. <span class="pro-truncate">
  160. {{.Owner.Company}}
  161. {{if .Owner.IsStaff}}<span class="staff">Staff</span>{{end}}
  162. </span>
  163. </li>
  164. {{end}}
  165. {{if and .Owner.Email .IsLogged}}
  166. {{if not .Owner.PrivateEmail}}
  167. <li>
  168. <i class="menu-icon octicon">📧</i>
  169. <a class="pro-truncate" href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a>
  170. </li>
  171. {{end}}
  172. {{else}}
  173. <li>
  174. <i class="menu-icon octicon">📧</i>
  175. <a class="pro-truncate" href="{{AppURL}}login" rel="nofollow">{{.i18n.Tr "user.hide_email"}}</a>
  176. </li>
  177. {{end}}
  178. {{if .Owner.Website}}
  179. <li>
  180. <i class="menu-icon octicon">🔗</i>
  181. <a class="pro-truncate" target="_blank" rel="noopener noreferrer me nofollow" href="{{.Owner.Website}}">{{.Owner.Website}}</a>
  182. </li>
  183. {{end}}
  184. <li><i class="menu-icon octicon">🕒</i> {{.i18n.Tr "user.join_on"}} {{DateFmtShort .Owner.Created}}</li>
  185. {{if .Owner.NumStars}}
  186. <li>
  187. <i class="menu-icon octicon">⭐</i>
  188. {{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
  189. </li>
  190. {{end}}
  191. <li>
  192. <i class="menu-icon octicon">🤵</i>
  193. <a href="{{.Owner.HomeLink}}/followers">
  194. {{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}
  195. </a>
  196. -
  197. <a href="{{.Owner.HomeLink}}/following">
  198. {{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}
  199. </a>
  200. </li>
  201. {{if or .Owner.GitoteDeveloper .Owner.IsBeta .Owner.IsMaker .Owner.Twitch}}
  202. <li>
  203. <div class="ui tiny images">
  204. {{if .Owner.GitoteDeveloper}}
  205. <a class="poping up" target="_blank" href="/jobs" data-content="Gitote Developer" data-variation="inverted tiny" data-position="left center">
  206. <img class="ui image" src="https://gitote-cdn.netlify.com/img/badges/gitotedeveloper.png">
  207. </a>
  208. {{end}}
  209. {{if .Owner.IsBeta}}
  210. <a class="poping up" target="_blank" href="/beta" data-content="Beta Member" data-variation="inverted tiny" data-position="left center">
  211. <img class="ui image" src="https://gitote-cdn.netlify.com/img/badges/beta.png">
  212. </a>
  213. {{end}}
  214. {{if .Owner.IsMaker}}
  215. <a class="poping up" target="_blank" href="/maker" data-content="Maker" data-variation="inverted tiny" data-position="left center">
  216. <img class="ui image" src="https://gitote-cdn.netlify.com/img/badges/maker.png">
  217. </a>
  218. {{end}}
  219. {{if .Owner.Twitch}}
  220. <a class="poping up" target="_blank" href="/streamer" data-content="Streamer" data-variation="inverted tiny" data-position="left center">
  221. <img class="ui image" src="https://gitote-cdn.netlify.com/img/badges/streamer.png">
  222. </a>
  223. {{end}}
  224. </div>
  225. </li>
  226. {{end}}
  227. {{if .Orgs}}
  228. <li>
  229. {{range .Orgs}}
  230. <a href="{{.HomeLink}}"><img class="org-grid ui mini image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
  231. {{end}}
  232. </li>
  233. {{end}}
  234. {{if and .IsLogged (ne .LoggedUserName .Owner.Name)}}
  235. <li class="follow">
  236. {{if .LoggedUser.IsFollowing .Owner.ID}}
  237. <form action="{{.Link}}/action/unfollow?redirect_to={{$.Link}}" method="POST">
  238. {{.CSRFTokenHTML}}
  239. <button class="ui basic red button">
  240. <i class="menu-icon octicon">👦🏽</i> {{.i18n.Tr "user.unfollow"}}
  241. </button>
  242. </form>
  243. {{else}}
  244. <form action="{{.Link}}/action/follow?redirect_to={{$.Link}}" method="POST">
  245. {{.CSRFTokenHTML}}
  246. <button class="ui basic green button">
  247. <i class="menu-icon octicon">👦</i> {{.i18n.Tr "user.follow"}}
  248. </button>
  249. </form>
  250. {{end}}
  251. </li>
  252. {{end}}
  253. </ul>
  254. </div>
  255. </div>
  256. </div>
  257. {{template "user/activity" .}}
  258. </div>
  259. </div>
  260. </div>
  261. {{template "base/footer" .}}