profile.tmpl 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. {{template "base/head" .}}
  2. <div class="user profile">
  3. <div class="ui container">
  4. <div class="ui grid">
  5. <div class="ui five wide column">
  6. <div class="ui card">
  7. {{if and (or .Owner.UseCustomAvatar .DisableGravatar) (eq .SignedUserName .Owner.Name)}}
  8. <a class="image poping up" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_custom_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
  9. <img src="{{.Owner.AvatarLink}}?s=290" title="{{.Owner.Name}}"/>
  10. </a>
  11. {{else if eq .SignedUserName .Owner.Name}}
  12. <a class="image poping up" href="http://gravatar.com/emails/" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
  13. <img src="{{.Owner.AvatarLink}}?s=290" title="{{.Owner.Name}}"/>
  14. </a>
  15. {{else}}
  16. <span class="image">
  17. <img src="{{.Owner.AvatarLink}}?s=290" title="{{.Owner.Name}}"/>
  18. </span>
  19. {{end}}
  20. <div class="content">
  21. {{if .Owner.FullName}}<span class="header text center">{{.Owner.FullName}}</span>{{end}}
  22. <span class="username text center">{{.Owner.Name}}</span>
  23. </div>
  24. <div class="extra content">
  25. <ul class="text black">
  26. {{if .Owner.Location}}
  27. <li><i class="icon octicon octicon-location"></i> {{.Owner.Location}}</li>
  28. {{end}}
  29. {{if and .Owner.Email .IsSigned}}
  30. <li>
  31. <i class="icon octicon octicon-mail"></i>
  32. <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a>
  33. </li>
  34. {{end}}
  35. {{if .Owner.Website}}
  36. <li>
  37. <i class="icon octicon octicon-link"></i>
  38. <a target="_blank" href="{{.Owner.Website}}">{{.Owner.Website}}</a>
  39. </li>
  40. {{end}}
  41. <li><i class="icon octicon octicon-clock"></i> {{.i18n.Tr "user.join_on"}} {{DateFmtShort .Owner.Created}}</li>
  42. <li>
  43. <i class="user icon"></i>
  44. <a href="{{.Owner.HomeLink}}/followers">
  45. {{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}
  46. </a>
  47. -
  48. <a href="{{.Owner.HomeLink}}/following">
  49. {{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}
  50. </a>
  51. </li>
  52. {{/*
  53. <li>
  54. <i class="octicon octicon-star"></i>
  55. <a href="{{.Owner.HomeLink}}/stars">
  56. {{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
  57. </a>
  58. </li>
  59. */}}
  60. {{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
  61. <li class="follow">
  62. {{if .SignedUser.IsFollowing .Owner.Id}}
  63. <a class="ui basic red button" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}</a>
  64. {{else}}
  65. <a class="ui basic green button" href="{{.Link}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}</a>
  66. {{end}}
  67. </li>
  68. {{end}}
  69. </ul>
  70. </div>
  71. </div>
  72. </div>
  73. <div class="ui eleven wide column">
  74. <div class="ui secondary pointing menu">
  75. <a class="{{if ne .TabName "activity"}}active{{end}} item" href="{{.Owner.HomeLink}}">
  76. <i class="icon octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
  77. </a>
  78. <a class="item">
  79. <a class="{{if eq .TabName "activity"}}active{{end}} item" href="{{.Owner.HomeLink}}?tab=activity">
  80. <i class="icon octicon octicon-rss"></i> {{.i18n.Tr "user.activity"}}
  81. </a>
  82. </a>
  83. </div>
  84. {{if ne .TabName "activity"}}
  85. {{template "explore/repo_list" .}}
  86. {{else}}
  87. <br>
  88. <div class="feeds">
  89. {{template "user/dashboard/feeds" .}}
  90. </div>
  91. {{end}}
  92. </div>
  93. </div>
  94. </div>
  95. </div>
  96. {{template "base/footer" .}}