diff options
author | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-10-26 11:22:21 -0400 |
---|---|---|
committer | Luke Shumaker <LukeShu@sbcglobal.net> | 2012-10-26 11:22:21 -0400 |
commit | da2751757bc8b6638b6dd6af35d961f05957a105 (patch) | |
tree | 4027323ffeef1682067aaf4ade4486a66dde9ced | |
parent | 817313b03d6990e419e6c922e12572ea71666c9c (diff) |
mirror changes from commit '943ef2e8e4'
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | main/templatetags/cdn.py | 3 | ||||
-rw-r--r-- | public/static/logos/archlinux-logo-black-1200dpi.png (renamed from media/logos/archlinux-logo-black-1200dpi.png) | bin | 283011 -> 283011 bytes | |||
-rw-r--r-- | public/static/logos/archlinux-logo-black-90dpi.png (renamed from media/logos/archlinux-logo-black-90dpi.png) | bin | 12971 -> 12971 bytes | |||
-rw-r--r-- | public/static/logos/archlinux-logo-black-scalable.svg (renamed from media/logos/archlinux-logo-black-scalable.svg) | 0 | ||||
-rw-r--r-- | public/static/logos/archlinux-logo-dark-1200dpi.png (renamed from media/logos/archlinux-logo-dark-1200dpi.png) | bin | 291912 -> 291912 bytes | |||
-rw-r--r-- | public/static/logos/archlinux-logo-dark-90dpi.png (renamed from media/logos/archlinux-logo-dark-90dpi.png) | bin | 13805 -> 13805 bytes | |||
-rw-r--r-- | public/static/logos/archlinux-logo-dark-scalable.svg (renamed from media/logos/archlinux-logo-dark-scalable.svg) | 0 | ||||
-rw-r--r-- | public/static/logos/archlinux-logo-light-1200dpi.png (renamed from media/logos/archlinux-logo-light-1200dpi.png) | bin | 284099 -> 284099 bytes | |||
-rw-r--r-- | public/static/logos/archlinux-logo-light-90dpi.png (renamed from media/logos/archlinux-logo-light-90dpi.png) | bin | 13084 -> 13084 bytes | |||
-rw-r--r-- | public/static/logos/archlinux-logo-light-scalable.svg (renamed from media/logos/archlinux-logo-light-scalable.svg) | 0 | ||||
-rw-r--r-- | public/static/logos/archlinux-logo-only.svg (renamed from media/logos/archlinux-logo-only.svg) | 0 | ||||
-rw-r--r-- | public/static/logos/archlinux-logo-white-1200dpi.png (renamed from media/logos/archlinux-logo-white-1200dpi.png) | bin | 263771 -> 263771 bytes | |||
-rw-r--r-- | public/static/logos/archlinux-logo-white-90dpi.png (renamed from media/logos/archlinux-logo-white-90dpi.png) | bin | 11870 -> 11870 bytes | |||
-rw-r--r-- | public/static/logos/archlinux-logo-white-scalable.svg (renamed from media/logos/archlinux-logo-white-scalable.svg) | 0 | ||||
-rw-r--r-- | settings.py | 23 | ||||
-rw-r--r-- | sitestatic/CP_EN_BK_S_001.gif (renamed from media/CP_EN_BK_S_001.gif) | bin | 3036 -> 3036 bytes | |||
-rw-r--r-- | sitestatic/Makefile | 9 | ||||
-rw-r--r-- | sitestatic/airvm_button.png (renamed from media/airvm_button.png) | bin | 4931 -> 4931 bytes | |||
-rw-r--r-- | sitestatic/archnavbar/archlogo.gif (renamed from media/archnavbar/archlogo.gif) | bin | 1845 -> 1845 bytes | |||
-rw-r--r-- | sitestatic/archnavbar/archlogo.png (renamed from media/archnavbar/archlogo.png) | bin | 4192 -> 4192 bytes | |||
-rw-r--r-- | sitestatic/archnavbar/archnavbar.css (renamed from media/archnavbar/archnavbar.css) | 0 | ||||
-rw-r--r-- | sitestatic/archnavbar/parabolabw.png (renamed from media/archnavbar/parabolabw.png) | bin | 6595 -> 6595 bytes | |||
-rw-r--r-- | sitestatic/archweb-print.css (renamed from media/archweb-print.css) | 0 | ||||
-rw-r--r-- | sitestatic/archweb.css (renamed from media/archweb.css) | 0 | ||||
-rw-r--r-- | sitestatic/archweb.js (renamed from media/archweb.js) | 0 | ||||
-rw-r--r-- | sitestatic/asc.gif (renamed from media/asc.gif) | bin | 54 -> 54 bytes | |||
-rw-r--r-- | sitestatic/desc.gif (renamed from media/desc.gif) | bin | 54 -> 54 bytes | |||
-rw-r--r-- | sitestatic/favicon.ico (renamed from media/favicon.ico) | bin | 1150 -> 1150 bytes | |||
-rw-r--r-- | sitestatic/jquery-1.4.4.js (renamed from media/jquery-1.4.4.js) | 0 | ||||
-rw-r--r-- | sitestatic/jquery-1.4.4.min.js (renamed from media/jquery-1.4.4.min.js) | 0 | ||||
-rw-r--r-- | sitestatic/jquery.tablesorter.js (renamed from media/jquery.tablesorter.js) | 0 | ||||
-rw-r--r-- | sitestatic/jquery.tablesorter.min.js (renamed from media/jquery.tablesorter.min.js) | 0 | ||||
-rw-r--r-- | sitestatic/js.mk | 4 | ||||
-rw-r--r-- | sitestatic/logos/apple-touch-icon-114x114.png (renamed from media/logos/apple-touch-icon-114x114.png) | bin | 3240 -> 3240 bytes | |||
-rw-r--r-- | sitestatic/logos/apple-touch-icon-57x57.png (renamed from media/logos/apple-touch-icon-57x57.png) | bin | 1638 -> 1638 bytes | |||
-rw-r--r-- | sitestatic/logos/apple-touch-icon-72x72.png (renamed from media/logos/apple-touch-icon-72x72.png) | bin | 2076 -> 2076 bytes | |||
-rw-r--r-- | sitestatic/new.png (renamed from media/new.png) | bin | 378 -> 378 bytes | |||
-rw-r--r-- | sitestatic/nosort.gif (renamed from media/nosort.gif) | bin | 64 -> 64 bytes | |||
-rw-r--r-- | sitestatic/rss.png (renamed from media/rss.png) | bin | 725 -> 725 bytes | |||
-rw-r--r-- | sitestatic/sevenl_button.png (renamed from media/sevenl_button.png) | bin | 6840 -> 6840 bytes | |||
-rw-r--r-- | sitestatic/vnet_button.png (renamed from media/vnet_button.png) | bin | 4908 -> 4908 bytes | |||
-rw-r--r-- | templates/base.html | 8 | ||||
-rw-r--r-- | templates/devel/clock.html | 4 | ||||
-rw-r--r-- | templates/devel/packages.html | 4 | ||||
-rw-r--r-- | templates/mirrors/mirror_details.html | 4 | ||||
-rw-r--r-- | templates/mirrors/mirrors.html | 3 | ||||
-rw-r--r-- | templates/mirrors/status.html | 4 | ||||
-rw-r--r-- | templates/news/add.html | 2 | ||||
-rw-r--r-- | templates/packages/details.html | 2 | ||||
-rw-r--r-- | templates/packages/differences.html | 4 | ||||
-rw-r--r-- | templates/packages/groups.html | 3 | ||||
-rw-r--r-- | templates/packages/opensearch.xml | 2 | ||||
-rw-r--r-- | templates/packages/packages_list.html | 3 | ||||
-rw-r--r-- | templates/packages/signoffs.html | 4 | ||||
-rw-r--r-- | templates/packages/stale_relations.html | 4 | ||||
-rw-r--r-- | templates/releng/iso_overview.html | 4 | ||||
-rw-r--r-- | templates/releng/result_list.html | 4 | ||||
-rw-r--r-- | templates/todolists/list.html | 3 | ||||
-rw-r--r-- | templates/todolists/public_list.html | 3 | ||||
-rw-r--r-- | templates/todolists/view.html | 4 | ||||
-rw-r--r-- | templates/visualize/index.html | 10 | ||||
-rw-r--r-- | visualize/static/.gitignore (renamed from media/.gitignore) | 0 | ||||
-rw-r--r-- | visualize/static/Makefile (renamed from media/Makefile) | 11 | ||||
-rw-r--r-- | visualize/static/d3.geom.js (renamed from media/d3.geom.js) | 0 | ||||
-rw-r--r-- | visualize/static/d3.geom.min.js (renamed from media/d3.geom.min.js) | 0 | ||||
-rw-r--r-- | visualize/static/d3.js (renamed from media/d3.js) | 0 | ||||
-rw-r--r-- | visualize/static/d3.layout.js (renamed from media/d3.layout.js) | 0 | ||||
-rw-r--r-- | visualize/static/d3.layout.min.js (renamed from media/d3.layout.min.js) | 0 | ||||
-rw-r--r-- | visualize/static/d3.min.js (renamed from media/d3.min.js) | 0 | ||||
-rw-r--r-- | visualize/static/visualize.js (renamed from media/visualize.js) | 0 |
71 files changed, 76 insertions, 54 deletions
@@ -6,6 +6,7 @@ local_settings.py archweb.db archweb.db-* +collected_static/ testing/ repos/ lib/ diff --git a/main/templatetags/cdn.py b/main/templatetags/cdn.py index 5cb12fcf..b91553ed 100644 --- a/main/templatetags/cdn.py +++ b/main/templatetags/cdn.py @@ -11,7 +11,8 @@ def jquery(): link = 'https://ajax.googleapis.com/ajax/libs/jquery/' \ '%s/jquery.min.js' % version else: - link = '/media/jquery-%s.min.js' % version + static_url = getattr(settings, 'STATIC_URL', '/static/') + link = '%sjquery-%s.min.js' % (static_url, version) return '<script type="text/javascript" src="%s"></script>' % link @register.tag diff --git a/media/logos/archlinux-logo-black-1200dpi.png b/public/static/logos/archlinux-logo-black-1200dpi.png Binary files differindex a3082c39..a3082c39 100644 --- a/media/logos/archlinux-logo-black-1200dpi.png +++ b/public/static/logos/archlinux-logo-black-1200dpi.png diff --git a/media/logos/archlinux-logo-black-90dpi.png b/public/static/logos/archlinux-logo-black-90dpi.png Binary files differindex 6948b795..6948b795 100644 --- a/media/logos/archlinux-logo-black-90dpi.png +++ b/public/static/logos/archlinux-logo-black-90dpi.png diff --git a/media/logos/archlinux-logo-black-scalable.svg b/public/static/logos/archlinux-logo-black-scalable.svg index 10d6c4af..10d6c4af 100644 --- a/media/logos/archlinux-logo-black-scalable.svg +++ b/public/static/logos/archlinux-logo-black-scalable.svg diff --git a/media/logos/archlinux-logo-dark-1200dpi.png b/public/static/logos/archlinux-logo-dark-1200dpi.png Binary files differindex 24a5cefa..24a5cefa 100644 --- a/media/logos/archlinux-logo-dark-1200dpi.png +++ b/public/static/logos/archlinux-logo-dark-1200dpi.png diff --git a/media/logos/archlinux-logo-dark-90dpi.png b/public/static/logos/archlinux-logo-dark-90dpi.png Binary files differindex f3757c61..f3757c61 100644 --- a/media/logos/archlinux-logo-dark-90dpi.png +++ b/public/static/logos/archlinux-logo-dark-90dpi.png diff --git a/media/logos/archlinux-logo-dark-scalable.svg b/public/static/logos/archlinux-logo-dark-scalable.svg index 5a80cc4d..5a80cc4d 100644 --- a/media/logos/archlinux-logo-dark-scalable.svg +++ b/public/static/logos/archlinux-logo-dark-scalable.svg diff --git a/media/logos/archlinux-logo-light-1200dpi.png b/public/static/logos/archlinux-logo-light-1200dpi.png Binary files differindex 79e0a0f1..79e0a0f1 100644 --- a/media/logos/archlinux-logo-light-1200dpi.png +++ b/public/static/logos/archlinux-logo-light-1200dpi.png diff --git a/media/logos/archlinux-logo-light-90dpi.png b/public/static/logos/archlinux-logo-light-90dpi.png Binary files differindex 95803309..95803309 100644 --- a/media/logos/archlinux-logo-light-90dpi.png +++ b/public/static/logos/archlinux-logo-light-90dpi.png diff --git a/media/logos/archlinux-logo-light-scalable.svg b/public/static/logos/archlinux-logo-light-scalable.svg index 5fd0716f..5fd0716f 100644 --- a/media/logos/archlinux-logo-light-scalable.svg +++ b/public/static/logos/archlinux-logo-light-scalable.svg diff --git a/media/logos/archlinux-logo-only.svg b/public/static/logos/archlinux-logo-only.svg index 09be94a7..09be94a7 100644 --- a/media/logos/archlinux-logo-only.svg +++ b/public/static/logos/archlinux-logo-only.svg diff --git a/media/logos/archlinux-logo-white-1200dpi.png b/public/static/logos/archlinux-logo-white-1200dpi.png Binary files differindex 50e700cf..50e700cf 100644 --- a/media/logos/archlinux-logo-white-1200dpi.png +++ b/public/static/logos/archlinux-logo-white-1200dpi.png diff --git a/media/logos/archlinux-logo-white-90dpi.png b/public/static/logos/archlinux-logo-white-90dpi.png Binary files differindex 86679601..86679601 100644 --- a/media/logos/archlinux-logo-white-90dpi.png +++ b/public/static/logos/archlinux-logo-white-90dpi.png diff --git a/media/logos/archlinux-logo-white-scalable.svg b/public/static/logos/archlinux-logo-white-scalable.svg index 70eb2dfe..70eb2dfe 100644 --- a/media/logos/archlinux-logo-white-scalable.svg +++ b/public/static/logos/archlinux-logo-white-scalable.svg diff --git a/settings.py b/settings.py index ed12bbec..362c100b 100644 --- a/settings.py +++ b/settings.py @@ -34,11 +34,6 @@ SITE_ID = 1 DATE_FORMAT = 'Y-m-d' DATETIME_FORMAT = 'Y-m-d H:i' -# URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a -# trailing slash. -# Examples: "http://foo.com/media/", "/media/". -ADMIN_MEDIA_PREFIX = '/media/admin_media/' - # Login URL configuration LOGIN_URL = '/login/' LOGIN_REDIRECT_URL = '/' @@ -52,6 +47,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.debug', 'django.core.context_processors.i18n', 'django.core.context_processors.media', + 'django.core.context_processors.static', 'django.contrib.messages.context_processors.messages', 'main.context_processors.secure', ) @@ -84,6 +80,17 @@ MIDDLEWARE_CLASSES = ( ROOT_URLCONF = 'urls' +# URL to serve static files +STATIC_URL = '/static/' + +# Location to collect static files +STATIC_ROOT = os.path.join(DEPLOY_PATH, 'collected_static') + +# Look for more static files in these locations +STATICFILES_DIRS = ( + os.path.join(DEPLOY_PATH, 'sitestatic'), +) + # Configure where messages should reside MESSAGE_STORAGE = 'django.contrib.messages.storage.session.SessionStorage' @@ -100,14 +107,16 @@ INSTALLED_APPS = ( 'django.contrib.sitemaps', 'django.contrib.admin', 'django.contrib.markup', - 'main', # contains shared models and libs + 'django.contrib.staticfiles', + 'south', + + 'main', 'mirrors', 'news', 'packages', 'todolists', 'devel', 'public', - 'south', # database migration support 'releng', ) diff --git a/media/CP_EN_BK_S_001.gif b/sitestatic/CP_EN_BK_S_001.gif Binary files differindex 41cf0885..41cf0885 100644 --- a/media/CP_EN_BK_S_001.gif +++ b/sitestatic/CP_EN_BK_S_001.gif diff --git a/sitestatic/Makefile b/sitestatic/Makefile new file mode 100644 index 00000000..faba27d9 --- /dev/null +++ b/sitestatic/Makefile @@ -0,0 +1,9 @@ +jqueryversion=1.4.4 + +all: jquery-$(jqueryversion).min.js jquery.tablesorter.min.js + +jquery-$(jqueryversion).js: + wget http://code.jquery.com/$@ + +include js.mk +.SECONDARY: diff --git a/media/airvm_button.png b/sitestatic/airvm_button.png Binary files differindex 0acadc9c..0acadc9c 100644 --- a/media/airvm_button.png +++ b/sitestatic/airvm_button.png diff --git a/media/archnavbar/archlogo.gif b/sitestatic/archnavbar/archlogo.gif Binary files differindex e1852a06..e1852a06 100644 --- a/media/archnavbar/archlogo.gif +++ b/sitestatic/archnavbar/archlogo.gif diff --git a/media/archnavbar/archlogo.png b/sitestatic/archnavbar/archlogo.png Binary files differindex e873e94b..e873e94b 100644 --- a/media/archnavbar/archlogo.png +++ b/sitestatic/archnavbar/archlogo.png diff --git a/media/archnavbar/archnavbar.css b/sitestatic/archnavbar/archnavbar.css index f83b8544..f83b8544 100644 --- a/media/archnavbar/archnavbar.css +++ b/sitestatic/archnavbar/archnavbar.css diff --git a/media/archnavbar/parabolabw.png b/sitestatic/archnavbar/parabolabw.png Binary files differindex 0e16d33f..0e16d33f 100644 --- a/media/archnavbar/parabolabw.png +++ b/sitestatic/archnavbar/parabolabw.png diff --git a/media/archweb-print.css b/sitestatic/archweb-print.css index 2946de54..2946de54 100644 --- a/media/archweb-print.css +++ b/sitestatic/archweb-print.css diff --git a/media/archweb.css b/sitestatic/archweb.css index 2cba2864..2cba2864 100644 --- a/media/archweb.css +++ b/sitestatic/archweb.css diff --git a/media/archweb.js b/sitestatic/archweb.js index 7b8230a4..7b8230a4 100644 --- a/media/archweb.js +++ b/sitestatic/archweb.js diff --git a/media/asc.gif b/sitestatic/asc.gif Binary files differindex 74157867..74157867 100644 --- a/media/asc.gif +++ b/sitestatic/asc.gif diff --git a/media/desc.gif b/sitestatic/desc.gif Binary files differindex 3b30b3c5..3b30b3c5 100644 --- a/media/desc.gif +++ b/sitestatic/desc.gif diff --git a/media/favicon.ico b/sitestatic/favicon.ico Binary files differindex 3e43f9bd..3e43f9bd 100644 --- a/media/favicon.ico +++ b/sitestatic/favicon.ico diff --git a/media/jquery-1.4.4.js b/sitestatic/jquery-1.4.4.js index a4f11458..a4f11458 100644 --- a/media/jquery-1.4.4.js +++ b/sitestatic/jquery-1.4.4.js diff --git a/media/jquery-1.4.4.min.js b/sitestatic/jquery-1.4.4.min.js index a4f11458..a4f11458 100644 --- a/media/jquery-1.4.4.min.js +++ b/sitestatic/jquery-1.4.4.min.js diff --git a/media/jquery.tablesorter.js b/sitestatic/jquery.tablesorter.js index 331b7617..331b7617 100644 --- a/media/jquery.tablesorter.js +++ b/sitestatic/jquery.tablesorter.js diff --git a/media/jquery.tablesorter.min.js b/sitestatic/jquery.tablesorter.min.js index 331b7617..331b7617 100644 --- a/media/jquery.tablesorter.min.js +++ b/sitestatic/jquery.tablesorter.min.js diff --git a/sitestatic/js.mk b/sitestatic/js.mk new file mode 100644 index 00000000..7a8783ce --- /dev/null +++ b/sitestatic/js.mk @@ -0,0 +1,4 @@ +closurecompiler=compiler() { cp "$$1" "$${1%.js}.min.js"; }; compiler + +%.min.js: %.js + $(closurecompiler) '$<' diff --git a/media/logos/apple-touch-icon-114x114.png b/sitestatic/logos/apple-touch-icon-114x114.png Binary files differindex e6365ee2..e6365ee2 100644 --- a/media/logos/apple-touch-icon-114x114.png +++ b/sitestatic/logos/apple-touch-icon-114x114.png diff --git a/media/logos/apple-touch-icon-57x57.png b/sitestatic/logos/apple-touch-icon-57x57.png Binary files differindex d2d78262..d2d78262 100644 --- a/media/logos/apple-touch-icon-57x57.png +++ b/sitestatic/logos/apple-touch-icon-57x57.png diff --git a/media/logos/apple-touch-icon-72x72.png b/sitestatic/logos/apple-touch-icon-72x72.png Binary files differindex 170656e0..170656e0 100644 --- a/media/logos/apple-touch-icon-72x72.png +++ b/sitestatic/logos/apple-touch-icon-72x72.png diff --git a/media/new.png b/sitestatic/new.png Binary files differindex 6a9bf037..6a9bf037 100644 --- a/media/new.png +++ b/sitestatic/new.png diff --git a/media/nosort.gif b/sitestatic/nosort.gif Binary files differindex fac668fc..fac668fc 100644 --- a/media/nosort.gif +++ b/sitestatic/nosort.gif diff --git a/media/rss.png b/sitestatic/rss.png Binary files differindex c9164592..c9164592 100644 --- a/media/rss.png +++ b/sitestatic/rss.png diff --git a/media/sevenl_button.png b/sitestatic/sevenl_button.png Binary files differindex 93adcdf0..93adcdf0 100644 --- a/media/sevenl_button.png +++ b/sitestatic/sevenl_button.png diff --git a/media/vnet_button.png b/sitestatic/vnet_button.png Binary files differindex 22cfa9e4..22cfa9e4 100644 --- a/media/vnet_button.png +++ b/sitestatic/vnet_button.png diff --git a/templates/base.html b/templates/base.html index cf65ce8e..f5e8609a 100644 --- a/templates/base.html +++ b/templates/base.html @@ -3,10 +3,10 @@ <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="/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="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="search" type="application/opensearchdescription+xml" href="{% url opensearch-packages as osp %}{{ osp }}" title="Parabola Packages" /> {% block head %}{% endblock %} </head> diff --git a/templates/devel/clock.html b/templates/devel/clock.html index 2eafd529..9fcae41b 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 }}media/archweb.js"></script> <script type="text/javascript"> $(document).ready(function() { $("#clocks-table:has(tbody tr)").tablesorter( diff --git a/templates/devel/packages.html b/templates/devel/packages.html index bd126593..e0865fee 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 0f071b8c..dd0f87f5 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 c9ab46db..e4e208e9 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 f315f7c3..e0e2ac86 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 fd75253c..9e95072b 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 d0e60ab2..db6d3ebb 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -228,7 +228,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 0412f8c2..4931973c 100644 --- a/templates/packages/differences.html +++ b/templates/packages/differences.html @@ -87,8 +87,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 941ec8de..20752398 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 e54507ee..971266b0 100644 --- a/templates/packages/opensearch.xml +++ b/templates/packages/opensearch.xml @@ -3,7 +3,7 @@ <ShortName>Parabola Packages</ShortName> <Description>Search the Parabola package repositories.</Description> <Tags>gnu linuxlibre parabola 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 ed376705..1b894c8e 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 c24774a9..d7c0fef6 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 6cff8d3d..3e635f56 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 38d491d9..2e24fe9f 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 fcb77c65..e9dd3882 100644 --- a/templates/todolists/public_list.html +++ b/templates/todolists/public_list.html @@ -65,7 +65,8 @@ </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]]}); diff --git a/templates/todolists/view.html b/templates/todolists/view.html index d48c362d..20b4e436 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -57,8 +57,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 1854eb58..9b39a039 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 = { diff --git a/media/.gitignore b/visualize/static/.gitignore index f747f163..f747f163 100644 --- a/media/.gitignore +++ b/visualize/static/.gitignore diff --git a/media/Makefile b/visualize/static/Makefile index 7c3ca10b..f68ecc4b 100644 --- a/media/Makefile +++ b/visualize/static/Makefile @@ -1,16 +1,9 @@ d3version=2.6.1 -jqueryversion=1.4.4 # Force creating the d3 directory before we even evaluate how to make d3.js -all: .d3/d3-$(d3version) jquery-$(jqueryversion).min.js jquery.tablesorter.min.js +all: .d3/d3-$(d3version) $(MAKE) d3.min.js d3.layout.min.js d3.geom.min.js -%.min.js: %.js - $(closurecompiler) '$<' - -jquery-$(jqueryversion).js: - wget http://code.jquery.com/$@ - d3.%: .d3/d3-$(d3version)/d3.% .d3/d3-$(d3version)/LICENSE Makefile echo '/* $@ - Data Driven Documents' > $@ echo ' * Version: $(d3version)' >> $@ @@ -34,5 +27,5 @@ d3.%: .d3/d3-$(d3version)/d3.% .d3/d3-$(d3version)/LICENSE Makefile cp -r $</*/ $@ rm $@/*.min.js +include ../../sitestatic/js.mk .SECONDARY: -closurecompiler=compiler() { cp "$$1" "$${1%.js}.min.js"; }; compiler diff --git a/media/d3.geom.js b/visualize/static/d3.geom.js index ca1c13e1..ca1c13e1 100644 --- a/media/d3.geom.js +++ b/visualize/static/d3.geom.js diff --git a/media/d3.geom.min.js b/visualize/static/d3.geom.min.js index ca1c13e1..ca1c13e1 100644 --- a/media/d3.geom.min.js +++ b/visualize/static/d3.geom.min.js diff --git a/media/d3.js b/visualize/static/d3.js index 1f078070..1f078070 100644 --- a/media/d3.js +++ b/visualize/static/d3.js diff --git a/media/d3.layout.js b/visualize/static/d3.layout.js index d899e1b3..d899e1b3 100644 --- a/media/d3.layout.js +++ b/visualize/static/d3.layout.js diff --git a/media/d3.layout.min.js b/visualize/static/d3.layout.min.js index d899e1b3..d899e1b3 100644 --- a/media/d3.layout.min.js +++ b/visualize/static/d3.layout.min.js diff --git a/media/d3.min.js b/visualize/static/d3.min.js index 1f078070..1f078070 100644 --- a/media/d3.min.js +++ b/visualize/static/d3.min.js diff --git a/media/visualize.js b/visualize/static/visualize.js index bd7b6679..bd7b6679 100644 --- a/media/visualize.js +++ b/visualize/static/visualize.js |