templates/games/pitchabulaire.html.twig line 1

Open in your IDE?
  1. {% set section = 'pitchabulaire' %}
  2. {% extends 'base.html.twig' %}
  3. {% block title %}Pitch - Jeux - Pitch'abulaire{% endblock %}
  4. {% block body %}
  5. <div data-controller="pitchabulaire" class="games">
  6. {% include '_elements/page-header.html.twig'
  7. with {
  8. breadcrumb: [
  9. { path:'home', label:"Accueil"},
  10. { path: 'jeux', label: "Toi et Pitch" },
  11. { label: "Pitch'abulaire" }
  12. ],
  13. back: [
  14. { path:'jeux' }
  15. ]
  16. }
  17. %}
  18. <iframe id="iframe-pitchabulaire" title="Jeu : Pitch'abulaire" width="100%" height="700" src="/games/pitchabulaire/index.html" scrolling="no" frameborder="0"></iframe>
  19. </div>
  20. <script type='text/javascript'>
  21. // Listen for messages sent from the iFrame
  22. var eventMethod = window.addEventListener ? "addEventListener" : "attachEvent";
  23. var eventer = window[eventMethod];
  24. var messageEvent = eventMethod == "attachEvent" ? "onmessage" : "message";
  25. eventer(messageEvent,function(e) {
  26. // If the message is a resize frame request
  27. if (e.data.indexOf('resize::') != -1) {
  28. var height = e.data.replace('resize::', '');
  29. document.getElementById('iframe-pitchabulaire').style.height = height+'px';
  30. }
  31. } ,false);
  32. </script>
  33. {% endblock %}