ui/twig/common/images/avatar.html.twig line 1

Open in your IDE?
  1. {% set account = _args.account|default(null) %}
  2. {% set center = _args.center|default(false) %}
  3. {% set bigAvatar = _args.bigAvatar|default(false) %}
  4. {% set avatar = (account is not null and account.systemProfile.hasAvatar)
  5.     ? s3_entity(account, '/avatar/' ~ (bigAvatar ? 'feature' : 'thumb'))
  6.     : null
  7. %}
  8. {% set oneroster = (account is not null and account.onerosterId is not null) %}
  9. {% set title = (account is not null and account.displayName(false) is not empty)
  10.     ? account.displayName(false)
  11.     : account is not null ? account.email : '@'
  12. %}
  13. {% if avatar is not empty %}
  14.     <img class="round {% if center %} center-block{% endif %}" src="{{ avatar }}" alt="" title="{{ title }}"/>
  15. {% else %}
  16.     <style type="text/css">
  17.         div.big-avatar {
  18.             width: 164px;
  19.             height: 164px;
  20.             font-size: 64px;
  21.             line-height: 164px;
  22.         }
  23.     </style>
  24.     <div class="round pic-na{% if oneroster %} pic-na-clever{% endif %}{% if center %} center-block{% endif %}{% if bigAvatar %} big-avatar{% endif %}">
  25.         {{ title|slice(0, 1)|upper }}
  26.     </div>
  27. {% endif %}