header.tmpl 873 B

12345678910111213141516171819202122232425
  1. {{with .Owner}}
  2. <div class="ui container">
  3. <img class="ui avatar image" src="{{.AvatarURLPath}}">
  4. <span class="header name">
  5. <a href="{{.HomeURLPath}}">{{.Name}}</a>
  6. {{with .FullName}}({{.}}){{end}}
  7. </span>
  8. <div class="ui right">
  9. {{if or $.PageIsFollowers $.PageIsFollowing}}
  10. {{if and $.IsLogged (ne $.LoggedUserName .Name)}}
  11. <div class="follow">
  12. {{if $.LoggedUser.IsFollowing .ID}}
  13. <a class="ui small basic red button" href="{{.HomeURLPath}}/action/unfollow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{$.i18n.Tr "user.unfollow"}}</a>
  14. {{else}}
  15. <a class="ui small basic green button" href="{{.HomeURLPath}}/action/follow?redirect_to={{$.Link}}"><i class="octicon octicon-person"></i> {{$.i18n.Tr "user.follow"}}</a>
  16. {{end}}
  17. </div>
  18. {{end}}
  19. {{end}}
  20. </div>
  21. </div>
  22. {{end}}
  23. <div class="ui divider"></div>