profile.tmpl 3.7 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 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="{{.Owner.RelAvatarLink}}?s=290" title="{{.Owner.Name}}"/>
  10. </a>
  11. {{else}}
  12. <span class="image">
  13. <img src="{{.Owner.RelAvatarLink}}?s=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. {{if not .Owner.HideEmail}}
  27. <li>
  28. <i class="octicon octicon-mail"></i>
  29. <a href="mailto:{{.Owner.Email}}" rel="nofollow">{{.Owner.Email}}</a>
  30. </li>
  31. {{end}}
  32. {{end}}
  33. {{if .Owner.Website}}
  34. <li>
  35. <i class="octicon octicon-link"></i>
  36. <a target="_blank" href="{{.Owner.Website}}">{{.Owner.Website}}</a>
  37. </li>
  38. {{end}}
  39. <li><i class="octicon octicon-clock"></i> {{.i18n.Tr "user.join_on"}} {{DateFmtShort .Owner.Created}}</li>
  40. <li>
  41. <i class="octicon octicon-person"></i>
  42. <a href="{{.Owner.HomeLink}}/followers">
  43. {{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}
  44. </a>
  45. -
  46. <a href="{{.Owner.HomeLink}}/following">
  47. {{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}
  48. </a>
  49. </li>
  50. {{/*
  51. <li>
  52. <i class="octicon octicon-star"></i>
  53. <a href="{{.Owner.HomeLink}}/stars">
  54. {{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
  55. </a>
  56. </li>
  57. */}}
  58. {{if .Orgs}}
  59. <li>
  60. {{range .Orgs}}
  61. <a href="{{.HomeLink}}"><img class="ui mini image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
  62. {{end}}
  63. </li>
  64. {{end}}
  65. {{if and .IsLogged (ne .LoggedUserName .Owner.Name)}}
  66. <li class="follow">
  67. {{if .LoggedUser.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="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="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. {{template "explore/page" .}}
  92. {{else}}
  93. <br>
  94. <div class="feeds">
  95. {{template "user/dashboard/feeds" .}}
  96. </div>
  97. {{end}}
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. {{template "base/footer" .}}