|
| 1 | +<html lang="en"> |
| 2 | +{% block head %} |
| 3 | + {% block stylesheets %} |
| 4 | + <style> |
| 5 | + {{ include('@TwigDoc/style/style.css.twig') }} |
| 6 | + </style> |
| 7 | + {% endblock %} |
| 8 | + <title>{% block title %}Twig Component Documentation{% endblock %}</title> |
| 9 | + {% block javascripts %} |
| 10 | + {% endblock %} |
| 11 | +{% endblock %} |
| 12 | +</html> |
| 13 | + |
| 14 | +<body> |
| 15 | +{% block body %} |
| 16 | +<div id="twig-doc-container"> |
| 17 | + |
| 18 | + <div class="breakpoints"> |
| 19 | + <div id="screenwidth"></div> |
| 20 | + <div class="one"></div> |
| 21 | + <div class="two"></div> |
| 22 | + <div class="three"></div> |
| 23 | + <div class="four"></div> |
| 24 | + <div class="five"></div> |
| 25 | + <div class="six"></div> |
| 26 | + <div class="seven"></div> |
| 27 | + <div class="eight"></div> |
| 28 | + </div> |
| 29 | + <!-- find better solution --> |
| 30 | + <script> |
| 31 | + function widthResizer(){ |
| 32 | + var width = window.innerWidth |
| 33 | + if(document.getElementById("screenwidth")) { |
| 34 | + document.getElementById("screenwidth").innerHTML = "Width: " + width + "px" |
| 35 | + } |
| 36 | + console.log(width) |
| 37 | + } |
| 38 | +
|
| 39 | + // Getting the width of the browser on load |
| 40 | + widthResizer() |
| 41 | +
|
| 42 | + // Getting the width of the browser whenever the screen resolution changes. |
| 43 | + window.addEventListener('resize', widthResizer) |
| 44 | + </script> |
| 45 | + |
| 46 | + {% include '@TwigDoc/component/_search.html.twig' %} |
| 47 | + |
| 48 | + {% if not components %} |
| 49 | + <div class="twig-doc-error"> |
| 50 | + No components found |
| 51 | + </div> |
| 52 | + {% endif %} |
| 53 | + <div class="twig-doc-body"> |
| 54 | + |
| 55 | + {# <button onClick="setScreenwidth('small');">S</button> |
| 56 | + <button onClick="setScreenwidth('medium');">M</button> |
| 57 | + <button onClick="setScreenwidth('large');">L</button> |
| 58 | + <button onClick="setScreenwidth('default');">Default</button> #} |
| 59 | + |
| 60 | + <div class="navigation"> |
| 61 | + <ul> |
| 62 | + <li> |
| 63 | + <a href="?filterQuery=Atoms&filterType=category">Atoms</a> |
| 64 | + <ul> |
| 65 | + <li><a href="?filterQuery=Buttons&filterType=sub_category">Buttons</a></li> |
| 66 | + <li><a href="?filterQuery=Typography&filterType=sub_category">Typography</a></li> |
| 67 | + </ul> |
| 68 | + </li> |
| 69 | + <li><a href="?filterQuery=Commons&filterType=category">Commons</a></li> |
| 70 | + <li><a href="?filterQuery=Snippets&filterType=category">Snippets</a></li> |
| 71 | + <li><a href="?filterQuery=Blocks&filterType=category">Blocks</a></li> |
| 72 | + <li><a href="?filterQuery=Templates&filterType=category">Templates</a></li> |
| 73 | + </ul> |
| 74 | + </div> |
| 75 | + |
| 76 | + {% for items in components %} |
| 77 | + <div> |
| 78 | + {% for item in items %} |
| 79 | + {% include '@TwigDoc/component/_item.html.twig' with { component: item }%} |
| 80 | + {% endfor %} |
| 81 | + </div> |
| 82 | + {% endfor %} |
| 83 | + </div> |
| 84 | +</div> |
| 85 | +{% endblock %} |
| 86 | +</body> |
0 commit comments