conditionalize rendering of everything

This commit is contained in:
Tomáš Mládek 2020-07-15 13:51:40 +02:00
parent 6a55261a3d
commit a2253f1845

View file

@ -13,8 +13,9 @@
<header> <header>
<h1>/-\ infrastructure</h1> <h1>/-\ infrastructure</h1>
</header> </header>
<h2>important links</h2> {% if links %}
<section class="links boxes"> <h2>important links</h2>
<section class="links boxes">
{% for link in links %} {% for link in links %}
<a class="link box" href="{{ link.url }}"> <a class="link box" href="{{ link.url }}">
<section class="box-content"> <section class="box-content">
@ -30,9 +31,11 @@
</section> </section>
</a> </a>
{% endfor %} {% endfor %}
</section> </section>
<h2>internal&nbsp;services</h2> {% endif %}
<section class="services boxes"> {% if services %}
<h2>internal&nbsp;services</h2>
<section class="services boxes">
{% for service in services %} {% for service in services %}
<a class="service box status-{{ service.status }}" href="{{ service.url }}"> <a class="service box status-{{ service.status }}" href="{{ service.url }}">
<section class="box-content"> <section class="box-content">
@ -51,9 +54,11 @@
</section> </section>
</a> </a>
{% endfor %} {% endfor %}
</section> </section>
<h2>machines</h2> {% endif %}
<section class="machines boxes"> {% if machines %}
<h2>machines</h2>
<section class="machines boxes">
<section class="stats"> <section class="stats">
VPS STATS &mdash; {{ vps_stats|safe }} VPS STATS &mdash; {{ vps_stats|safe }}
</section> </section>
@ -75,9 +80,11 @@
</section> </section>
</a> </a>
{% endfor %} {% endfor %}
</section> </section>
<h2>logs firehose</h2> {% endif %}
<section class="firehose"> {% if feed_items %}
<h2>logs firehose</h2>
<section class="firehose">
<ul class="logs"> <ul class="logs">
{% for feed_item in feed_items %} {% for feed_item in feed_items %}
<li> <li>
@ -93,6 +100,7 @@
</li> </li>
{% endfor %} {% endfor %}
</ul> </ul>
</section> </section>
{% endif %}
</body> </body>
</html> </html>