You are here

opigno-statistics-user-achievement.html.twig in Opigno statistics 3.x

Default theme implementation for the user achievement block.

Available variables:

  • count: the amount of achievements;
  • img: the image link;
  • text: the text to be displayed;
  • subtitle: the text that should be displayed at the bottom (optional);
  • url: the url the block should lead to.

File

templates/opigno-statistics-user-achievement.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for the user achievement block.
  5. *
  6. * Available variables:
  7. * - count: the amount of achievements;
  8. * - img: the image link;
  9. * - text: the text to be displayed;
  10. * - subtitle: the text that should be displayed at the bottom (optional);
  11. * - url: the url the block should lead to.
  12. */
  13. #}
  14. <div class="link-box">
  15. {% if img %}
  16. <div class="link-box__type">
  17. <img src="{{ img }}" alt="{{ text }}">
  18. </div>
  19. {% endif %}
  20. <div class="link-box__content">
  21. {% if url is not empty %}
  22. <a class="link-box__link" href="{{ url }}"></a>
  23. {% endif %}
  24. <div class="link-box__number">{{ count }}</div>
  25. <div class="link-box__title">{{ text }}</div>
  26. {% if subtitle is not empty %}
  27. <div class="link-box__subtext">{{ subtitle }}</div>
  28. {% endif %}
  29. </div>
  30. </div>