summaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorDan McGee <dan@archlinux.org>2011-12-05 23:06:10 -0600
committerDan McGee <dan@archlinux.org>2011-12-05 23:06:10 -0600
commit943ef2e8e436a32ce5dc956c4d855866cd644cc1 (patch)
tree870f68873a61bcceff00e27b692abaef7542c991 /templates
parent1c23308299f33e5b429899463eb207f07ad51403 (diff)
Convert to and enable staticfiles contrib application
This moves our site static files into the sitestatic directory if they are shared resources, and also moves a handful of things (such as the artwork logos) into application-specific static/ directories. This allows the staticfiles contrib app to work after a few settings tweaks, a run of collectstatic, and massaging the hardcoded '/media/' prefix out of our templates. Django 1.4 is going to make this a lot easier to move things to a CDN and provides better template tags; for now this is setting the stage before we can move to that. Signed-off-by: Dan McGee <dan@archlinux.org>
Diffstat (limited to 'templates')
-rw-r--r--templates/base.html14
-rw-r--r--templates/devel/clock.html4
-rw-r--r--templates/devel/index.html4
-rw-r--r--templates/devel/packages.html4
-rw-r--r--templates/mirrors/mirror_details.html4
-rw-r--r--templates/mirrors/mirrors.html3
-rw-r--r--templates/mirrors/status.html4
-rw-r--r--templates/news/add.html2
-rw-r--r--templates/packages/details.html2
-rw-r--r--templates/packages/differences.html4
-rw-r--r--templates/packages/groups.html3
-rw-r--r--templates/packages/opensearch.xml2
-rw-r--r--templates/packages/packages_list.html3
-rw-r--r--templates/packages/signoffs.html4
-rw-r--r--templates/packages/stale_relations.html4
-rw-r--r--templates/releng/iso_overview.html4
-rw-r--r--templates/releng/result_list.html4
-rw-r--r--templates/todolists/list.html3
-rw-r--r--templates/todolists/public_list.html4
-rw-r--r--templates/todolists/view.html4
-rw-r--r--templates/visualize/index.html10
21 files changed, 47 insertions, 43 deletions
diff --git a/templates/base.html b/templates/base.html
index a120c537..0da77cf3 100644
--- a/templates/base.html
+++ b/templates/base.html
@@ -3,13 +3,13 @@
<head>
<title>{% block title %}Arch Linux{% endblock %}</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
- <link rel="stylesheet" type="text/css" href="/media/archweb.css" media="screen, projection" />
- <link rel="stylesheet" type="text/css" href="/media/archweb-print.css" media="print" />
- <link rel="icon" type="image/x-icon" href="/media/favicon.ico" />
- <link rel="shortcut icon" type="image/x-icon" href="/media/favicon.ico" />
- <link rel="apple-touch-icon" href="/media/logos/apple-touch-icon-57x57.png" />
- <link rel="apple-touch-icon" sizes="72x72" href="/media/logos/apple-touch-icon-72x72.png" />
- <link rel="apple-touch-icon" sizes="114x114" href="/media/logos/apple-touch-icon-114x114.png" />
+ <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="apple-touch-icon" href="{{ STATIC_URL }}logos/apple-touch-icon-57x57.png" />
+ <link rel="apple-touch-icon" sizes="72x72" href="{{ STATIC_URL }}logos/apple-touch-icon-72x72.png" />
+ <link rel="apple-touch-icon" sizes="114x114" href="{{ STATIC_URL }}logos/apple-touch-icon-114x114.png" />
<link rel="search" type="application/opensearchdescription+xml" href="{% url opensearch-packages as osp %}{{ osp }}" title="Arch Linux Packages" />
{% block head %}{% endblock %}
</head>
diff --git a/templates/devel/clock.html b/templates/devel/clock.html
index d2eb0a8d..72a57d0f 100644
--- a/templates/devel/clock.html
+++ b/templates/devel/clock.html
@@ -40,8 +40,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#clocks-table:has(tbody tr)").tablesorter(
diff --git a/templates/devel/index.html b/templates/devel/index.html
index 0f0ded38..530986ae 100644
--- a/templates/devel/index.html
+++ b/templates/devel/index.html
@@ -288,8 +288,8 @@
{% endcache %}
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#dash-myflagged:not(:has(tbody tr.empty))").tablesorter(
diff --git a/templates/devel/packages.html b/templates/devel/packages.html
index 9f01167c..ed4123b6 100644
--- a/templates/devel/packages.html
+++ b/templates/devel/packages.html
@@ -52,8 +52,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra']});
diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html
index 3daf1a2d..02aa5aeb 100644
--- a/templates/mirrors/mirror_details.html
+++ b/templates/mirrors/mirror_details.html
@@ -105,8 +105,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$("#available_urls:has(tbody tr)").tablesorter(
diff --git a/templates/mirrors/mirrors.html b/templates/mirrors/mirrors.html
index bf356080..1207e811 100644
--- a/templates/mirrors/mirrors.html
+++ b/templates/mirrors/mirrors.html
@@ -41,7 +41,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra'], sortList: [[1,0], [2,0]]});
diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html
index 046c4196..54c59413 100644
--- a/templates/mirrors/status.html
+++ b/templates/mirrors/status.html
@@ -102,8 +102,8 @@
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var headers = { 5: { sorter: 'duration' }, 6: { sorter: 'mostlydigit' }, 7: { sorter: 'mostlydigit' }, 8: { sorter: 'mostlydigit' } };
diff --git a/templates/news/add.html b/templates/news/add.html
index bb866dc4..dca8fe85 100644
--- a/templates/news/add.html
+++ b/templates/news/add.html
@@ -33,7 +33,7 @@
<div id="news-preview-data" class="article-content"></div>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(enablePreview);
</script>
diff --git a/templates/packages/details.html b/templates/packages/details.html
index ef6ee982..1e3a2944 100644
--- a/templates/packages/details.html
+++ b/templates/packages/details.html
@@ -233,7 +233,7 @@
</div><!-- #pkgdetails -->
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(ajaxifyFiles);
</script>
diff --git a/templates/packages/differences.html b/templates/packages/differences.html
index 6c06ae25..33455d26 100644
--- a/templates/packages/differences.html
+++ b/templates/packages/differences.html
@@ -58,8 +58,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('.results').tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]]});
diff --git a/templates/packages/groups.html b/templates/packages/groups.html
index 87316a34..dad8665d 100644
--- a/templates/packages/groups.html
+++ b/templates/packages/groups.html
@@ -28,7 +28,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra'], sortList: [[1,0], [0,0]]});
diff --git a/templates/packages/opensearch.xml b/templates/packages/opensearch.xml
index 711b36a2..216be3e9 100644
--- a/templates/packages/opensearch.xml
+++ b/templates/packages/opensearch.xml
@@ -3,7 +3,7 @@
<ShortName>Arch Linux Packages</ShortName>
<Description>Search the Arch Linux package repositories.</Description>
<Tags>linux archlinux package software</Tags>
- <Image height="16" width="16" type="image/x-icon">{{domain}}/media/favicon.ico</Image>
+ <Image height="16" width="16" type="image/x-icon">{{domain}}/static/favicon.ico</Image>
<Language>en-us</Language>
<InputEncoding>UTF-8</InputEncoding>
<OutputEncoding>UTF-8</OutputEncoding>
diff --git a/templates/packages/packages_list.html b/templates/packages/packages_list.html
index 942e1073..599ddcb9 100644
--- a/templates/packages/packages_list.html
+++ b/templates/packages/packages_list.html
@@ -40,7 +40,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra'], sortList: [[2,0]]});
diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html
index b032e656..26fd88dd 100644
--- a/templates/packages/signoffs.html
+++ b/templates/packages/signoffs.html
@@ -79,8 +79,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a.signoff-link').click(signoff_package);
diff --git a/templates/packages/stale_relations.html b/templates/packages/stale_relations.html
index d51f7e44..0186d08e 100644
--- a/templates/packages/stale_relations.html
+++ b/templates/packages/stale_relations.html
@@ -106,8 +106,8 @@
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('#inactive-user:not(:has(tbody tr.empty))').tablesorter({widgets: ['zebra'], headers: { 0: { sorter: false } }, sortList: [[3,0]]});
diff --git a/templates/releng/iso_overview.html b/templates/releng/iso_overview.html
index 8280f100..5a4445b7 100644
--- a/templates/releng/iso_overview.html
+++ b/templates/releng/iso_overview.html
@@ -30,8 +30,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results:not(:has(tbody tr.empty))").tablesorter({widgets: ['zebra']});
diff --git a/templates/releng/result_list.html b/templates/releng/result_list.html
index 845d330d..512e1bf3 100644
--- a/templates/releng/result_list.html
+++ b/templates/releng/result_list.html
@@ -33,8 +33,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results:not(:has(tbody tr.empty))").tablesorter({widgets: ['zebra']});
diff --git a/templates/todolists/list.html b/templates/todolists/list.html
index 7d229271..b829a12b 100644
--- a/templates/todolists/list.html
+++ b/templates/todolists/list.html
@@ -43,7 +43,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
// I'm not sure why it didn't autodetect digit, but it has to be explicit
diff --git a/templates/todolists/public_list.html b/templates/todolists/public_list.html
index c3054863..b1d0453b 100644
--- a/templates/todolists/public_list.html
+++ b/templates/todolists/public_list.html
@@ -65,11 +65,11 @@
</div>
{% endif %}
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$(".results").tablesorter({widgets: ['zebra'], sortList: [[0,0], [1,0]]});
});
-
</script>
{% endblock %}
diff --git a/templates/todolists/view.html b/templates/todolists/view.html
index c9ea919a..6516f73e 100644
--- a/templates/todolists/view.html
+++ b/templates/todolists/view.html
@@ -59,8 +59,8 @@
</table>
</div>
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/jquery.tablesorter.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}jquery.tablesorter.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
<script type="text/javascript">
$(document).ready(function() {
$('a.status-link').click(todolist_flag);
diff --git a/templates/visualize/index.html b/templates/visualize/index.html
index b9459318..160ff92e 100644
--- a/templates/visualize/index.html
+++ b/templates/visualize/index.html
@@ -30,11 +30,11 @@
</div>
{% endcomment %}
{% load cdn %}{% jquery %}
-<script type="text/javascript" src="/media/d3.min.js"></script>
-<script type="text/javascript" src="/media/d3.geom.min.js"></script>
-<script type="text/javascript" src="/media/d3.layout.min.js"></script>
-<script type="text/javascript" src="/media/archweb.js"></script>
-<script type="text/javascript" src="/media/visualize.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}d3.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}d3.geom.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}d3.layout.min.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}archweb.js"></script>
+<script type="text/javascript" src="{{ STATIC_URL }}visualize.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var orderings = {