You are here

page-hero-data.html.twig in Open Social 10.3.x

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