diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-12 19:10:27 -0500 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-12-12 19:10:27 -0500 |
commit | bcf8f7438278880f092361814bbcd3207d11e937 (patch) | |
tree | c9b83fb0770dd17f352673c3ff13b8b13b09a180 | |
parent | 02fdb37d55ec1158162d4c35c3b43d1bcd4e58fa (diff) | |
parent | 024fd1b2843d2abd0094faedfbc49e1d1a21edd0 (diff) |
Merge commit '024fd1b' (Remove cdnprefix template tag)
Conflicts:
templates/base.html
templates/public/art.html
templates/public/donate.html
templates/public/download.html
templates/public/index.html
-rw-r--r-- | local_settings.py.example | 2 | ||||
-rw-r--r-- | main/templatetags/cdn.py | 12 | ||||
-rw-r--r-- | templates/base.html | 10 | ||||
-rw-r--r-- | templates/public/art.html | 8 | ||||
-rw-r--r-- | templates/public/donate.html | 2 | ||||
-rw-r--r-- | templates/public/index.html | 21 |
6 files changed, 21 insertions, 34 deletions
diff --git a/local_settings.py.example b/local_settings.py.example index e252d625..5a8d4b26 100644 --- a/local_settings.py.example +++ b/local_settings.py.example @@ -75,7 +75,5 @@ SECRET_KEY = '00000000000000000000000000000000000000000000000' ## CDN settings CDN_ENABLED = False -# Scheme-relative URL, should work for both http/https -CDN_PATH = '//example.com/path/' # vim: set ts=4 sw=4 et: diff --git a/main/templatetags/cdn.py b/main/templatetags/cdn.py index b91553ed..f290a524 100644 --- a/main/templatetags/cdn.py +++ b/main/templatetags/cdn.py @@ -15,16 +15,4 @@ def jquery(): link = '%sjquery-%s.min.js' % (static_url, version) return '<script type="text/javascript" src="%s"></script>' % link -@register.tag -def cdnprefix(parser, token): - return CDNPrefixNode() - -class CDNPrefixNode(template.Node): - def render(self, context): - oncdn = getattr(settings, 'CDN_ENABLED', True) - if not oncdn: - return '' - # if left undefined, same behavior as if CDN is turned off - return getattr(settings, 'CDN_PATH', '') - # vim: set ts=4 sw=4 et: diff --git a/templates/base.html b/templates/base.html index f4284e2d..6f4c73f5 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,12 +1,12 @@ -{% load url from future %}<!DOCTYPE html> +{% load url from future %}{% load static from staticfiles %}<!DOCTYPE html> <html lang="en"> <head> <title>{% block title %}Parabola GNU/Linux-libre{% endblock %}</title> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> - <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}archweb.css" media="screen, projection" /> - <link rel="stylesheet" type="text/css" href="{{ STATIC_URL }}archweb-print.css" media="print" /> - <link rel="icon" type="image/x-icon" href="{{ STATIC_URL }}favicon.ico" /> - <link rel="shortcut icon" type="image/x-icon" href="{{ STATIC_URL }}favicon.ico" /> + <link rel="stylesheet" type="text/css" href="{% static "archweb.css" %}" media="screen, projection" /> + <link rel="stylesheet" type="text/css" href="{% static "archweb-print.css" %}" media="print" /> + <link rel="icon" type="image/x-icon" href="{% static "favicon.ico" %}" /> + <link rel="shortcut icon" type="image/x-icon" href="{% static "favicon.ico" %}" /> <link rel="search" type="application/opensearchdescription+xml" href="{% url 'opensearch-packages' as osp %}{{ osp }}" title="Parabola Packages" /> {% block head %}{% endblock %} </head> diff --git a/templates/public/art.html b/templates/public/art.html index 08acf764..b32cbd92 100644 --- a/templates/public/art.html +++ b/templates/public/art.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load cdn %} +{% load static from staticfiles %} {% block title %}Parabola - Artwork{% endblock %} @@ -25,12 +25,12 @@ {% comment %} <!-- This is an example of how images should be added here --> <em>Also available in print-quality - <a href="{{ STATIC_URL }}logos/parabola-logo-dark-1200dpi.png" + <a href="{% static "logos/parabola-logo-dark-1200dpi.png" %}" title="Download 1200dpi PNG format">PNG</a> and scalable - <a href="{{ STATIC_URL }}logos/parabola-logo-dark-scalable.svg" + <a href="{% static "logos/parabola-logo-dark-scalable.svg" %}" title="Download scalable SVG format">SVG</a> formats.</em></p> - <img src="{{ STATIC_URL }}logos/parabola-logo-dark-90dpi.png" + <img src="{% static "logos/parabola-logo-dark-90dpi.png" %}" alt="Parabola PNG logo @ 90dpi" title="Parabola PNG logo @ 90dpi" /> <p><strong>Two-color inverted version</strong> (for dark backgrounds)<br /> diff --git a/templates/public/donate.html b/templates/public/donate.html index 6ec407dc..e0771606 100644 --- a/templates/public/donate.html +++ b/templates/public/donate.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% load cache %} -{% load cdn %} +{% load static from staticfiles %} {% block title %}Parabola - Donate{% endblock %} diff --git a/templates/public/index.html b/templates/public/index.html index 73f48012..58d5815d 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -1,6 +1,7 @@ {% extends "base.html" %} -{% load markup cache cdn %} +{% load markup cache %} {% load url from future %} +{% load static from staticfiles %} {% block head %} <link rel="alternate" type="application/rss+xml" title="Parabola News Updates" href="/feeds/news/" /> @@ -37,7 +38,7 @@ </h3> <a href="/feeds/news/" title="Parabola News RSS Feed" - class="rss-icon"><img width="16" height="16" src="{% cdnprefix %}/media/rss.png" alt="RSS Feed" /></a> + class="rss-icon"><img width="16" height="16" src="{% static "rss.png" %}" alt="RSS Feed" /></a> {% for news in news_updates %} {% if forloop.counter0 < 5 %} @@ -90,7 +91,7 @@ title="Browse all of the latest packages">more</a>)</span></h3> <a href="/feeds/packages/" title="Parabola Package Updates RSS Feed" - class="rss-icon"><img width="16" height="16" src="{% cdnprefix %}/media/rss.png" alt="RSS Feed" /></a> + class="rss-icon"><img width="16" height="16" src="{% static "rss.png" %}" alt="RSS Feed" /></a> <table> {% for update in pkg_updates %} @@ -144,7 +145,7 @@ title="Check the status of all known mirrors">Mirror Status</a></li> <li><a href="/packages/differences/" title="See differences in packages between available architectures">Differences Reports</a> - <img width="16" height="16" src="{% cdnprefix %}/media/new.png" alt="New"/></li> + <img width="16" height="16" src="{% static "new.png" %}" alt="New"/></li> </ul> <h4>Development</h4> @@ -166,7 +167,7 @@ title="Releng Testbuild Feedback">Releng Testbuild Feedback</a></li> <li><a href="{% url 'visualize-index' %}" title="View visualizations">Visualizations</a> - <img width="16" height="16" src="{% cdnprefix %}/media/new.png" alt="New"/></li> + <img width="16" height="16" src="{% static "new.png" %}" alt="New"/></li> </ul> <h4>More Resources</h4> @@ -174,7 +175,7 @@ <ul> <li><a href="{% url 'page-keys' %}" title="Package/Database signing master keys">Signing Master Keys</a> - <img width="16" height="16" src="{% cdnprefix %}/media/new.png" alt="New"/></li> + <img width="16" height="16" src="{% static "new.png" %}" alt="New"/></li> <li><a href="https://wiki.parabolagnulinux.org/Media" title="Parabola in the media">Press Coverage</a></li> <li><a href="{% url 'page-art' %}" title="Parabola logos and other artwork for promotional use">Logos & Artwork</a></li> @@ -195,23 +196,23 @@ donate button would go here <div id="arch-sponsors" class="widget"> <a href="http://gnuchile.cl"> - <img src="{{ STATIC_URL }}gnuchile.png" + <img src="{% static "gnuchile.png" %}" alt="GNU Chile - Donates the .org domain" title="GNU Chile - Donates the .org domain" /> </a> - <img src="{{ STATIC_URL }}venenux.png" + <img src="{% static "venenux.png" %}" alt="Venenux GNU/Linux - Donates the repo, wiki and lists hosting" title="Venenux GNU/Linux - Donates the repo, wiki and lists hosting" /> <a href="http://naltu.com"> - <img src="{{ STATIC_URL }}naltu.png" + <img src="{% static "naltu.png" %}" alt="NaltĂș - Donates the website, bugs, projects and ABSLibre hosting" title="NaltĂș - Donates the website, bugs, projects and ABSLibre hosting" /> </a> <a href="http://freedomincluded.com"> - <img src="{{ STATIC_URL }}freedomincluded.png" + <img src="{% static "freedomincluded.png" %}" alt="Freedom Included - Donated Lemote Yeeloongs to port Parabola to the MIPS architecture" title="Freedom Included - Donated Lemote Yeeloongs to port Parabola to the MIPS architecture" /> </a> |