Browse Source

Section node page into columns

pm2
Luke Childs 8 years ago
parent
commit
dace3fbc39
  1. 10
      assets/style.css
  2. 148
      views/node.html

10
assets/style.css

@ -171,6 +171,16 @@ dd {
margin: 0.2em 0 0 2em; margin: 0.2em 0 0 2em;
} }
.columns {
-moz-columns: 2;
columns: 2;
}
.meta,
.config {
overflow: hidden;
break-inside: avoid;
}
/* Footer */ /* Footer */
footer { footer {
margin-top: 2em; margin-top: 2em;

148
views/node.html

@ -43,79 +43,83 @@
</dl> </dl>
</section> </section>
<section class="config"> <div class="columns">
<h3>Config</h3>
<dl>
{% if node.or_addresses.length %}
<dt>Or Addresses</dt>
{% for address in node.or_addresses %}
<dd>{{ address }}</dd>
{% endfor %}
{% endif %}
{% if node.dir_address %}
<dt>Dir Address</dt>
<dd>{{ node.dir_address }}</dd>
{% endif %}
{% if node.consensus_weight %}
<dt>Consensus Weight</dt>
<dd>{{ node.consensus_weight }}</dd>
{% endif %}
{% if node.transports.length %}
<dt>Transport Protocols</dt>
{% for transportProtocol in node.transports %}
<dd>{{ transportProtocol }}</dd>
{% endfor %}
{% endif %}
{% if node.exit_policy.length %}
<dt>Exit Policy</dt>
{% for rule in node.exit_policy %}
<dd>{{ rule }}</dd>
{% endfor %}
{% endif %}
{% if node.host_name %}
<dt>Hostname</dt>
<dd>{{ node.host_name }}</dd>
{% endif %}
{% if node.as_number %}
<dt>AS Number</dt>
<dd>{{ node.as_number }}</dd>
{% endif %}
{% if node.as_name %}
<dt>AS Name</dt>
<dd>{{ node.as_name }}</dd>
{% endif %}
{% if node.platform %}
<dt>Platform</dt>
<dd>{{ node.platform }}</dd>
{% endif %}
{% if node.type %}
<dt>Type</dt>
<dd>{{ node.type | title }}</dd>
{% endif %}
</dl>
</section>
<section class="meta"> <section class="config">
<h3>Meta</h3> <h3>Config</h3>
<dl> <dl>
{% if node.contact %} {% if node.or_addresses.length %}
<dt>Contact</dt> <dt>Or Addresses</dt>
<dd>{{ node.contact }}</dd> {% for address in node.or_addresses %}
{% endif %} <dd>{{ address }}</dd>
{% if node.country_name %} {% endfor %}
<dt>Country</dt> {% endif %}
<dd>{{ node.country_name }}</dd> {% if node.dir_address %}
{% endif %} <dt>Dir Address</dt>
{% if node.region_name %} <dd>{{ node.dir_address }}</dd>
<dt>Region</dt> {% endif %}
<dd>{{ node.region_name }}</dd> {% if node.consensus_weight %}
{% endif %} <dt>Consensus Weight</dt>
{% if node.city_name %} <dd>{{ node.consensus_weight }}</dd>
<dt>City</dt> {% endif %}
<dd>{{ node.city_name }}</dd> {% if node.transports.length %}
{% endif %} <dt>Transport Protocols</dt>
</dl> {% for transportProtocol in node.transports %}
</section> <dd>{{ transportProtocol }}</dd>
{% endfor %}
{% endif %}
{% if node.exit_policy.length %}
<dt>Exit Policy</dt>
{% for rule in node.exit_policy %}
<dd>{{ rule }}</dd>
{% endfor %}
{% endif %}
{% if node.host_name %}
<dt>Hostname</dt>
<dd>{{ node.host_name }}</dd>
{% endif %}
{% if node.as_number %}
<dt>AS Number</dt>
<dd>{{ node.as_number }}</dd>
{% endif %}
{% if node.as_name %}
<dt>AS Name</dt>
<dd>{{ node.as_name }}</dd>
{% endif %}
{% if node.platform %}
<dt>Platform</dt>
<dd>{{ node.platform }}</dd>
{% endif %}
{% if node.type %}
<dt>Type</dt>
<dd>{{ node.type | title }}</dd>
{% endif %}
</dl>
</section>
<section class="meta">
<h3>Meta</h3>
<dl>
{% if node.contact %}
<dt>Contact</dt>
<dd>{{ node.contact }}</dd>
{% endif %}
{% if node.country_name %}
<dt>Country</dt>
<dd>{{ node.country_name }}</dd>
{% endif %}
{% if node.region_name %}
<dt>Region</dt>
<dd>{{ node.region_name }}</dd>
{% endif %}
{% if node.city_name %}
<dt>City</dt>
<dd>{{ node.city_name }}</dd>
{% endif %}
</dl>
</section>
</div>
{% endif %} {% endif %}

Loading…
Cancel
Save