email--simplenews-newsletter-body.html.twig 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to format the simplenews newsletter body.
  5. *
  6. * Copy this file in your theme directory to create a custom themed body.
  7. * Rename it to override it. Available templates:
  8. * simplenews-newsletter-body--[newsletter_id].html.twig
  9. * simplenews-newsletter-body--[view mode].html.twig
  10. * simplenews-newsletter-body--[newsletter_id]--[view mode].html.twig
  11. * See README.txt for more details.
  12. *
  13. * Available variables:
  14. * - build: Render array. Use {{ build }} to print it.
  15. * - node: object(Drupal\node\Entity\Node)
  16. * The node entity with limited access to object properties and methods.
  17. * * Methods: Only "getter" methods (method names starting with "get", "has", or "is")
  18. * and a few common methods such as "id" and "label" are available.
  19. * {{ node.getTitle }} : the Node title ( == {{ title }} )
  20. * Calling other methods (such as node.delete) will result in an exception.
  21. * * Properties: field values can be accessed as follows:
  22. * {{ node.body.value | raw }} : text of body field
  23. * - newsletter: object(Drupal\simplenews\Entity\Newsletter)
  24. * {{ newsletter.from_name }}: string
  25. * {{ newsletter.subject }}: string
  26. * - title: Node title
  27. * - view_mode: The active display view mode of the node
  28. * - key: email key [node|test]
  29. * - format: newsletter format [plain|html]
  30. * - simplenews_subscriber: object(Drupal\simplenews\Entity\Subscriber)
  31. * The subscriber for which the newsletter is built.
  32. * {{ simplenews_subscriber.getMail }}: string: subscriber's email address
  33. * Note that depending on the used caching strategy, the generated body might
  34. * be used for multiple subscribers. If you created personalized newsletters
  35. * and can't use tokens for that, make sure to disable caching or write a
  36. * custom caching strategy implemention.
  37. *
  38. * @see template_preprocess_simplenews_newsletter_body()
  39. */
  40. #}
  41. <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
  42. <tbody>
  43. <tr>
  44. <td style="padding: 37px 0; background-color: #eeeeee; text-align:center;" align="center" bgcolor="#eeeeee">
  45. <!-- #nl_container -->
  46. <p style="text-align:center; margin:5px 0;"><a href="{{ path('entity.node.canonical', {'node': node.id}) }}" style="font-size:9px; color:#444444;">Voir la version en ligne / View this email on the web</a>
  47. <table bgcolor="#ffffff" style="margin: 0 auto; color: #444444; font-family: arial; font-size: 12px; background-color: #ffffff; float:none; position:relative;" width="600" border="0" cellspacing="0" cellpadding="0">
  48. <tbody>
  49. <tr>
  50. <td style="text-align:left;">
  51. {# <h2>{{ title }}</h2> #}
  52. {{ build }}
  53. <table style="margin: 0 0 0 10px; border-collapse: collapse; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;">
  54. <tbody>
  55. <tr>
  56. <td style="vertical-align: top; padding: 5px 0;" width="580">
  57. <table style="border-collapse: collapse; width: 565px; color: #444444; font-family: arial; font-size: 12px; border-color: #dddddd; background-color: #ffffff;" width="565" cellspacing="0" cellpadding="0">
  58. <tbody>
  59. <tr>
  60. <td style="padding: 5px 0 5px 5px; line-height: normal;">
  61. <table width="100%" border="0" cellspacing="0" cellpadding="0">
  62. <tbody>
  63. <tr>
  64. <td>
  65. <table border="0" cellspacing="0" cellpadding="0" align="left">
  66. <tbody>
  67. <tr>
  68. <td>
  69. <table style="border-collapse: collapse; align: left;" cellspacing="0" cellpadding="0" align="left">
  70. <tbody>
  71. <tr>
  72. <td style="padding: 2px; margin: 0; vertical-align: top;">
  73. <a href="https://www.instagram.com/materio_group" target="_blank" style="display: block; border: none; text-decoration: none;">
  74. <img src="https://materio.com/sites/default/files/ico_social_instagram.png" alt="instagram" style="vertical-align: top; border: none;">
  75. </a>
  76. </td>
  77. <td style="padding: 2px; margin: 0; vertical-align: top;">
  78. <a href="https://www.youtube.com/channel/UChKuhMq9rSfLqUmPc9dEgXw" target="_blank" style="display: block; border: none; text-decoration: none;">
  79. <img src="https://materio.com/sites/default/files/ico_social_youtube.png" alt="youtube" style="vertical-align: top; border: none;">
  80. </a>
  81. </td>
  82. <td style="padding: 2px; margin: 0; vertical-align: top;">
  83. <a href="https://www.linkedin.com/company/mat-rio-sas" target="_blank" style="display: block; border: none; text-decoration: none;">
  84. <img src="https://materio.com/sites/default/files/ico_social_linkedin.png" alt="youtube" style="vertical-align: top; border: none;">
  85. </a>
  86. </td>
  87. </tr>
  88. </tbody>
  89. </table>
  90. </td>
  91. </tr>
  92. </tbody>
  93. </table>
  94. </td>
  95. </tr>
  96. </tbody>
  97. </table>
  98. </td>
  99. </tr>
  100. </tbody>
  101. </table>
  102. </td>
  103. </tr>
  104. </tbody>
  105. </table>
  106. </td>
  107. </tr>
  108. </tbody>
  109. </table>
  110. <table style="height: 10px; border-collapse: collapse; font-size: 1px;" border="0" cellspacing="0" cellpadding="0">
  111. <tbody>
  112. <tr>
  113. <td style="height: 10px; border-spacing: 0; font-size: 1px;" height="10">
  114. &nbsp;
  115. </td>
  116. </tr>
  117. </tbody>
  118. </table>
  119. {% if not opt_out_hidden %}
  120. {% if format == 'html' %}
  121. <p class="newsletter-footer"><a
  122. href="[simplenews-subscriber:unsubscribe-url]">{{ unsubscribe_text }}</a>
  123. </p>
  124. {% else %}
  125. -- {{ unsubscribe_text }} : [simplenews-subscriber:unsubscribe-url]
  126. {% endif %}
  127. {% endif %}
  128. {% if key == 'test' %}
  129. - - - {{ test_message }} - - -
  130. {% endif %}
  131. <p id="footer_address" style="color:#444444; text-align: center; margin: 20px 20px 0; line-height:1; font-size:10px; ">
  132. matériO SAS<br>8, rue Chaptal<br>75009 Paris<br><a href="https://materio.com" style="color:#444444">materio.com</a>
  133. </p>
  134. </td>
  135. </tr>
  136. </tbody>
  137. </table>