profile.tmpl 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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="icon octicon octicon-person"></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="icon octicon octicon-star"></i>
  55. <a href="{{.Owner.HomeLink}}/stars">
  56. {{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
  57. </a>
  58. </li>
  59. */}}
  60. <li>
  61. {{range .Orgs}}
  62. <img class="ui mini image" src="{{.AvatarLink}}">
  63. {{end}}
  64. </li>
  65. {{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
  66. <li class="follow">
  67. {{if .SignedUser.IsFollowing .Owner.Id}}
  68. <a class="ui basic red button" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}</a>
  69. {{else}}
  70. <a class="ui basic green button" href="{{.Link}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}</a>
  71. {{end}}
  72. </li>
  73. {{end}}
  74. </ul>
  75. </div>
  76. </div>
  77. </div>
  78. <div class="ui eleven wide column">
  79. <div class="ui secondary pointing menu">
  80. <a class="{{if ne .TabName "activity"}}active{{end}} item" href="{{.Owner.HomeLink}}">
  81. <i class="icon octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
  82. </a>
  83. <a class="item">
  84. <a class="{{if eq .TabName "activity"}}active{{end}} item" href="{{.Owner.HomeLink}}?tab=activity">
  85. <i class="icon octicon octicon-rss"></i> {{.i18n.Tr "user.activity"}}
  86. </a>
  87. </a>
  88. </div>
  89. {{if ne .TabName "activity"}}
  90. {{template "explore/repo_list" .}}
  91. {{else}}
  92. <br>
  93. <div class="feeds">
  94. {{template "user/dashboard/feeds" .}}
  95. </div>
  96. {{end}}
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. {{template "base/footer" .}}