You are here

page-hero-data.html.twig in Open Social 8.4

Theme override for page titles.

Available variables:

  • title_attributes: HTML attributes for the page title element.
  • title_prefix: Additional output populated by modules, intended to be displayed in front of the main title tag that appears in the template.
  • title: The page title, for use in the actual content.
  • title_suffix: Additional output populated by modules, intended to be displayed after the main title tag that appears in the template.
  • author_name
  • created_date
  • created_date_formatted
  • topic_type
  • hero_node

File

themes/socialbase/templates/node/page-hero-data.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for page titles.
  5. *
  6. * Available variables:
  7. * - title_attributes: HTML attributes for the page title element.
  8. * - title_prefix: Additional output populated by modules, intended to be
  9. * displayed in front of the main title tag that appears in the template.
  10. * - title: The page title, for use in the actual content.
  11. * - title_suffix: Additional output populated by modules, intended to be
  12. * displayed after the main title tag that appears in the template.
  13. * - author_name
  14. * - created_date
  15. * - created_date_formatted
  16. * - topic_type
  17. * - hero_node
  18. */
  19. #}
  20. {{ attach_library('socialbase/hero')}}
  21. {% if hero_styled_image_url %}
  22. <div style="background-image: url('{{ hero_styled_image_url }}')" class="cover cover-img cover-img-gradient">
  23. {% else %}
  24. <div class="cover">
  25. {% endif %}
  26. <div class="hero__bgimage-overlay"></div>
  27. {% if node %}
  28. {% if node_edit_url %}
  29. <div class="hero-action-button">
  30. <a href="{{ node_edit_url }}" title="{% trans %}Edit content{% endtrans %}" class="btn btn-raised btn-default btn-floating">
  31. <svg class="icon-gray icon-medium">
  32. <use xlink:href="#icon-edit"></use>
  33. </svg>
  34. </a>
  35. </div>
  36. {% endif %}
  37. <div class="cover-wrap">
  38. {% endif %}
  39. {{ title_prefix }}
  40. {% if title %}
  41. <h1{{ title_attributes.addClass(section_class) }}>{{ title }}</h1>
  42. {% endif %}
  43. {{ title_suffix }}
  44. {% if event_enrollment %}
  45. <div class="hero-footer">
  46. <div class="hero-footer__text"></div>
  47. <div class="hero-footer__cta">
  48. <div class="btn-group">
  49. {{ event_enrollment }}
  50. </div>
  51. </div>
  52. </div>
  53. {% endif %}
  54. {% if node %}
  55. </div>
  56. {% endif %}
  57. </div>