src/WebBundle/Resources/views/SVGIconsCode/chat.html.twig line 1

Open in your IDE?
  1. {% set userEmail = isLogged() ? user.email : '' %}
  2. {% set hideNotifications = false %}
  3. {% if '@tile.expert' in userEmail %}
  4.     {% set hideNotifications = true %}
  5. {% endif %}
  6. {% set isRTWidget = useRTWidget() %}
  7. {% set redCircleClass = '' %}
  8. <svg
  9.     version="1.1" id="chat-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"
  10.     width="40" height="30" x="0px" y="0px" viewBox="0 0 41.1 28.8" xml:space="preserve"
  11.     {% if userEmail %}data-user-email="{{ userEmail }}"{% endif %}
  12.     {% set unreadMessagesNumber = 0 %}
  13.     {% if not hideNotifications and unreadAll is defined and unreadAll > 0 %}
  14.         {% if unreadAll > 99 %}
  15.             {% set unreadMessagesNumber = '99+' %}
  16.         {% else %}
  17.             {% set unreadMessagesNumber = unreadAll %}
  18.         {% endif %}
  19.         {% set redCircleClass = ' red-circle' %}
  20.         data-new-messages-number="{{ unreadAll }}"
  21.     {% endif %}
  22.     class="chat-btn{{ redCircleClass }}" 
  23. >
  24.     <path class="chat-icon-el-0" d="M1.2,15.9c0,2.7,1.7,5.2,4.6,6.9l0,0c0,1.9-0.8,4.1-1.5,4.9c3,0,6.1-1.5,7.6-2.9h1.5c6.7,0,12.2-4,12.2-8.8
  25.         s-5.4-8.8-12.2-8.8S1.2,11,1.2,15.9" />
  26.         <circle class="chat-icon-el-1" cx="31.3" cy="9.8" r="9.8"/>
  27.         <circle class="chat-icon-el-2" id="chat-icon-circle" cx="31.2" cy="9.8" r="8.3" />
  28.     <g>
  29.         <path class="chat-icon-el-4" d="M7.4,17.4l-0.1,0.9c-0.4,0.1-0.8,0.1-1.1,0.1c-0.9,0-1.6-0.3-2.1-0.8s-0.7-1.1-0.7-1.8c0-0.7,0.3-1.4,0.8-2
  30.             S5.4,13,6.3,13c0.3,0,0.6,0,0.9,0.1l-0.2,1c-0.3-0.1-0.6-0.2-0.9-0.2c-0.5,0-0.9,0.2-1.2,0.5c-0.3,0.3-0.4,0.8-0.4,1.2
  31.             c0,0.5,0.2,0.9,0.5,1.3c0.3,0.4,0.8,0.6,1.3,0.6C6.6,17.6,7,17.5,7.4,17.4z" />
  32.         <path class="chat-icon-el-4" d="M12.4,18.4h-1.1c0-0.9,0-1.6,0-2.3h-2c0,0.6,0,1.3,0,2.3H8.2c0-0.9,0.1-1.8,0.1-2.7c0-0.9,0-1.8-0.1-2.5h1.1
  33.             c0,0.7,0,1.4,0,2.1h2c0-0.6,0-1.3,0-2.1h1.1c0,0.7-0.1,1.5-0.1,2.5S12.3,17.6,12.4,18.4z" />
  34.         <path class="chat-icon-el-4" d="M18.1,18.4h-1.3c0-0.2-0.1-0.7-0.4-1.5h-1.8c-0.3,0.8-0.4,1.3-0.4,1.5H13c0-0.1,0.3-1,0.9-2.6
  35.             c0.6-1.6,0.9-2.5,0.9-2.6h1.5c0,0.2,0.3,1,0.8,2.6C17.8,17.4,18.1,18.2,18.1,18.4z M16.2,16.1c-0.5-1.4-0.7-2.1-0.7-2.2h-0.1
  36.             c0,0.1-0.2,0.8-0.7,2.2H16.2z" />
  37.         <path class="chat-icon-el-4" d="M22.1,13.2v0.9c-0.5,0-1-0.1-1.5-0.1c0,0.5,0,1.1,0,1.7c0,1,0,1.9,0,2.7h-1.1c0-0.8,0.1-1.8,0.1-2.7
  38.             c0-0.6,0-1.2,0-1.7c-0.4,0-0.9,0-1.5,0.1v-0.9C18.1,13.2,22.1,13.2,22.1,13.2z" />
  39.     </g>
  40.     <text class="chat-status-off chat-icon-text" transform="translate(25, 13)">off</text>
  41.     <text class="chat-status-on chat-icon-text" transform="translate(26, 12)">on</text>
  42.     {% set numTextTransformClass = ' single-digit-unread-count' %}
  43.     {% if unreadMessagesNumber == '99+' %}
  44.         {% set numTextTransformClass = ' multiple-digits-unread-count' %}
  45.     {% elseif unreadMessagesNumber > 9 %}
  46.         {% set numTextTransformClass = ' double-digits-unread-count' %}
  47.     {% endif %}
  48.     <text
  49.         id="chat-messages-count"
  50.         class="chat-icon-text chat-btn-msgs-count{{ numTextTransformClass }}"
  51.         textLength="10px"
  52.     >
  53.             {{ unreadMessagesNumber }}
  54.         </text>
  55. </svg>