You are here

flot-examples.html.twig in Flot 8

{% extends "flot-element.html.twig" %}
{% block content %}
{{ attach_library('flot_examples/flot_examples') }}
{% if title is not null %}
<h3>{{ title }}</h3>
{% endif %}
{% block demo %}
    <div class="demo-container" style="{{ demo_container_attributes }}">
{% block container %}
{% if id is defined %}
      <div id="{{ id }}" class="demo-placeholder"></div>
{% else %}
      <div id="placeholder" class="demo-placeholder"></div>
{% endif %}
{% endblock container %}
    </div>
{% endblock demo %}
{% block description %}
{% for paragraph in text %}
  {% if paragraph is iterable %}
    {% if paragraph.setp == true %}
      <p>
    {% endif %} 
    {% for key,snip in paragraph %}
      {% if key|trim != "setp" %}
      {{ snip }}
      {% endif %}
    {% endfor %}
    {% if paragraph.setp == true %}
      </p>
    {% endif %} 
  {% else %}
  <p>
    {{ paragraph }}
  </p>
  {% endif %}
{% endfor %}
{% endblock description %}
{% endblock content%}

File

flot_examples/templates/flot-examples.html.twig
View source
  1. {% extends "flot-element.html.twig" %}
  2. {% block content %}
  3. {{ attach_library('flot_examples/flot_examples') }}
  4. {% if title is not null %}
  5. <h3>{{ title }}</h3>
  6. {% endif %}
  7. {% block demo %}
  8. <div class="demo-container" style="{{ demo_container_attributes }}">
  9. {% block container %}
  10. {% if id is defined %}
  11. <div id="{{ id }}" class="demo-placeholder"></div>
  12. {% else %}
  13. <div id="placeholder" class="demo-placeholder"></div>
  14. {% endif %}
  15. {% endblock container %}
  16. </div>
  17. {% endblock demo %}
  18. {% block description %}
  19. {% for paragraph in text %}
  20. {% if paragraph is iterable %}
  21. {% if paragraph.setp == true %}
  22. <p>
  23. {% endif %}
  24. {% for key,snip in paragraph %}
  25. {% if key|trim != "setp" %}
  26. {{ snip }}
  27. {% endif %}
  28. {% endfor %}
  29. {% if paragraph.setp == true %}
  30. </p>
  31. {% endif %}
  32. {% else %}
  33. <p>
  34. {{ paragraph }}
  35. </p>
  36. {% endif %}
  37. {% endfor %}
  38. {% endblock description %}
  39. {% endblock content%}