profile.tmpl 4.0 KB

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