You are here

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

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

modules/social_features/social_core/templates/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. {% if node %}
  27. {% if node_edit_url %}
  28. <div class="hero-action-button">
  29. <a href="{{ node_edit_url }}" title="{% trans %}Edit content{% endtrans %}" class="waves-effect waves-light btn btn-raised btn-default btn-floating">
  30. <svg class="icon-gray icon-medium">
  31. <use xlink:href="#icon-edit"></use>
  32. </svg>
  33. </a>
  34. </div>
  35. {% endif %}
  36. <div class="cover-wrap">
  37. {% endif %}
  38. {{ title_prefix }}
  39. {% if title %}
  40. <h1{{ title_attributes.addClass(section_class) }}>{{ title }}</h1>
  41. {% endif %}
  42. {{ title_suffix }}
  43. {% if event_enrollment %}
  44. <div class="hero-footer">
  45. <div class="row row-md-center">
  46. <div class="col-xs-12 col-md-3 col-md-offset-9">
  47. <div class="btn-group">
  48. {{ event_enrollment }}
  49. </div>
  50. </div>
  51. </div>
  52. </div>
  53. {% endif %}
  54. {% if node %}
  55. </div>
  56. {% endif %}
  57. </div>