From 0b930fd92140858f4ad21e593feb057996af9b95 Mon Sep 17 00:00:00 2001 From: Dan McGee Date: Wed, 16 Jan 2013 00:36:17 -0600 Subject: Convert all usages of flag icons to new sprite This uses a new template tag to avoid repeating construction of the necessary HTML element all over the place. The site should look exactly as it did before, except now you don't have to download 20+ images to see some pages. Signed-off-by: Dan McGee --- templates/mirrors/mirror_details.html | 5 ++++- templates/mirrors/status.html | 5 ++++- templates/mirrors/status_table.html | 3 ++- 3 files changed, 10 insertions(+), 3 deletions(-) (limited to 'templates/mirrors') diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html index a56123ff..8ea6bbec 100644 --- a/templates/mirrors/mirror_details.html +++ b/templates/mirrors/mirror_details.html @@ -1,9 +1,12 @@ {% extends "base.html" %} {% load static from staticfiles %} {% load mirror_status %} +{% load flags %} {% block title %}Arch Linux - {{ mirror.name }} - Mirror Details{% endblock %} +{% block head %}{% endblock %} + {% block content %}
@@ -90,7 +93,7 @@

Available URLs

{% if m_url.protocol.is_download %}{{ m_url.url }}{% else %}{{ m_url.url }}{% endif %} {{ m_url.protocol }} - {% if m_url.country %} {% endif %}{{ m_url.country.name }} + {% country_flag m_url.country %}{{ m_url.country.name }} {{ m_url.has_ipv4|yesno|capfirst }} {{ m_url.has_ipv6|yesno|capfirst }} {{ m_url.last_sync|date:'Y-m-d H:i'|default:'unknown' }} diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html index ec2ae568..8d32d3fa 100644 --- a/templates/mirrors/status.html +++ b/templates/mirrors/status.html @@ -1,9 +1,12 @@ {% extends "base.html" %} {% load static from staticfiles %} {% load mirror_status %} +{% load flags %} {% block title %}Arch Linux - Mirror Status{% if tier != None %} - Tier {{ tier }}{% endif %}{% endblock %} +{% block head %}{% endblock %} + {% block content %}

Mirror Status{% if tier != None %} - Tier {{ tier }}{% endif %}

@@ -88,7 +91,7 @@

Mirror Syncing Error Log

{% spaceless %} {{ log.url__url }} {{ log.url__protocol__protocol }} - {% if log.country %} {% endif %}{{ log.country.name }} + {% country_flag log.country %}{{ log.country.name }} {{ log.error|linebreaksbr }} {{ log.last_occurred|date:'Y-m-d H:i' }} {{ log.error_count }} diff --git a/templates/mirrors/status_table.html b/templates/mirrors/status_table.html index c7394de6..2dd7ef49 100644 --- a/templates/mirrors/status_table.html +++ b/templates/mirrors/status_table.html @@ -1,4 +1,5 @@ {% load mirror_status %} +{% load flags %} @@ -17,7 +18,7 @@ {% spaceless %} - + -- cgit v1.2.3-54-g00ecf
{{ m_url.url }} {{ m_url.protocol }}{% if m_url.country %} {% endif %}{{ m_url.country.name }}{% country_flag m_url.country %}{{ m_url.country.name }} {{ m_url.completion_pct|percentage:1 }} {{ m_url.delay|duration|default:'unknown' }} {{ m_url.duration_avg|floatformat:2 }}