本站源代码
Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

153 lines
5.8KB

  1. {{template "base/head" .}}
  2. <div class="user profile">
  3. <div class="ui container">
  4. {{template "base/alert" .}}
  5. <div class="ui stackable grid">
  6. <div class="ui five wide column">
  7. <div class="ui card">
  8. {{if eq .SignedUserName .Owner.Name}}
  9. <a class="image poping up" href="{{AppSubUrl}}/user/settings" id="profile-avatar" data-content="{{.i18n.Tr "user.change_avatar"}}" data-variation="inverted tiny" data-position="bottom center">
  10. <img src="{{.Owner.SizedRelAvatarLink 290}}" title="{{.Owner.Name}}"/>
  11. </a>
  12. {{else}}
  13. <span class="image">
  14. <img src="{{.Owner.SizedRelAvatarLink 290}}" title="{{.Owner.Name}}"/>
  15. </span>
  16. {{end}}
  17. <div class="content wrap">
  18. {{if .Owner.FullName}}<span class="header text center">{{.Owner.FullName}}</span>{{end}}
  19. <span class="username text center">{{.Owner.Name}}</span>
  20. </div>
  21. <div class="extra content wrap">
  22. <ul class="text black">
  23. {{if .Owner.Location}}
  24. <li><i class="octicon octicon-location"></i> {{.Owner.Location}}</li>
  25. {{end}}
  26. {{if .ShowUserEmail }}
  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. {{if .Owner.Website}}
  33. <li>
  34. <i class="octicon octicon-link"></i>
  35. <a target="_blank" rel="noopener noreferrer me" href="{{.Owner.Website}}">{{.Owner.Website}}</a>
  36. </li>
  37. {{end}}
  38. {{if .Owner.Description}}
  39. <li>
  40. <i class="octicon octicon-info"></i>
  41. <span>{{.Owner.Description}}</span>
  42. </li>
  43. {{end}}
  44. {{range .OpenIDs}}
  45. {{if .Show}}
  46. <li>
  47. <i class="fa fa-openid"></i>
  48. <a target="_blank" rel="noopener noreferrer" href="{{.URI}}">{{.URI}}</a>
  49. </li>
  50. {{end}}
  51. {{end}}
  52. <li><i class="octicon octicon-clock"></i> {{.i18n.Tr "user.join_on"}} {{.Owner.CreatedUnix.FormatShort}} 持有红包 {{.Owner.Point}}</li>
  53. <li>
  54. <i class="octicon octicon-person"></i>
  55. <a href="{{.Owner.HomeLink}}/followers">
  56. {{.Owner.NumFollowers}} {{.i18n.Tr "user.followers"}}
  57. </a>
  58. -
  59. <a href="{{.Owner.HomeLink}}/following">
  60. {{.Owner.NumFollowing}} {{.i18n.Tr "user.following"}}
  61. </a>
  62. </li>
  63. {{/*
  64. <li>
  65. <i class="octicon octicon-star"></i>
  66. <a href="{{.Owner.HomeLink}}/stars">
  67. {{.Owner.NumStars}} {{.i18n.Tr "user.starred"}}
  68. </a>
  69. </li>
  70. */}}
  71. {{if and .Orgs .HasOrgsVisible}}
  72. <li>
  73. <ul class="user-orgs">
  74. {{range .Orgs}}
  75. {{if (or .Visibility.IsPublic (and ($.SignedUser) (or .Visibility.IsLimited (and (.IsUserPartOfOrg $.SignedUserID) .Visibility.IsPrivate) ($.IsAdmin))))}}
  76. <li>
  77. <a href="{{.HomeLink}}"><img class="ui image poping up" src="{{.RelAvatarLink}}" data-content="{{.Name}}" data-position="top center" data-variation="tiny inverted"></a>
  78. </li>
  79. {{end}}
  80. {{end}}
  81. </ul>
  82. </li>
  83. {{end}}
  84. {{if and .IsSigned (ne .SignedUserName .Owner.Name)}}
  85. <li class="follow">
  86. {{if .SignedUser.IsFollowing .Owner.ID}}
  87. <a class="ui basic red button" href="{{.Link}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.unfollow"}}</a>
  88. {{else}}
  89. <a class="ui basic green button" href="{{.Link}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{.i18n.Tr "user.follow"}}</a>
  90. {{end}}
  91. </li>
  92. <li>
  93. <form class="ui form" id="transfer-point-form" action="{{.Link}}/action/transfer_point" method="post">
  94. {{.CsrfTokenHtml}}
  95. <input type="hidden" name="toid" value="{{ .Owner.Name }}">
  96. <div class="inline field ui left">
  97. <div class="ui">
  98. <input name="why" placeholder="为什么" autocomplete="off" required>
  99. <input name="qty" type="number" placeholder="转给他多少积分" autocomplete="off" required>
  100. <button class="ui green button">确定</button>
  101. </div>
  102. </div>
  103. </form>
  104. </li>
  105. {{end}}
  106. </ul>
  107. </div>
  108. </div>
  109. </div>
  110. <div class="ui eleven wide column">
  111. <div class="ui secondary stackable pointing menu">
  112. <a class='{{if and (ne .TabName "activity") (ne .TabName "stars")}}active{{end}} item' href="{{.Owner.HomeLink}}">
  113. <i class="octicon octicon-repo"></i> {{.i18n.Tr "user.repositories"}}
  114. </a>
  115. <a class='{{if eq .TabName "activity"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=activity">
  116. <i class="octicon octicon-rss"></i> {{.i18n.Tr "user.activity"}}
  117. </a>
  118. <a class='{{if eq .TabName "stars"}}active{{end}} item' href="{{.Owner.HomeLink}}?tab=stars">
  119. <i class="octicon octicon-star"></i> {{.i18n.Tr "user.starred"}}
  120. </a>
  121. </div>
  122. {{if eq .TabName "activity"}}
  123. {{if .EnableHeatmap}}
  124. <div id="user-heatmap" style="padding-right: 40px">
  125. <activity-heatmap :locale="locale" :suburl="suburl" :user="heatmapUser">
  126. <div slot="loading">
  127. <div class="ui active centered inline indeterminate text loader" id="loading-heatmap">{{.i18n.Tr "user.heatmap.loading"}}</div>
  128. </div>
  129. </activity-heatmap>
  130. </div>
  131. <div class="ui divider"></div>
  132. {{end}}
  133. <div class="feeds">
  134. {{template "user/dashboard/feeds" .}}
  135. </div>
  136. {{else if eq .TabName "stars"}}
  137. <div class="stars">
  138. {{template "explore/repo_search" .}}
  139. {{template "explore/repo_list" .}}
  140. {{template "base/paginate" .}}
  141. </div>
  142. {{else}}
  143. {{template "explore/repo_search" .}}
  144. {{template "explore/repo_list" .}}
  145. {{template "base/paginate" .}}
  146. {{end}}
  147. </div>
  148. </div>
  149. </div>
  150. </div>
  151. {{template "base/footer" .}}
上海开阖软件有限公司 沪ICP备12045867号-1