profile.tmpl 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100
  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 eq .LoggedUserName .Owner.Name}}
  8. <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">
  9. <img src="{{AppendAvatarSize .Owner.RelAvatarLink 290}}" title="{{.Owner.Name}}"/>
  10. </a>
  11. {{else}}
  12. <span class="image">
  13. <img src="{{AppendAvatarSize .Owner.RelAvatarLink 290}}" title="{{.Owner.Name}}"/>
  14. </span>
  15. {{end}}
  16. <div class="content">
  17. {{if .Owner.FullName}}<span class="header text center">{{.Owner.FullName}}</span>{{end}}
  18. <span class="username text center">{{.Owner.Name}}</span>
  19. </div>
  20. <div class="extra content">
  21. <ul class="text black">
  22. {{if .Owner.Location}}
  23. <li><i class="octicon octicon-location"></i> {{.Owner.Location}}</li>
  24. {{end}}
  25. {{if and .Owner.Email .IsLogged}}
  26. <li>
  27. <i class="octicon octicon-mail"></i>
  28. <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a>
  29. </li>
  30. {{end}}
  31. {{if .Owner.Website}}
  32. <li>
  33. <i class="octicon octicon-link"></i>
  34. <a target="_blank" rel="noopener noreferrer me nofollow" href="{{.Owner.Website}}">{{.Owner.Website}}</a>
  35. </li>
  36. {{end}}
  37. <li><i class="octicon octicon-clock"></i> {{.i18n.Tr "user.join_on"}} {{DateFmtShort .Owner.Created}}</li>
  38. <li>
  39. <i class="octicon octicon-person"></i>
  40. <a href="{{.Owner.HomeLink}}/followers">
  41. {{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}
  42. </a>
  43. -
  44. <a href="{{.Owner.HomeLink}}/following">
  45. {{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}
  46. </a>
  47. </li>
  48. {{/*
  49. <li>
  50. <i class="octicon octicon-star"></i>
  51. <a href="{{.Owner.HomeLink}}/stars">
  52. {{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
  53. </a>
  54. </li>
  55. */}}
  56. {{if .Orgs}}
  57. <li>
  58. {{range .Orgs}}
  59. <a href="{{.HomeLink}}"><img class="ui mini image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
  60. {{end}}
  61. </li>
  62. {{end}}
  63. {{if and .IsLogged (ne .LoggedUserName .Owner.Name)}}
  64. <li class="follow">
  65. {{if .LoggedUser.IsFollowing .Owner.ID}}
  66. <a class="ui basic red button" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}</a>
  67. {{else}}
  68. <a class="ui basic green button" href="{{.Link}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}</a>
  69. {{end}}
  70. </li>
  71. {{end}}
  72. </ul>
  73. </div>
  74. </div>
  75. </div>
  76. <div class="ui eleven wide column">
  77. <div class="ui secondary pointing menu">
  78. <a class="{{if ne .TabName "activity"}}active{{end}} item" href="{{.Owner.HomeLink}}">
  79. <i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
  80. </a>
  81. <a class="item">
  82. <a class="{{if eq .TabName "activity"}}active{{end}} item" href="{{.Owner.HomeLink}}?tab=activity">
  83. <i class="octicon octicon-rss"></i> {{.i18n.Tr "user.activity"}}
  84. </a>
  85. </a>
  86. </div>
  87. {{if ne .TabName "activity"}}
  88. {{template "explore/repo_list" .}}
  89. {{template "explore/page" .}}
  90. {{else}}
  91. <br>
  92. <div class="feeds">
  93. {{template "user/dashboard/feeds" .}}
  94. </div>
  95. {{end}}
  96. </div>
  97. </div>
  98. </div>
  99. </div>
  100. {{template "base/footer" .}}