You are here

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

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. <header class="page-title">
  40. <p>{{ title_prefix }}</p>
  41. {% if title %}
  42. <h1{{ title_attributes }}>{{ title }}</h1>
  43. {% endif %}
  44. <p>{{ title_suffix }}</p>
  45. </header>
  46. {% if event_enrollment %}
  47. <div class="hero-footer">
  48. <div class="hero-footer__text"></div>
  49. <div class="hero-footer__cta">
  50. <div class="btn-group">
  51. {{ event_enrollment }}
  52. </div>
  53. </div>
  54. </div>
  55. {% endif %}
  56. {% if node %}
  57. </div>
  58. {% endif %}
  59. </div>