templates/base.html.twig line 1

Open in your IDE?
  1. <!DOCTYPE html>
  2. {% set lang = app.request.locale|split('_')[0] %}
  3. <html lang="{{ lang }}">
  4. {% if (app.request.locale|split('_'))|length > 1 %}
  5. {% set region = (app.request.locale|split('_')[1])|lower %}
  6. {% else %}
  7. {% set region = 'gb' %}
  8. {% endif %}
  9. <head>
  10. <meta charset="utf-8" />
  11. <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  12. <meta name="description" content="Utixo Pulse Mailer">
  13. <meta name="author" content="Utixo">
  14. <title>
  15. {{ page.main_title }}
  16. {% if status_code is defined %}
  17. - {{ status_code }}
  18. {% elseif page.title is not empty %}
  19. - {{ page.title|trans }}
  20. {% endif %}
  21. </title>
  22. <meta name="author" content="Utixo Ltd" />
  23. <link rel="icon" href="https://utixo.co.uk/wp-content/uploads/2017/03/cropped-logo-utixo-32x32.png" sizes="32x32" />
  24. <link rel="icon" href="https://utixo.co.uk/wp-content/uploads/2017/03/cropped-logo-utixo-192x192.png" sizes="192x192" />
  25. <link rel="apple-touch-icon-precomposed" href="https://utixo.co.uk/wp-content/uploads/2017/03/cropped-logo-utixo-180x180.png" />
  26. <meta name="msapplication-TileImage" content="https://utixo.co.uk/wp-content/uploads/2017/03/cropped-logo-utixo-270x270.png" />
  27. <!-- Favicon -->
  28. <!--<link href="./assets/img/brand/favicon.png" rel="icon" type="image/png">-->
  29. <!-- Fonts -->
  30. <link href="https://fonts.googleapis.com/css?family=Open+Sans:300,400,600,700" rel="stylesheet">
  31. <script src="https://www.google.com/recaptcha/api.js" async defer></script>
  32. <!-- Translations -->
  33. <script src="https://cdnjs.cloudflare.com/ajax/libs/intl-messageformat/9.0.2/intl-messageformat.min.js" integrity="sha512-uGIOqaLIi8I30qAnPLfrEnecDDi08AcCrg7gzGp/XrDafLJl/NIilHwAm1Wl2FLiTSf10D5vM70108k3oMjK5Q==" crossorigin="anonymous"></script>
  34. <script src="{{ asset('bundles/bazingajstranslation/js/translator.min.js') }}"></script>
  35. <script src="{{ path('bazinga_jstranslation_js', { 'domain': 'messages', '_format': 'js', 'locales': lang }) }}"></script>
  36. {{ encore_entry_link_tags('main') }}
  37. {% block stylesheets %}
  38. {% endblock %}
  39. </head>
  40. {% block body %}
  41. <body class="c-app" data-app-scheme="{{ app_scheme }}" data-app-hostname="{{ app_hostname }}">
  42. {% include 'common/sidebar.html.twig' %}
  43. <div class="c-wrapper">
  44. {% include 'common/topbar.html.twig' %}
  45. <div class="c-body">
  46. <main class="c-main">
  47. {% if page.notices is defined and page.notices|length > 0 %}
  48. <div class="alert alert-light p-0 border-0" style="margin-top: -2rem">
  49. {% for message in page.notices %}
  50. <div class="px-3 d-flex">
  51. <div class="py-2 px-3">
  52. <span class="text-value text-uppercase font-weight-bold text-warning align-text-top">
  53. <i class="c-icon cil-warning"></i>
  54. </span>
  55. <span class="text-muted small">{{ message|raw }}</span>
  56. </div>
  57. </div>
  58. {% endfor %}
  59. </div>
  60. {% endif %}
  61. <div class="container-fluid">
  62. <div class="fade-in">
  63. {% set modal_flashes = app.flashes(['modal-warning']) %}
  64. {% if modal_flashes['modal-warning'] %}
  65. <div class="modal fade actionModal" id="warningsModal" tabindex="-1" role="dialog">
  66. <div class="modal-dialog" role="document">
  67. <div class="modal-content">
  68. <div class="modal-header">
  69. <div class="modal-title h4"><i class="text-warning cil-warning"></i> {{ 'flashes.warning'|trans }}</div>
  70. </div>
  71. <div class="modal-body">
  72. <p>
  73. {% for message in modal_flashes['modal-warning'] %}
  74. {{ message|raw }}
  75. {% endfor %}
  76. </p>
  77. </div>
  78. </div>
  79. </div>
  80. </div>
  81. {% endif %}
  82. {# pass an array argument to get the messages of those types #}
  83. {% for label, messages in app.flashes(['success']) %}
  84. {% for message in messages %}
  85. <div class="alert alert-dismissible alert-light p-0 border-0">
  86. <div class="p-0 d-flex">
  87. <div class="bg-gradient-{{ label }} p-4 mfe-3">
  88. <i class="c-icon cil-check"></i>
  89. </div>
  90. <div class="py-2">
  91. <div class="text-value text-uppercase font-weight-bold text-{{ label }}">{{ 'flashes.success'|trans }}</div>
  92. <div class="text-muted text-uppercase font-weight-bold small">{{ message|raw }}</div>
  93. </div>
  94. </div>
  95. </div>
  96. {% endfor %}
  97. {% endfor %}
  98. {% for label, messages in app.flashes(['warning']) %}
  99. {% for message in messages %}
  100. <div class="alert alert-dismissible alert-light p-0 border-0">
  101. <div class="p-0 d-flex">
  102. <div class="bg-gradient-{{ label }} p-4 mfe-3">
  103. <i class="c-icon cil-warning"></i>
  104. </div>
  105. <div class="py-2">
  106. <div class="text-value text-uppercase font-weight-bold text-{{ label }}">{{ 'flashes.warning'|trans }}</div>
  107. <div class="text-muted text-uppercase font-weight-bold small">{{ message|raw }}</div>
  108. </div>
  109. </div>
  110. </div>
  111. {% endfor %}
  112. {% endfor %}
  113. {% block content %}
  114. {% endblock %}
  115. </div>
  116. </div>
  117. </main>
  118. </div>
  119. <footer class="c-footer">
  120. <div>
  121. <a href="https://utixo.co.uk">Pulse Mailer</a>
  122. {% if page.app_version is defined %}
  123. <span class="small">{{ page.app_version }}</span>
  124. {% endif %}
  125. &copy; {{ "now"|date("Y") }} Utixo
  126. </div>
  127. <div class="ml-auto">Powered by&nbsp;<a href="https://utixo.co.uk">Utixo</a></div>
  128. </footer>
  129. </div>
  130. <!-- CoreUI and necessary plugins-->
  131. {{ encore_entry_script_tags('main') }}
  132. {{ encore_entry_script_tags('notifications') }}
  133. {% block javascripts %}
  134. {% endblock %}
  135. </body>
  136. {% endblock %}
  137. </html>