Changeset - 5da13e8942c1
[Not reviewed]
default
0 1 0
Dennis Fink - 11 years ago 2013-11-18 22:01:33
dennis.fink@c3l.lu
updated ennstatus
1 file changed with 10 insertions and 1 deletions:
0 comments (0 inline, 0 general)
ennstatus/templates/status/macros.html
Show inline comments
 
@@ -6,12 +6,21 @@
 
  {% else %}
 
    {% set color = "text-danger" %}
 
  {% endif %}
 
  <p class={{ color }}>{{ status}}</p>
 
{% endmacro %}
 

	
 
{% macro colorize_obfs(obfs) %}
 
  {% if obfs %}
 
    {% set color = "text-success" %}
 
  {% else %}
 
    {% set color = "text-danger" %}
 
  {% endif %}
 
  <p class={{ color }}>{{ obfs }}</p>
 
{% endmacro %}
 

	
 
{% macro create_country(country) %}
 
  {% set country_class = "flag-" + country|lower|replace(' ', '-') %}
 
  <i class={{ country_class }}></i> {{ country|title }}
 
{% endmacro %}
 

	
 
{% macro create_fingerprint(fingerprint) %}
 
@@ -45,13 +54,13 @@
 
            <td>{{ colorize_status(status) }}</td>
 
          {% endfor %}
 
          <td>{{ create_country(server['country']) }}</td>
 
          {% if server_type in ('Exit', 'Relay') %}
 
            <td>{{ create_fingerprint(server['fingerprint']) }}</td>
 
          {% else %}
 
            <td>{{ server['obfs'] }}</td>
 
            <td>{{ colorize_obfs(server['obfs']) }}</td>
 
          {% endif %}
 
          <td>{{ server['last_updated'] }}</td>
 
        </tr>
 
      {% endfor %}
 
    </tbody>
 
  </table>
0 comments (0 inline, 0 general)