diff options
82 files changed, 660 insertions, 181 deletions
diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..87eddd8d --- /dev/null +++ b/Makefile @@ -0,0 +1,138 @@ +# The idea here is to be able to re-generate the exact Javascript +# files as they exist in git. This means munging whitespace in weird +# ways, using specific versions of various JS minimizers... + +# Where are we? +dl-cache = ../download-cache +www = $(dl-cache)/www +bin = $(dl-cache)/bin + +# What versions of 3rd party libraries are we using? +jquery-ver=1.8.3 +bootstrap-ver=2.1.1 +tablesorter-ver=2.7 +d3-ver=3.0.6 +konami-ver=c0f686e647765860ff4d2fcb7b48122785432b75 + +targets = \ + sitestatic/rss.png \ + sitestatic/rss@2x.png \ + sitestatic/bootstrap-typeahead.js \ + sitestatic/homepage.js \ + sitestatic/jquery-$(jquery-ver).min.js \ + sitestatic/jquery.tablesorter-$(tablesorter-ver).js \ + sitestatic/jquery.tablesorter-$(tablesorter-ver).min.js \ + sitestatic/konami.min.js \ + visualize/static/d3-$(d3-ver).js \ + visualize/static/d3-$(d3-ver).min.js + + +# The base rules + +all: $(targets) +.PHONY: all + +js-basenames = $(sort $(patsubst %.min,%,$(patsubst %.js,%,$(filter %.js,$(targets))))) +generated = $(sort $(targets) $(foreach f,$(js-basenames),$f.js $f.min.js)) +clean: + rm -f -- $(generated) +.PHONY: clean + +# Make directories +$(dl-cache) $(bin): + mkdir -p '$@' + +# Don't have non-minimized .js stick around unless we asked for them. +.INTERMEDIATE: $(filter-out $(targets),$(generated)) + +# Turn on sane error handling +.DELETE_ON_ERROR: + + +# How to download files + + mangle = $(subst %,^25,$(subst :,^3A,$(subst =,^3D,$(subst ^,^5E,$1)))) +unmangle = $(subst ^5E,^,$(subst ^3D,=,$(subst ^3A,:,$(subst ^25,%,$1)))) + +$(www)/http/%: + mkdir -p '$(@D)' + wget 'http://$(call unmangle,$*)' -O '$@' + test -f '$@' && touch '$@' + +$(www)/https/%: + mkdir -p '$(@D)' + wget 'https://$(call unmangle,$*)' -O '$@' + test -f '$@' && touch '$@' + +$(www)/git/%: + mkdir -p '$(@D)' + gitget checkout 'git://$(call unmangle,$*)' '$@' || { rm -rf -- '$@'; false; } + test -d '$@' && touch '$@' || { rm -rf -- '$@'; false; } + + +# Downloaded images + +$(dl-cache)/unzip/Feedicons_v.2/%: $(www)/https/web.archive.org/web/20120514074507/http^3A//www.zeusboxstudio.com/file_download/1/Feedicons_v.2.zip + mkdir -p '$(@D)' + bsdtar xfO $< 'Feedicons v.2/$*' > '$@' +sitestatic/rss.png: $(dl-cache)/unzip/Feedicons_v.2/RSS_16.png + cp $< $@ +sitestatic/rss@2x.png: $(dl-cache)/unzip/Feedicons_v.2/RSS_32.png + pngcrush $< $@ + +# Non-minimized .js files +sitestatic/bootstrap-typeahead.js: sitestatic/%: $(www)/https/raw.github.com/twitter/bootstrap/v$(bootstrap-ver)/js/% Makefile.d/%.patch + cp $< $@ + patch -i Makefile.d/$*.patch $@ +sitestatic/jquery-$(jquery-ver).js: sitestatic/%: $(www)/http/code.jquery.com/% + cp $< $@ +sitestatic/jquery.tablesorter-$(tablesorter-ver).js: $(www)/https/raw.github.com/Mottie/tablesorter/v$(tablesorter-ver)/js/jquery.tablesorter.js + cp $< $@ +sitestatic/konami.js: sitestatic/%: $(www)/https/raw.github.com/snaptortoise/konami-js/$(konami-ver)/% Makefile.d/%.patch + cp $< $@ + patch -i Makefile.d/$*.patch $@ +sitestatic/homepage.js: sitestatic/bootstrap-typeahead.min.js sitestatic/konami.min.js Makefile.d/homepage.js.in + { \ + cat sitestatic/bootstrap-typeahead.min.js && \ + echo && \ + sed -e 's,^\s*,,' -e 's,^return.*,&;,' sitestatic/konami.min.js && \ + echo && \ + cat Makefile.d/homepage.js.in ; \ + } > $@ +visualize/static/d3-$(d3-ver).js: %: $(www)/https/raw.github.com/mbostock/d3/v$(d3-ver)/d3.js + cp $< $@ + + +# The crazy minimization processes + +# Any of the UglifyJS 1.3.x releases will produce the same output for these inputs +$(bin)/uglifyjs-1.3: $(www)/git/github.com/mishoo/UglifyJS.git\#tag=v1.3.5 | $(bin) + printf '%s\n' '#!/bin/sh' 'exec $</bin/uglifyjs --no-copyright --ascii --max-line-len 0 "$$@"' | install -m755 /dev/stdin '$@' + +# Any of the UglifyJS 2.2.x releases will produce the same output for these inputs +$(dl-cache)/uglifyjs-2.2: $(www)/git/github.com/mishoo/UglifyJS2.git\#tag=v2.2.5 | $(dl-cache) + cp -r $< $@ || { rm -rf -- '$@'; false; } + cd $@ && npm install || { rm -rf -- '$@'; false; } +$(bin)/uglifyjs-2.2: $(dl-cache)/uglifyjs-2.2 | $(bin) + printf '%s\n' '#!/bin/sh' 'exec $</bin/uglifyjs --mangle --compress -- "$$@"' | install -m755 /dev/stdin '$@' + +# Closure compiler 20121212 produces the same output +$(dl-cache)/unzip/compiler-20121212/%: $(www)/https/web.archive.org/web/20151226141014/https^3A//closure-compiler.googlecode.com/files/compiler-20121212.tar.gz + mkdir -p '$(@D)' + bsdtar xfO '$<' '$*' > '$@' +$(bin)/closure-compiler: $(dl-cache)/unzip/compiler-20121212/compiler.jar | $(bin) + printf '%s\n' '#!/bin/sh' 'exec java -jar $< "$$@"' | install -m755 /dev/stdin '$@' + +# Which minimizer to use for each +sitestatic/bootstrap-typeahead.min.js: %.min.js: $(bin)/uglifyjs-1.3 %.js + $^ > $@ +sitestatic/jquery-$(jquery-ver).min.js: sitestatic/%.min.js: sitestatic/%.js Makefile.d/%.min.js.preamble + { cat Makefile.d/$*.min.js.preamble && $(bin)/uglifyjs-1.3 $<; } > $@ +sitestatic/jquery.tablesorter-$(tablesorter-ver).min.js: sitestatic/%.min.js: sitestatic/%.js Makefile.d/%.min.js.preamble $(bin)/closure-compiler + @# The tr/sed is to turn all of the newlines except for the last one into spaces + { cat Makefile.d/$*.min.js.preamble && $(bin)/closure-compiler $< | tr '\n' ' ' | sed 's, $$,\n,'; } > $@ +sitestatic/konami.min.js: %.min.js: $(bin)/uglifyjs-2.2 %.js + @# The sed is to insert newlines and whitespace at the correct places; presumably to match Dan copy/pasting into an editor. + $^ | sed -r -e 's:e\.iphone\.stop_x|s=this\.tap===:\n\t&:g' -e 's,return"string",\n&,' | sed -e 's,;$$,,' -e '$$s,$$,\n,' > $@ +visualize/static/d3-$(d3-ver).min.js: %.min.js: $(bin)/uglifyjs-2.2 %.js + $^ > $@ diff --git a/Makefile.d/bootstrap-typeahead.js.patch b/Makefile.d/bootstrap-typeahead.js.patch new file mode 100644 index 00000000..dfbab80b --- /dev/null +++ b/Makefile.d/bootstrap-typeahead.js.patch @@ -0,0 +1,38 @@ +commit f3e23371fa0473c82c28932e85570d94e5fc232a +Author: Dan McGee <dan@archlinux.org> +Date: Mon Sep 24 20:21:15 2012 -0500 + + Don't auto-select the first item in typeahead + + This assumption was baked into the Twitter bootstrap JS; kill it so it + is still easy to do a freeform search if wanted. + + Signed-off-by: Dan McGee <dan@archlinux.org> + +diff --git a/sitestatic/bootstrap-typeahead.js b/sitestatic/bootstrap-typeahead.js +index c2ccdea..3d355ae 100644 +--- a/sitestatic/bootstrap-typeahead.js ++++ b/sitestatic/bootstrap-typeahead.js +@@ -45,9 +45,11 @@ + + , select: function () { + var val = this.$menu.find('.active').attr('data-value') +- this.$element +- .val(this.updater(val)) +- .change() ++ if (val) { ++ this.$element ++ .val(this.updater(val)) ++ .change() ++ } + return this.hide() + } + +@@ -141,7 +143,6 @@ + return i[0] + }) + +- items.first().addClass('active') + this.$menu.html(items) + return this + } diff --git a/Makefile.d/homepage.js.in b/Makefile.d/homepage.js.in new file mode 100644 index 00000000..2d6f7910 --- /dev/null +++ b/Makefile.d/homepage.js.in @@ -0,0 +1,36 @@ +function setupTypeahead() { + $('#pkgsearch-field').typeahead({ + source: function(query, callback) { + $.getJSON('/opensearch/packages/suggest', {q: query}, function(data) { + callback(data[1]); + }); + }, + matcher: function(item) { return true; }, + sorter: function(items) { return items; }, + menu: '<ul class="pkgsearch-typeahead"></ul>', + items: 10, + updater: function(item) { + $('#pkgsearch-field').val(item); + $('#pkgsearch-form').submit(); + return item; + } + }).attr('autocomplete', 'off'); + $('#pkgsearch-field').keyup(function(e) { + if (e.keyCode === 13 && + $('ul.pkgsearch-typeahead li.active').size() === 0) { + $('#pkgsearch-form').submit(); + } + }); +} + +function setupKonami(image_src) { + var konami = new Konami(function() { + $('#konami').html('<img src="' + image_src + '" alt=""/>'); + setTimeout(function() { + $('#konami').fadeIn(500); + }, 500); + $('#konami').click(function() { + $('#konami').fadeOut(500); + }); + }); +} diff --git a/Makefile.d/jquery-1.8.3.min.js.preamble b/Makefile.d/jquery-1.8.3.min.js.preamble new file mode 100644 index 00000000..ae08a973 --- /dev/null +++ b/Makefile.d/jquery-1.8.3.min.js.preamble @@ -0,0 +1 @@ +/*! jQuery v1.8.3 jquery.com | jquery.org/license */
diff --git a/Makefile.d/jquery.tablesorter-2.7.min.js.preamble b/Makefile.d/jquery.tablesorter-2.7.min.js.preamble new file mode 100644 index 00000000..a6e11689 --- /dev/null +++ b/Makefile.d/jquery.tablesorter-2.7.min.js.preamble @@ -0,0 +1,4 @@ +/*! +* TableSorter 2.7 min - Client-side table sorting with ease! +* Copyright (c) 2007 Christian Bach +*/ diff --git a/Makefile.d/konami.js.patch b/Makefile.d/konami.js.patch new file mode 100644 index 00000000..f6df91c4 --- /dev/null +++ b/Makefile.d/konami.js.patch @@ -0,0 +1,46 @@ +--- ..//web-cache/www/https/raw.github.com/snaptortoise/konami-js/c0f686e647765860ff4d2fcb7b48122785432b75/konami.js 2015-04-14 17:46:09.372597458 -0400 ++++ sitestatic/konami.js 2015-04-14 22:39:28.549281737 -0400 +@@ -56,7 +56,7 @@ + load: function(link){ + this.orig_keys = this.keys; + konami.addEvent(document,"touchmove",function(e){ +- if(e.touches.length == 1 && konami.iphone.capture==true){ ++ if(e.touches.length == 1 && konami.iphone.capture===true){ + var touch = e.touches[0]; + konami.iphone.stop_x = touch.pageX; + konami.iphone.stop_y = touch.pageY; +@@ -66,7 +66,7 @@ + } + }); + konami.addEvent(document,"touchend",function(evt){ +- if (konami.iphone.tap==true) konami.iphone.check_direction(link); ++ if (konami.iphone.tap===true) konami.iphone.check_direction(link); + },false); + konami.addEvent(document,"touchstart", function(evt){ + konami.iphone.start_x = evt.changedTouches[0].pageX +@@ -76,12 +76,12 @@ + }); + }, + check_direction: function(link){ +- x_magnitude = Math.abs(this.start_x-this.stop_x) +- y_magnitude = Math.abs(this.start_y-this.stop_y) +- x = ((this.start_x-this.stop_x) < 0) ? "RIGHT" : "LEFT"; +- y = ((this.start_y-this.stop_y) < 0) ? "DOWN" : "UP"; +- result = (x_magnitude > y_magnitude) ? x : y; +- result = (this.tap==true) ? "TAP" : result; ++ var x_magnitude = Math.abs(this.start_x-this.stop_x) ++ var y_magnitude = Math.abs(this.start_y-this.stop_y) ++ var x = ((this.start_x-this.stop_x) < 0) ? "RIGHT" : "LEFT"; ++ var y = ((this.start_y-this.stop_y) < 0) ? "DOWN" : "UP"; ++ var result = (x_magnitude > y_magnitude) ? x : y; ++ result = (this.tap===true) ? "TAP" : result; + + if (result==this.keys[0]) this.keys = this.keys.slice(1,this.keys.length) + if (this.keys.length==0) { +@@ -99,4 +99,4 @@ + } + + return konami; +-} +\ No newline at end of file ++} diff --git a/README.BRANDING b/README.BRANDING new file mode 100644 index 00000000..2dc186b0 --- /dev/null +++ b/README.BRANDING @@ -0,0 +1,74 @@ +It is now fairly easy to re-brand archweb. +Replacing logos is still a bit of work. +Here is a summary of the text files that need to be changed to +re-brand it, from the text side. + +Files used to configure branding/URL stuff +------------------------------------------ + + * `settings.py` + * `templates/templatetags/jinja2.py` + * `main/templatetags/wiki.py` + * `main/templatetags/bugs.py` + +Files with minor Arch stuff that's just easier to patch +------------------------------------------------------- + +`devel/fixtures/staff_groups.json` + * Mentions of Arch in "description" fields + +`templates/packages/flaghelp.html` + * link to "arch-general" mailing list + +`templates/packages/flag.html` + * link to "arch-general" mailing list + +`templates/packages/removed.html` + * link to AUR + +`templates/packages/search.html` + * link to AUR + +`urls.py` + +Files with a significant amount of Arch-specific content: +--------------------------------------------------------- + +`templates/base.html` + * main navbar + * link to `bbs.archlinux.org` + * link to the AUR + * logged in navbar + * link to "arch-dev" mailing list + * link to `stats.archlinux.org/munin` + * copyright statement is Arch-specific. + +`templates/public/index.html` + * The text in the intro box describes Arch Linux. + * sidebar + * Community + * link to `planet.archlinux.org` + * Support + * link to `schwag.archlinux.ca` + * link to `www.zazzle.com/archlinux*` + * link to `www.freewear.org/?page=list_items&org=Archlinux` + * Development + * link to `projects.archlinux.org` ("Official Arch projects") + * More Resources + * link to wiki article "Arch Linux Press Review" + * Below sidebar + * Arch's donate button + * Arch's sponsors + +`templates/public/feeds.html` + * links to AUR + * links to feeds on `bugs.archlinux.org` + +Files with totally Arch-specific content: +----------------------------------------- + + * `templates/public/about.html` + * `templates/public/art.html` + * `templates/public/donate.html` + * `templates/public/download.html` + * `templates/public/svn.html` diff --git a/archweb.wsgi b/archweb.wsgi index a0d969e7..20ec463e 100644 --- a/archweb.wsgi +++ b/archweb.wsgi @@ -3,10 +3,12 @@ import os import sys import site -base_path = "/srv/http/archweb" +base_path = os.path.dirname(os.path.realpath(__file__)) -site.addsitedir('/srv/http/archweb-env/lib/python2.7/site-packages') -sys.path.insert(0, base_path) +virtualenv_path = os.path.join(base_path, "env") +if os.path.isdir(virtualenv_path): + site.addsitedir(os.path.join(virtualenv_path, 'lib/python2.7/site-packages')) + sys.path.insert(0, base_path) os.environ['DJANGO_SETTINGS_MODULE'] = "settings" diff --git a/devel/forms.py b/devel/forms.py index e2b1a7a2..d953c614 100644 --- a/devel/forms.py +++ b/devel/forms.py @@ -3,6 +3,7 @@ from collections import OrderedDict from string import ascii_letters, digits from django import forms +from django.conf import settings from django.contrib.auth.models import User, Group from django.contrib.sites.models import Site from django.core.mail import send_mail @@ -96,7 +97,7 @@ class NewUserForm(forms.ModelForm): send_mail("Your new archweb account", template.render(ctx), - 'Arch Website Notification <nobody@archlinux.org>', + settings.BRANDING_EMAIL, [user.email], fail_silently=False) diff --git a/devel/management/commands/reporead.py b/devel/management/commands/reporead.py index 6e26710f..7b963c28 100644 --- a/devel/management/commands/reporead.py +++ b/devel/management/commands/reporead.py @@ -107,6 +107,8 @@ class RepoPackage(object): setattr(self, k, long(v[0])) elif k in ('desc', 'pgpsig'): # do NOT prune these values at all + if v[0] == None: + v[0] = 'missing' setattr(self, k, v[0]) elif k == 'version': self.ver, self.rel, self.epoch = parse_version(v[0]) @@ -215,7 +217,10 @@ def populate_pkg(dbpkg, repopkg, force=False, timestamp=None): dbpkg.pkgver = repopkg.ver dbpkg.pkgrel = repopkg.rel dbpkg.epoch = repopkg.epoch - dbpkg.pkgdesc = repopkg.desc + try: + dbpkg.pkgdesc = repopkg.desc + except AttributeError: + dbpkg.pkgdesc = "missing" dbpkg.url = repopkg.url dbpkg.filename = repopkg.filename dbpkg.compressed_size = repopkg.csize diff --git a/devel/management/commands/update_types_permissions.py b/devel/management/commands/update_types_permissions.py index bbe8dc47..ac8fcfa5 100644 --- a/devel/management/commands/update_types_permissions.py +++ b/devel/management/commands/update_types_permissions.py @@ -1,5 +1,5 @@ from django.core.management.base import BaseCommand -from django.db.models import get_models, get_app +from django.apps import apps from django.contrib.auth.management import create_permissions from django.contrib.contenttypes.management import update_contenttypes @@ -10,16 +10,14 @@ class Command(BaseCommand): def handle(self, *args, **options): if not args: - apps = [] - for model in get_models(): - apps.append(get_app(model._meta.app_label)) + app_configs = apps.get_app_configs() else: - apps = [] + app_configs = [] for arg in args: - apps.append(get_app(arg)) + apps.append(apps.get_app_config(arg)) - for app in apps: - update_contenttypes(app, None, options.get('verbosity', 2), interactive=True) - create_permissions(app, get_models(), options.get('verbosity', 0)) + for app_config in app_configs: + update_contenttypes(app_config, options.get('verbosity', 2)) + create_permissions(app_config, options.get('verbosity', 22)) # vim: set ts=4 sw=4 et: diff --git a/devel/utils.py b/devel/utils.py index bd57def9..3326987a 100644 --- a/devel/utils.py +++ b/devel/utils.py @@ -1,5 +1,6 @@ import re +from django.conf import settings from django.contrib.auth.models import User from django.core.exceptions import ObjectDoesNotExist, MultipleObjectsReturned from django.db import connection @@ -78,9 +79,8 @@ class UserFinder(object): if email and '@' in email: # split email addr at '@' symbol, ensure domain matches # or is a subdomain of archlinux.org - # TODO: configurable domain/regex somewhere? username, domain = email.split('@', 1) - if re.match(r'^(.+\.)?archlinux.org$', domain): + if re.match(settings.DOMAIN_RE, domain): return User.objects.get(username=username) return None @@ -1,6 +1,7 @@ from datetime import datetime, time from pytz import utc +from django.conf import settings from django.contrib.sites.models import Site from django.contrib.syndication.views import Feed from django.db import connection @@ -80,7 +81,7 @@ class PackageFeed(Feed): return obj def title(self, obj): - s = 'Arch Linux: Recent package updates' + s = settings.BRANDING_DISTRONAME+': Recent package updates' if 'repo' in obj and 'arch' in obj: s += ' (%s [%s])' % (obj['arch'].name, obj['repo'].name.lower()) elif 'repo' in obj: @@ -90,7 +91,7 @@ class PackageFeed(Feed): return s def description(self, obj): - s = 'Recently updated packages in the Arch Linux package repositories' + s = 'Recently updated packages in the '+settings.BRANDING_DISTRONAME+' package repositories' if 'arch' in obj: s += ' for the \'%s\' architecture' % obj['arch'].name.lower() if not obj['arch'].agnostic: @@ -136,9 +137,9 @@ def news_last_modified(request, *args, **kwargs): class NewsFeed(Feed): feed_type = FasterRssFeed - title = 'Arch Linux: Recent news updates' + title = settings.BRANDING_DISTRONAME+': Recent news updates' link = '/news/' - description = 'The latest and greatest news from the Arch Linux distribution.' + description = 'The latest and greatest news from the '+settings.BRANDING_DISTRONAME+' distribution.' subtitle = description def __call__(self, request, *args, **kwargs): @@ -175,7 +176,7 @@ class NewsFeed(Feed): class ReleaseFeed(Feed): feed_type = FasterRssFeed - title = 'Arch Linux: Releases' + title = settings.BRANDING_DISTRONAME+': Releases' link = '/download/' description = 'Release ISOs' subtitle = description diff --git a/local_settings.py.example b/local_settings.py.example index ffd6d8a6..44e38459 100644 --- a/local_settings.py.example +++ b/local_settings.py.example @@ -1,7 +1,7 @@ ## Debug settings -DEBUG = False +DEBUG = False # If you are running without another HTTP server, must be true TEMPLATE_DEBUG = False -#DEBUG_TOOLBAR = True +DEBUG_TOOLBAR = False # Must install package django-debug-toolbar to use ## For django debug toolbar INTERNAL_IPS = ('127.0.0.1',) @@ -23,6 +23,20 @@ ADMINS = ( # }, #} +## MySQL Database settings +#DATABASES = { +# 'default': { +# 'ENGINE' : 'django.db.backends.mysql', +# 'NAME' : 'archlinux', +# 'USER' : 'archlinux', +# 'PASSWORD': 'archlinux', +# 'HOST' : '', +# 'PORT' : '', +# # InnoDB WILL NOT work +# 'OPTIONS' : {'init_command': 'SET storage_engine=MyISAM'}, +# }, +#} + ## Sqlite Database settings DATABASES = { 'default': { @@ -45,11 +59,11 @@ CACHES = { ## locally, you will want to use False. SESSION_COOKIE_SECURE = False -## location for saving dev pictures -MEDIA_ROOT = '/srv/example.com/img/' +## location for saving dev pictures (the 'devs' folder should be inside of this) +MEDIA_ROOT = '/srv/http/web-uploads' -## web url for serving image files -MEDIA_URL = '/media/img/' +## web url for serving image files (the 'devs' folder should be inside of this) +MEDIA_URL = '/img/' ## Make this unique, and don't share it with anybody. SECRET_KEY = '00000000000000000000000000000000000000000000000' diff --git a/main/context_processors.py b/main/context_processors.py index a60d4e63..96a45dcf 100644 --- a/main/context_processors.py +++ b/main/context_processors.py @@ -1,4 +1,19 @@ def secure(request): return {'secure': request.is_secure()} +def branding(request): + from django.conf import settings + return { + 'BUGTRACKER_URL': settings.BUGTRACKER_URL, + 'MAILMAN_BASE_URL': settings.MAILMAN_BASE_URL, + 'PROJECTS_URL': settings.PROJECTS_URL, + + 'BRANDING_APPNAME': settings.BRANDING_APPNAME, + 'BRANDING_DISTRONAME': settings.BRANDING_DISTRONAME, + 'BRANDING_SHORTNAME': settings.BRANDING_SHORTNAME, + 'BRANDING_WIKINAME': settings.BRANDING_WIKINAME, + 'BRANDING_EMAIL': settings.BRANDING_EMAIL, + 'BRANDING_OSEARCH_TAGS': settings.BRANDING_OSEARCH_TAGS, + } + # vim: set ts=4 sw=4 et: diff --git a/main/templatetags/bugs.py b/main/templatetags/bugs.py new file mode 100644 index 00000000..b548859a --- /dev/null +++ b/main/templatetags/bugs.py @@ -0,0 +1,6 @@ +from django import template +register = template.Library() + +@register.simple_tag +def bug_link(bugid): + return "<a href=\"https://bugs.archlinux.org/task/{0}\">FS#{0}</a>".format(bugid) diff --git a/main/templatetags/wiki.py b/main/templatetags/wiki.py new file mode 100644 index 00000000..b1b8dd55 --- /dev/null +++ b/main/templatetags/wiki.py @@ -0,0 +1,9 @@ +from django import template +register = template.Library() + +@register.simple_tag +def wiki_url(article=""): + if article == "": + return "https://wiki.archlinux.org/" + else: + return "https://wiki.archlinux.org/index.php/"+article.replace(' ', '_') diff --git a/mirrors/static/mirror_status.js b/mirrors/static/mirror_status.js index 241f5c61..44c81935 100644 --- a/mirrors/static/mirror_status.js +++ b/mirrors/static/mirror_status.js @@ -1,3 +1,23 @@ +/* mirror_status.js + * Homepage: https://projects.archlinux.org/archweb.git/ + * Copyright: 2012-2013 The Archweb Team (Dan McGee) + * License: GPLv2 + * + * This file is part of Archweb. + * + * Archweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Archweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Archweb. If not, see <http://www.gnu.org/licenses/>. + */ + function draw_graphs(location_url, log_url, container_id) { jQuery.when(jQuery.getJSON(location_url), jQuery.getJSON(log_url)) .then(function(loc_data, log_data) { diff --git a/packages/management/commands/signoff_report.py b/packages/management/commands/signoff_report.py index a5022eeb..9724e562 100644 --- a/packages/management/commands/signoff_report.py +++ b/packages/management/commands/signoff_report.py @@ -8,6 +8,7 @@ repository. Usage: ./manage.py signoff_report <email> <repository> """ +from django.conf import settings from django.core.mail import send_mail from django.core.urlresolvers import reverse from django.core.management.base import BaseCommand, CommandError @@ -120,7 +121,7 @@ def generate_report(email, repo_name): 'old_days': old_days, 'leaders': leaders, }) - from_addr = 'Arch Website Notification <nobody@archlinux.org>' + from_addr = settings.BRANDING_EMAIL send_mail(subject, t.render(c), from_addr, [email]) # vim: set ts=4 sw=4 et: diff --git a/packages/urls.py b/packages/urls.py index 4e2e2638..dfe19207 100644 --- a/packages/urls.py +++ b/packages/urls.py @@ -32,10 +32,10 @@ urlpatterns = patterns('packages.views', (r'^(?P<name>[^ /]+)/$', 'details'), - (r'^(?P<repo>[A-z0-9\-]+)/(?P<name>[^ /]+)/$', + (r'^(?P<repo>[A-z0-9~\-]+)/(?P<name>[^ /]+)/$', 'details'), # canonical package url. subviews defined above - (r'^(?P<repo>[A-z0-9\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[^ /]+)/', + (r'^(?P<repo>[A-z0-9~\-]+)/(?P<arch>[A-z0-9]+)/(?P<name>[^ /]+)/', include(package_patterns)), ) diff --git a/packages/views/flag.py b/packages/views/flag.py index 9fe60e2c..5680683a 100644 --- a/packages/views/flag.py +++ b/packages/views/flag.py @@ -124,7 +124,7 @@ def flag(request, name, repo, arch): }) msg = EmailMessage(subject, tmpl.render(ctx), - 'Arch Website Notification <nobody@archlinux.org>', + settings.BRANDING_EMAIL, toemail, headers={"Reply-To": email } ) diff --git a/releng/models.py b/releng/models.py index c1a82589..a4af81ab 100644 --- a/releng/models.py +++ b/releng/models.py @@ -139,11 +139,11 @@ class Release(models.Model): return "iso/%s/" % self.version def iso_url(self): - return "iso/%s/archlinux-%s-dual.iso" % (self.version, self.version) + return "iso/%s/%s-%s-dual.iso" % (self.version, settings.BRANDING_SLUG, self.version) def magnet_uri(self): query = [ - ('dn', "archlinux-%s-dual.iso" % self.version), + ('dn', "%s-%s-dual.iso" % (settings.BRANDING_SLUG, self.version)), ] if settings.TORRENT_TRACKERS: query.extend(('tr', uri) for uri in settings.TORRENT_TRACKERS) diff --git a/releng/views.py b/releng/views.py index 9e7a794e..03ea8a86 100644 --- a/releng/views.py +++ b/releng/views.py @@ -53,7 +53,7 @@ class TestForm(forms.ModelForm): success = forms.BooleanField( help_text="Only check this if everything went fine. " "If you ran into problems please create a ticket on <a " - "href=\"https://bugs.archlinux.org/index.php?project=6\">the " + "href=\""+settings.BUGTRACKER_RELENG_URL+"\">the " "bugtracker</a> (or check that one already exists) and link to " "it in the comments.", required=False) @@ -237,7 +237,7 @@ def release_torrent(request, version): data = b64decode(release.torrent_data.encode('utf-8')) response = HttpResponse(data, content_type='application/x-bittorrent') # TODO: this is duplicated from Release.iso_url() - filename = 'archlinux-%s-dual.iso.torrent' % release.version + filename = '%s-%s-dual.iso.torrent' % (settings.BRANDING_SLUG, release.version) response['Content-Disposition'] = 'attachment; filename=%s' % filename return response diff --git a/settings.py b/settings.py index 4393e693..7571f0fc 100644 --- a/settings.py +++ b/settings.py @@ -51,6 +51,7 @@ TEMPLATE_CONTEXT_PROCESSORS = ( 'django.core.context_processors.debug', 'django.contrib.messages.context_processors.messages', 'main.context_processors.secure', + 'main.context_processors.branding', ) TEMPLATE_DIRS = ( @@ -166,12 +167,34 @@ ISO_LIST_URL = 'https://releng.archlinux.org/isos/' # community bit on the end, repo.svn_root is appended) SVN_BASE_URL = 'svn://svn.archlinux.org/' +# URL for linking to mailing lists +MAILMAN_BASE_URL = 'https://mailman.archlinux.org/' + +# URL for linking to the bugtracker +BUGTRACKER_URL = 'https://bugs.archlinux.org/' + +# URL for linking to the release engineering/iso project on the bugtracker +BUGTRACKER_RELENG_URL = 'https://bugs.archlinux.org/index.php?project=6' + +# URL for linking to projects in git +PROJECTS_URL = 'https://projects.archlinux.org' + # Trackers used for ISO download magnet links TORRENT_TRACKERS = ( 'udp://tracker.archlinux.org:6969', 'http://tracker.archlinux.org:6969/announce', ) +DOMAIN_RE = r'^(.+\.)?archlinux.org$' + +BRANDING_APPNAME = 'archweb' +BRANDING_DISTRONAME = 'Arch Linux' +BRANDING_SHORTNAME = 'Arch' +BRANDING_SLUG = 'archlinux' +BRANDING_WIKINAME = 'ArchWiki' +BRANDING_EMAIL = 'Arch Website Notification <nobody@archlinux.org>' +BRANDING_OSEARCH_TAGS = 'linux archlinux package software' + # Shorten some names just a bit COUNTRIES_OVERRIDE = { 'GB': 'United Kingdom', diff --git a/sitestatic/archweb.js b/sitestatic/archweb.js index 5f6e5e97..dce9cd0c 100644 --- a/sitestatic/archweb.js +++ b/sitestatic/archweb.js @@ -1,3 +1,23 @@ +/* archweb.js + * Homepage: https://projects.archlinux.org/archweb.git/ + * Copyright: 2007-2013 The Archweb Team + * License: GPLv2 + * + * This file is part of Archweb. + * + * Archweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Archweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Archweb. If not, see <http://www.gnu.org/licenses/>. + */ + /*'use strict';*/ /* tablesorter custom parsers for various pages: * devel/index.html, mirrors/status.html, todolists/view.html */ diff --git a/templates/404.html b/templates/404.html index 33271c66..7a667bac 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Page Not Found{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Page Not Found{% endblock %} {% block content %} <div id="error-page" class="box 404"> diff --git a/templates/base.html b/templates/base.html index fae2037e..c981f02c 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,8 +1,8 @@ -{% load static from staticfiles %}<!DOCTYPE html> +{% load static from staticfiles %}{% load wiki %}<!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8" /> - <title>{% block title %}Arch Linux{% endblock %}</title> + <title>{% block title %}{{ BRANDING_DISTRONAME }}{% endblock %}</title> <link rel="stylesheet" type="text/css" href="{% static "archweb.css" %}" media="screen, projection" /> <link rel="icon" type="image/x-icon" href="{% static "favicon.ico" %}" /> <link rel="shortcut icon" type="image/x-icon" href="{% static "favicon.ico" %}" /> @@ -10,21 +10,21 @@ <link rel="apple-touch-icon" sizes="72x72" href="{% static "logos/apple-touch-icon-72x72.png" %}" /> <link rel="apple-touch-icon" sizes="114x114" href="{% static "logos/apple-touch-icon-114x114.png" %}" /> <link rel="apple-touch-icon" sizes="144x144" href="{% static "logos/apple-touch-icon-144x144.png" %}" /> - <link rel="search" type="application/opensearchdescription+xml" href="{% url 'opensearch-packages' as osp %}{{ osp }}" title="Arch Linux Packages" /> + <link rel="search" type="application/opensearchdescription+xml" href="{% url 'opensearch-packages' as osp %}{{ osp }}" title="{{ BRANDING_DISTRONAME }} Packages" /> {% block head %}{% endblock %} </head> <body class="{% if user.is_authenticated %}devmode {% endif %}{% block bodyclass %}{% endblock %}"> <div id="archnavbar" class="{% block navbarclass %}anb-home{% endblock %}"> - <div id="archnavbarlogo"><h1><a href="/" title="Return to the main page">Arch Linux</a></h1></div> + <div id="archnavbarlogo"><h1><a href="/" title="Return to the main page">{{ BRANDING_DISTRONAME }}</a></h1></div> <div id="archnavbarmenu"> <ul id="archnavbarlist"> - <li id="anb-home"><a href="/" title="Arch news, packages, projects and more">Home</a></li> - <li id="anb-packages"><a href="/packages/" title="Arch Package Database">Packages</a></li> + <li id="anb-home"><a href="/" title="{{ BRANDING_SHORTNAME }} news, packages, projects and more">Home</a></li> + <li id="anb-packages"><a href="/packages/" title="{{ BRANDING_SHORTNAME }} Package Database">Packages</a></li> <li id="anb-forums"><a href="https://bbs.archlinux.org/" title="Community forums">Forums</a></li> - <li id="anb-wiki"><a href="https://wiki.archlinux.org/" title="Community documentation">Wiki</a></li> - <li id="anb-bugs"><a href="https://bugs.archlinux.org/" title="Report and track bugs">Bugs</a></li> + <li id="anb-wiki"><a href="{% wiki_url %}" title="Community documentation">Wiki</a></li> + <li id="anb-bugs"><a href="{{ BUGTRACKER_URL }}" title="Report and track bugs">Bugs</a></li> <li id="anb-aur"><a href="https://aur.archlinux.org/" title="Arch Linux User Repository">AUR</a></li> - <li id="anb-download"><a href="{% url 'page-download' as pdl %}{{ pdl }}" title="Get Arch Linux">Download</a></li> + <li id="anb-download"><a href="{% url 'page-download' as pdl %}{{ pdl }}" title="Get {{ BRANDING_DISTRONAME }}">Download</a></li> </ul> </div> </div> @@ -33,13 +33,13 @@ {% if user.is_authenticated %} <ul> <li><a href="{% url 'devel-index' %}" title="Developer Dashboard">Dashboard</a></li> - <li><a href="https://wiki.archlinux.org/index.php/DeveloperWiki" + <li><a href="{% wiki_url 'DeveloperWiki' %}" title="Developer Wiki">DevWiki</a></li> <li><a href="{% url 'news-list' as newsl %}{{ newsl }}" title="Manage news articles">News</a></li> <li><a href="/packages/signoffs/" title="Package signoffs">Signoffs</a></li> <li><a href="/todo/" title="Developer todo lists">Todos</a></li> <li><a href="{% url 'devel-clocks' %}" title="Developer world clocks">Dev Clocks</a></li> - <li><a href="https://mailman.archlinux.org/mailman/private/arch-dev/" + <li><a href="{{ MAILMAN_BASE_URL }}/mailman/private/arch-dev/" title="arch-dev mailing list archives">Archives</a></li> <li><a href="https://stats.archlinux.org/munin/" title="Arch server monitoring">Server Monitoring</a></li> @@ -74,7 +74,7 @@ title="Contact Aaron Griffin">Aaron Griffin</a>.</p> <p>The Arch Linux name and logo are recognized - <a href="https://wiki.archlinux.org/index.php/DeveloperWiki:TrademarkPolicy" + <a href="{% wiki_url 'DeveloperWiki:TrademarkPolicy' %}" title="Arch Linux Trademark Policy">trademarks</a>. Some rights reserved.</p> <p>The registered trademark Linux® is used pursuant to a sublicense from LMI, diff --git a/templates/devel/clock.html b/templates/devel/clock.html index 9d672f12..6dc7defd 100644 --- a/templates/devel/clock.html +++ b/templates/devel/clock.html @@ -4,7 +4,7 @@ {% load flags %} {% load tz %} -{% block title %}Arch Linux - Developer World Clocks{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Developer World Clocks{% endblock %} {% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %} diff --git a/templates/devel/index.html b/templates/devel/index.html index e9330734..0de285d5 100644 --- a/templates/devel/index.html +++ b/templates/devel/index.html @@ -5,7 +5,7 @@ {% load package_extras %} {% load todolists %} -{% block title %}Arch Linux - Developer Dashboard{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Developer Dashboard{% endblock %} {% block content %} <div id="dev-dashboard" class="box"> diff --git a/templates/devel/packages.html b/templates/devel/packages.html index c190ab08..63dd91aa 100644 --- a/templates/devel/packages.html +++ b/templates/devel/packages.html @@ -4,7 +4,7 @@ {% load attributes %} {% load package_extras %} -{% block title %}Arch Linux - {{ title }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ title }}{% endblock %} {% block content %} <div class="box"> diff --git a/templates/devel/profile.html b/templates/devel/profile.html index acdc22a9..dff5d925 100644 --- a/templates/devel/profile.html +++ b/templates/devel/profile.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Edit Profile{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Edit Profile{% endblock %} {% block content %} <div id="dev-edit-profile" class="box"> diff --git a/templates/general_form.html b/templates/general_form.html index 1fa33513..c6d6cb1c 100644 --- a/templates/general_form.html +++ b/templates/general_form.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - {{title}}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{title}}{% endblock %} {% block content %} <div id="generic-form" class="box"> diff --git a/templates/mirrors/mirror_details.html b/templates/mirrors/mirror_details.html index 64009380..5fe1c585 100644 --- a/templates/mirrors/mirror_details.html +++ b/templates/mirrors/mirror_details.html @@ -4,8 +4,9 @@ {% load mirror_status %} {% load flags %} {% load admin_urls %} +{% load bugs %} -{% block title %}Arch Linux - {{ mirror.name }} - Mirror Details{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ mirror.name }} - Mirror Details{% endblock %} {% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %} @@ -63,7 +64,7 @@ </tr> <tr> <th>Flyspray Issue:</th> - <td>{% if mirror.bug %}<a href="https://bugs.archlinux.org/task/{{ mirror.bug }}">FS#{{ mirror.bug }}</a>{% endif %}</td> + <td>{% if mirror.bug %}{% bug_link mirror.bug %}{% endif %}</td> </tr> <tr> <th>Notes:</th> diff --git a/templates/mirrors/mirrorlist.txt b/templates/mirrors/mirrorlist.txt index a7f8e2af..b8eada93 100644 --- a/templates/mirrors/mirrorlist.txt +++ b/templates/mirrors/mirrorlist.txt @@ -4,7 +4,7 @@ them, sacrifices have to be made. If editing this template, it is easiest to forget about where line breaks are happening until you are done getting the content right, and then go back later to fix it all up. {% endcomment %}{% autoescape off %}## -## Arch Linux repository mirrorlist +## {{ BRANDING_DISTRONAME }} repository mirrorlist ## Generated on {% now "Y-m-d" %} ##{% for mirror_url in mirror_urls %}{% ifchanged %} diff --git a/templates/mirrors/mirrorlist_generate.html b/templates/mirrors/mirrorlist_generate.html index 59b0d358..c2a79fa8 100644 --- a/templates/mirrors/mirrorlist_generate.html +++ b/templates/mirrors/mirrorlist_generate.html @@ -1,14 +1,15 @@ {% extends "base.html" %} {% load package_extras %} -{% block title %}Arch Linux - Pacman Mirrorlist Generator{% endblock %} +{% load wiki %} +{% block title %}{{ BRANDING_DISTRONAME }} - Pacman Mirrorlist Generator{% endblock %} {% block content %} <div id="mirrorlist-gen" class="box"> <h2>Pacman Mirrorlist Generator</h2> - <p>This page generates the most up-to-date mirrorlist possible for Arch - Linux. The data used here comes straight from the developers' internal + <p>This page generates the most up-to-date mirrorlist possible for {{ BRANDING_DISTRONAME }}. + The data used here comes straight from the developers' internal mirror database used to track mirror availability and tiering. There are two main options: get a mirrorlist with every available mirror, or get a mirrorlist tailored to your geography.</p> @@ -28,8 +29,8 @@ <h3>Customized by country mirrorlist</h3> <p>The following form can generate a custom up-to-date - <a href="https://wiki.archlinux.org/index.php/Pacman" - title="ArchWiki: Pacman">pacman</a> mirrorlist based on geography and + <a href="{% wiki_url 'Pacman' %}" + title="{{BRANDING_WIKINAME}}: Pacman">pacman</a> mirrorlist based on geography and desired protocol(s). Simply replace the contents of <code>/etc/pacman.d/mirrorlist</code> with your generated list. Additionally, the mirror status data can be incorporated into the generated diff --git a/templates/mirrors/mirrorlist_status.txt b/templates/mirrors/mirrorlist_status.txt index c69075a3..746aae76 100644 --- a/templates/mirrors/mirrorlist_status.txt +++ b/templates/mirrors/mirrorlist_status.txt @@ -4,7 +4,7 @@ them, sacrifices have to be made. If editing this template, it is easiest to forget about where line breaks are happening until you are done getting the content right, and then go back later to fix it all up. {% endcomment %}{% autoescape off %}## -## Arch Linux repository mirrorlist +## {{ BRANDING_DISTRONAME }} repository mirrorlist ## Sorted by mirror score from mirror status page ## Generated on {% now "Y-m-d" %} ## diff --git a/templates/mirrors/mirrors.html b/templates/mirrors/mirrors.html index f55bd875..3450d439 100644 --- a/templates/mirrors/mirrors.html +++ b/templates/mirrors/mirrors.html @@ -3,7 +3,7 @@ {% load static from staticfiles %} {% load flags %} -{% block title %}Arch Linux - Mirror Overview{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Mirror Overview{% endblock %} {% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %} diff --git a/templates/mirrors/status.html b/templates/mirrors/status.html index 530e3ff5..f11d57ca 100644 --- a/templates/mirrors/status.html +++ b/templates/mirrors/status.html @@ -3,14 +3,14 @@ {% load mirror_status %} {% load flags %} -{% block title %}Arch Linux - Mirror Status{% if tier != None %} - Tier {{ tier }}{% endif %}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Mirror Status{% if tier != None %} - Tier {{ tier }}{% endif %}{% endblock %} {% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %} {% block content %} <div id="mirrorstatus" class="box"> <h2>Mirror Status{% if tier != None %} - Tier {{ tier }}{% endif %}</h2> - <p>This page reports the status of all known, public, and active Arch Linux + <p>This page reports the status of all known, public, and active {{ BRANDING_DISTRONAME }} mirrors. All data on this page reflects the status of the mirrors within the <em>last {{ cutoff|hours }}</em>. All listed times are UTC. The check script runs on a regular basis and polls for the <tt>lastsync</tt> file in the root of diff --git a/templates/news/add.html b/templates/news/add.html index 51094659..a09366dc 100644 --- a/templates/news/add.html +++ b/templates/news/add.html @@ -1,6 +1,6 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - News: {% if form.instance.id %}Edit{% else %}Add{% endif %} Article{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - News: {% if form.instance.id %}Edit{% else %}Add{% endif %} Article{% endblock %} {% block content %} <div id="news-add-article" class="box"> diff --git a/templates/news/delete.html b/templates/news/delete.html index 191c6929..d8f71bd5 100644 --- a/templates/news/delete.html +++ b/templates/news/delete.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Delete News{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Delete News{% endblock %} {% block content %} <div id="news-delete-entry" class="box"> diff --git a/templates/news/list.html b/templates/news/list.html index 71cd3d02..8662a91b 100644 --- a/templates/news/list.html +++ b/templates/news/list.html @@ -1,16 +1,16 @@ {% extends "base.html" %} {% load cycle from future %} -{% block title %}Arch Linux - News{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - News{% endblock %} {% block head %} -<link rel="alternate" type="application/rss+xml" title="Arch Linux News Updates" href="/feeds/news/" /> +<link rel="alternate" type="application/rss+xml" title="{{BRANDING_DISTRONAME}} News Updates" href="/feeds/news/" /> {% endblock %} {% block content %} <div id="news-article-list" class="box"> - <h2>Arch Linux News Archives</h2> + <h2>{{ BRANDING_DISTRONAME }} News Archives</h2> {% if perms.news.add_news %} <ul class="admin-actions"> diff --git a/templates/news/view.html b/templates/news/view.html index 8f49fb1f..93cf32d4 100644 --- a/templates/news/view.html +++ b/templates/news/view.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - News: {{ news.title }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - News: {{ news.title }}{% endblock %} {% block content %} <div itemscope itemtype="http://schema.org/Article" class="news-article box"> @@ -13,7 +13,7 @@ <meta itemprop="name" content="{{ news.author.get_full_name|escape }}"/> </div> <div style="display:none" itemprop="publisher" itemscope itemtype="http://schema.org/Organization"> - <meta itemprop="name" content="Arch Linux"/> + <meta itemprop="name" content="{{ BRANDING_DISTRONAME }}"/> </div> {% if perms.news.change_news %} diff --git a/templates/packages/details.html b/templates/packages/details.html index 7a0f8e88..82f2c604 100644 --- a/templates/packages/details.html +++ b/templates/packages/details.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}){% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/details.html.jinja b/templates/packages/details.html.jinja index 9a72622d..f5b08805 100644 --- a/templates/packages/details.html.jinja +++ b/templates/packages/details.html.jinja @@ -69,7 +69,7 @@ <meta itemprop="fileSize" content="{{ pkg.compressed_size }}"/> <meta itemprop="dateCreated" content="{{ pkg.build_date|date("Y-m-d") }}"/> <meta itemprop="datePublished" content="{{ pkg.last_update|date("Y-m-d") }}"/> - <meta itemprop="operatingSystem" content="Arch Linux"/> + <meta itemprop="operatingSystem" content="{{ BRANDING_DISTRONAME }}"/> {% if pkg.packager %}<div style="display:none" itemprop="provider" itemscope itemtype="http://schema.org/Person"> <meta itemprop="name" content="{{ pkg.packager.get_full_name()|escape }}"/> </div>{% endif %} diff --git a/templates/packages/differences.html b/templates/packages/differences.html index 5ebe18e2..bde05a50 100644 --- a/templates/packages/differences.html +++ b/templates/packages/differences.html @@ -3,7 +3,7 @@ {% load static from staticfiles %} {% load package_extras %} -{% block title %}Arch Linux - Package Differences Reports{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Differences Reports{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/files.html b/templates/packages/files.html index 879fcbff..667a77cb 100644 --- a/templates/packages/files.html +++ b/templates/packages/files.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}) - File List{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}) - File List{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/flag.html b/templates/packages/flag.html index a83f37ff..e66d3472 100644 --- a/templates/packages/flag.html +++ b/templates/packages/flag.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load package_extras %} -{% block title %}Arch Linux - Flag Package - {{ package.pkgname }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Flag Package - {{ package.pkgname }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} {% block head %}<meta name="robots" content="noindex"/>{% endblock %} {% block navbarclass %}anb-packages{% endblock %} @@ -23,13 +23,13 @@ <p>The message box portion is meant for short messages only. If you need more than 200 characters for your message, then file a bug report, email the maintainer directly, or send - an email to the <a href="https://mailman.archlinux.org/mailman/listinfo/arch-general" + an email to the <a href="{{ MAILMAN_BASE_URL }}/mailman/listinfo/arch-general" title="Visit the arch-general mailing list">arch-general mailing list</a> with your additional text.</p> <p><strong>Note:</strong> Do <em>not</em> use this facility if the package is broken! The package will be unflagged and the report will be ignored! - <a href="https://bugs.archlinux.org/" title="Arch Linux Bugtracker">Use the + <a href="{{ BUGTRACKER_URL }}" title="{{ BRANDING_DISTRONAME }} Bugtracker">Use the bugtracker to file a bug</a> instead.</p> <p>Please confirm your flag request for {{package.pkgname}}:</p> diff --git a/templates/packages/flag_confirmed.html b/templates/packages/flag_confirmed.html index 6274adbb..a4c4db2a 100644 --- a/templates/packages/flag_confirmed.html +++ b/templates/packages/flag_confirmed.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load package_extras %} -{% block title %}Arch Linux - Package Flagged - {{ package.pkgname }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Flagged - {{ package.pkgname }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} {% block head %}<meta name="robots" content="noindex"/>{% endblock %} {% block navbarclass %}anb-packages{% endblock %} diff --git a/templates/packages/flagged.html b/templates/packages/flagged.html index bbe0fad5..4b12ca8f 100644 --- a/templates/packages/flagged.html +++ b/templates/packages/flagged.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load package_extras %} -{% block title %}Arch Linux - Flag Package - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Flag Package - {{ pkg.pkgname }} {{ pkg.full_version }} ({{ pkg.arch.name }}){% endblock %} {% block head %}<meta name="robots" content="noindex"/>{% endblock %} {% block navbarclass %}anb-packages{% endblock %} diff --git a/templates/packages/flaghelp.html b/templates/packages/flaghelp.html index c6860264..5f013cd7 100644 --- a/templates/packages/flaghelp.html +++ b/templates/packages/flaghelp.html @@ -24,12 +24,12 @@ <p>The message box portion of the flag utility is meant for short messages only. If you need more than 200 characters for your message, then file a bug report, email the maintainer directly, or send - an email to the <a target="_blank" href="https://mailman.archlinux.org/mailman/listinfo/arch-general" + an email to the <a target="_blank" href="{{ MAILMAN_BASE_URL }}/mailman/listinfo/arch-general" title="Visit the arch-general mailing list">arch-general mailing list</a> with your additional text.</p> <p><strong>Note:</strong> Please do <em>not</em> use this facility if the - package is broken! Use the <a target="_blank" href="https://bugs.archlinux.org/" - title="Arch Linux Bugtracker">bugtracker</a> instead.</p> + package is broken! Use the <a target="_blank" href="{{ BUGTRACKER_URL }}" + title="{{ BRANDING_DISTRONAME }} Bugtracker">bugtracker</a> instead.</p> </body> </html> diff --git a/templates/packages/groups.html b/templates/packages/groups.html index ee4f0312..39a13389 100644 --- a/templates/packages/groups.html +++ b/templates/packages/groups.html @@ -2,7 +2,7 @@ {% load cycle from future %} {% load static from staticfiles %} -{% block title %}Arch Linux - Package Groups{% if arch %} - {{ arch }}{% endif %}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Groups{% if arch %} - {{ arch }}{% endif %}{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/opensearch.xml b/templates/packages/opensearch.xml index 6c50d991..0004b996 100644 --- a/templates/packages/opensearch.xml +++ b/templates/packages/opensearch.xml @@ -1,9 +1,9 @@ {% load static from staticfiles %}<?xml version="1.0" encoding="UTF-8"?> <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/"> - <ShortName>Arch Packages</ShortName> - <LongName>Arch Linux Package Repository Search</LongName> - <Description>Search the Arch Linux package repositories by keyword in package names and descriptions.</Description> - <Tags>linux archlinux package software</Tags> + <ShortName>{{BRANDING_SHORTNAME}} Packages</ShortName> + <LongName>{{BRANDING_DISTRONAME}} Package Repository Search</LongName> + <Description>Search the {{BRANDING_DISTRONAME}} package repositories by keyword in package names and descriptions.</Description> + <Tags>{{BRANDING_OSEARCH_TAGS}}</Tags> <Image height="16" width="16" type="image/x-icon">{{ domain }}{% static "favicon.ico" %}</Image> <Image height="64" width="64" type="image/png">{{ domain }}{% static "logos/icon-transparent-64x64.png" %}</Image> <Language>en-us</Language> diff --git a/templates/packages/packages_list.html b/templates/packages/packages_list.html index 0a1627f8..9736d36c 100644 --- a/templates/packages/packages_list.html +++ b/templates/packages/packages_list.html @@ -3,7 +3,7 @@ {% load static from staticfiles %} {% load package_extras %} -{% block title %}Arch Linux - {{ name }} ({{ arch.name }}) - {{ list_title }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ name }} ({{ arch.name }}) - {{ list_title }}{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/removed.html b/templates/packages/removed.html index f188b6db..2d730130 100644 --- a/templates/packages/removed.html +++ b/templates/packages/removed.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load package_extras %} -{% block title %}Arch Linux - Not Available - {{ name }} {{ version }} ({{ arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Not Available - {{ name }} {{ version }} ({{ arch.name }}){% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/search.html b/templates/packages/search.html index d4a47b26..a7433934 100644 --- a/templates/packages/search.html +++ b/templates/packages/search.html @@ -2,12 +2,12 @@ {% load cycle from future %} {% load package_extras %} -{% block title %}Arch Linux - Package Search{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Search{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block head %} {% if is_paginated and page_obj.number > 1 %}<meta name="robots" content="noindex, nofollow"/>{% endif %} -<link rel="alternate" type="application/rss+xml" title="Arch Linux Package Updates" href="/feeds/packages/" /> +<link rel="alternate" type="application/rss+xml" title="{{BRANDING_DISTRONAME}} Package Updates" href="/feeds/packages/" /> {% endblock %} {% block content %} @@ -143,7 +143,7 @@ {% else %}searching the <a href="https://aur.archlinux.org/">AUR</a>{% endif %} to see if the package can be found there.</p> - <p>You are browsing the Arch Linux package database. From here you can find + <p>You are browsing the {{ BRANDING_DISTRONAME }} package database. From here you can find detailed information about packages located in the official supported repositories.</p> </div> {% endblock %} diff --git a/templates/packages/signoff_options.html b/templates/packages/signoff_options.html index ee9b8b47..40b7cac7 100644 --- a/templates/packages/signoff_options.html +++ b/templates/packages/signoff_options.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Package Signoff Options - {{ package.pkgbase }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Signoff Options - {{ package.pkgbase }} {{ package.full_version }} ({{ package.arch.name }}){% endblock %} {% block head %}<meta name="robots" content="noindex"/>{% endblock %} {% block navbarclass %}anb-packages{% endblock %} diff --git a/templates/packages/signoffs.html b/templates/packages/signoffs.html index 1c133f15..06766935 100644 --- a/templates/packages/signoffs.html +++ b/templates/packages/signoffs.html @@ -3,7 +3,7 @@ {% load static from staticfiles %} {% load package_extras %} -{% block title %}Arch Linux - Package Signoffs{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Package Signoffs{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/packages/stale_relations.html b/templates/packages/stale_relations.html index 2dafc2be..949b563e 100644 --- a/templates/packages/stale_relations.html +++ b/templates/packages/stale_relations.html @@ -2,7 +2,7 @@ {% load cycle from future %} {% load static from staticfiles %} -{% block title %}Arch Linux - Stale Package Relations{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Stale Package Relations{% endblock %} {% block navbarclass %}anb-packages{% endblock %} {% block content %} diff --git a/templates/public/about.html b/templates/public/about.html index bf38e8a1..f5751d42 100644 --- a/templates/public/about.html +++ b/templates/public/about.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - About{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - About{% endblock %} {% block content %} <div class="box"> <h2 class="title">About Arch Linux</h2> diff --git a/templates/public/art.html b/templates/public/art.html index afab5498..40fd9bad 100644 --- a/templates/public/art.html +++ b/templates/public/art.html @@ -1,18 +1,18 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Artwork{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Artwork{% endblock %} {% block content %} <div id="artwork" class="box"> - <h2>Arch Linux Logos and Artwork</h2> + <h2>{{ BRANDING_DISTRONAME }} Logos and Artwork</h2> <h3>Logos for Press Usage</h3> - <p>The following Arch Linux logos are available for press and other use, subject to - the restrictions of our <a href="https://wiki.archlinux.org/index.php/DeveloperWiki:TrademarkPolicy" - title="Arch Linux Trademark Policy">trademark policy</a>.</p> + <p>The following {{BRANDING_DISTRONAME}} logos are available for press and other use, subject to + the restrictions of our <a href="{% wiki_url 'DeveloperWiki:TrademarkPolicy' %}" + title="{{BRANDING_DISTRONAME}} Trademark Policy">trademark policy</a>.</p> <p><strong>Two-color standard version</strong><br /> <em>Also available in print-quality diff --git a/templates/public/blank.html b/templates/public/blank.html index 2a8c83f4..3bf2cb2b 100644 --- a/templates/public/blank.html +++ b/templates/public/blank.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Sample Page Title{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Sample Page Title{% endblock %} {% block content %} <div id="sample-page-id" class="box"> diff --git a/templates/public/developer_list.html b/templates/public/developer_list.html index 954216ce..041780d7 100644 --- a/templates/public/developer_list.html +++ b/templates/public/developer_list.html @@ -23,7 +23,7 @@ <meta itemprop="familyName" content="{{ dev.last_name|escape }}"/> <meta itemprop="jobTitle" content="{{ group.member_title|escape }}"/> <div style="display:none" itemprop="memberOf" itemscope itemtype="http://schema.org/Organization"> - <meta itemprop="name" content="Arch Linux"/> + <meta itemprop="name" content="{{ BRANDING_DISTRONAME }}"/> </div> <h3>{{ dev.get_full_name }}{% if prof.latin_name %} ({{ prof.latin_name}}){% endif %} <a class="headerlink" name="{{ dev.username }}" id="{{ dev.username }}" href="#{{ dev.username }}" title="Permalink">¶</a></h3> diff --git a/templates/public/donate.html b/templates/public/donate.html index 301bd1c0..2bb2a53e 100644 --- a/templates/public/donate.html +++ b/templates/public/donate.html @@ -2,13 +2,13 @@ {% load cache %} {% load static from staticfiles %} -{% block title %}Arch Linux - Donate{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Donate{% endblock %} {% block content %} {% cache 600 donations secure %} <div id="donations" class="box"> - <h2>Donate to Arch Linux</h2> + <h2>Donate to {{ BRANDING_SHORTNAME }}</h2> <p>Arch Linux survives because of the tireless efforts of many people in the community and the core development circle. None of us are paid for diff --git a/templates/public/download.html b/templates/public/download.html index 9116816d..c0251d2f 100644 --- a/templates/public/download.html +++ b/templates/public/download.html @@ -2,12 +2,13 @@ {% load cache %} {% load static from staticfiles %} {% load flags %} +{% load wiki %} -{% block title %}Arch Linux - Downloads{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Downloads{% endblock %} {% block head %} <link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" /> -<link rel="alternate" type="application/rss+xml" title="Arch Linux Releases" href="/feeds/releases/" /> +<link rel="alternate" type="application/rss+xml" title="{{BRANDING_DISTRONAME}} Releases" href="/feeds/releases/" /> {% endblock %} {% block navbarclass %}anb-download{% endblock %} @@ -15,25 +16,25 @@ {% block content %} <div id="arch-downloads" class="box"> - <h2>Arch Linux Downloads</h2> + <h2>{{BRANDING_DISTRONAME}} Downloads</h2> <h3>Release Info</h3> <p>The image can be burned to a CD, mounted as an ISO file, or be directly written to a USB stick using a utility like `dd`. It - is intended for new installations only; an existing Arch Linux system + is intended for new installations only; an existing {{BRANDING_DISTRONAME}} system can always be updated with `pacman -Syu`.</p> <ul> {% if release.version %}<li><strong>Current Release:</strong> {{ release.version }}</li>{% endif %} {% if release.kernel_version %}<li><strong>Included Kernel:</strong> {{ release.kernel_version }}</li>{% endif %} {% if release.torrent_data %}<li><strong>ISO Size:</strong> {{ release.torrent.file_length|filesizeformat }}</li>{% endif %} - <li><a href="https://wiki.archlinux.org/index.php/Installation_guide">Installation Guide</a></li> + <li><a href="{% wiki_url 'Installation_guide' %}">Installation Guide</a></li> <li><strong>Resources:</strong> <ul> <li><a href="https://bugs.archlinux.org/index.php?project=6" title="Arch Linux Bugtracker:Release Engineering">Bug Tracker</a></li> - <li><a href="https://mailman.archlinux.org/mailman/listinfo/arch-releng" + <li><a href="{{ MAILMAN_BASE_URL }}/mailman/listinfo/arch-releng" title="Arch Linux Release Engineering mailing list">Mailing List</a></li> </ul> </li> @@ -45,9 +46,9 @@ <div class="article-content">{{ release.info_html }}</div> {% endif %} - <h3>Existing Arch Users</h3> + <h3>Existing {{BRANDING_SHORTNAME}} Users</h3> - <p>If you are an existing Arch user, there is no need to download a new ISO + <p>If you are an existing {{BRANDING_SHORTNAME}} user, there is no need to download a new ISO to update your existing system. You may be looking for <a href="{% url 'mirrorlist' %}">an updated mirrorlist</a> instead.</p> @@ -69,7 +70,7 @@ <p>If you have a wired connection, you can boot the latest release directly over the network.</p> <ul> <li><a href="{% url 'releng-netboot-info' %}" - title="Arch Linux Netboot">Arch Linux Netboot</a></li> + title="{{BRANDING_DISTRONAME}} Netboot">{{BRANDING_DISTRONAME}} Netboot</a></li> </ul> <h3>HTTP Direct Downloads</h3> @@ -106,8 +107,8 @@ </div> {% endcache %} - <p>If you want to become an Official Arch Linux Mirror please follow the - instructions listed <a href="https://wiki.archlinux.org/index.php/DeveloperWiki:NewMirrors">here</a>.</p> + <p>If you want to become an Official {{BRANDING_DISTRONAME}} Mirror please follow the + instructions listed <a href="{% wiki_url 'DeveloperWiki:NewMirrors' %}">here</a>.</p> </div> {% endblock %} diff --git a/templates/public/feeds.html b/templates/public/feeds.html index 5e6fd7c5..9936944e 100644 --- a/templates/public/feeds.html +++ b/templates/public/feeds.html @@ -1,29 +1,29 @@ -{% extends "base.html" %} -{% block title %}Arch Linux - RSS Feeds{% endblock %} +{% extends "base.html" %}{% load wiki %} +{% block title %}{{ BRANDING_DISTRONAME }} - RSS Feeds{% endblock %} {% block content %} <div id="rss-feeds" class="box"> <h2>RSS Feeds</h2> - <p>Several RSS feeds are available for consumption from the Arch website. + <p>Several RSS feeds are available for consumption from the {{ BRANDING_SHORTNAME }} website. The majority of these are package-related and allow feeds to be customized for the updates you care about.</p> <h3>News and Activity Feeds</h3> - <p>Grab the <a href="/feeds/news/" class="rss" title="Arch Linux news feed">news item feed</a> - to keep up-to-date with the latest news from the Arch Linux development staff.</p> + <p>Grab the <a href="/feeds/news/" class="rss" title="{{BRANDING_DISTRONAME}} news feed">news item feed</a> + to keep up-to-date with the latest news from the {{BRANDING_DISTRONAME}} development staff.</p> - <p>The <a href="https://wiki.archlinux.org/index.php?title=Special:RecentChanges&feed=rss" - title="ArchWiki Recent Changes feed" class="rss">Arch Wiki: Recent changes feed</a> - is also available to track document changes from the <a href="https://wiki.archlinux.org/" - title="Arch Wiki community documentation">Arch Wiki</a>.</p> + <p>The <a href="{% wiki_url 'Special:RecentChanges?feed=rss' %}" + title="{{ BRANDING_WIKINAME }} Recent Changes feed" class="rss">{{ BRANDING_WIKINAME }}: Recent changes feed</a> + is also available to track document changes from the <a href="{% wiki_url %}" + title="{{ BRANDING_WIKINAME }} community documentation">{{ BRANDING_WIKINAME }}</a>.</p> <h3>Package Feeds</h3> <p>If you are interested in <a href="/feeds/packages/" class="rss" - title="Arch Linux package updates feed">all package updates</a>, + title="{{ BRANDING_DISTRONAME }} package updates feed">all package updates</a>, then grab this feed. Note that when a package is updated for multiple architectures, you will see each individual update show up here. Alternatively, you can select a packages feed from the below table that is @@ -67,13 +67,13 @@ <h3>Release Feed</h3> - <p>Grab the <a href="/feeds/releases/" class="rss" title="Arch Linux release feed">ISO release feed</a> + <p>Grab the <a href="/feeds/releases/" class="rss" title="{{BRANDING_DISTRONAME}} release feed">ISO release feed</a> if you want to help seed the ISO release torrents as they come out.</p> <h3>Development Feeds</h3> <p>Subscribe to any of the following to track bug tickets and feature - requests from the <a href="https://bugs.archlinux.org/" title="Arch Linux Bugs">Arch Linux Bugtracker</a>:</p> + requests from the <a href="{{BUGTRACKER_URL}}" title="{{BRANDING_DISTRONAME}} Bugs">{{BRANDING_DISTRONAME}} Bugtracker</a>:</p> <table class="pretty2"> <thead> diff --git a/templates/public/index.html b/templates/public/index.html index fdb136cf..a1dda065 100644 --- a/templates/public/index.html +++ b/templates/public/index.html @@ -1,10 +1,11 @@ {% extends "base.html" %} {% load cache %} {% load static from staticfiles %} +{% load wiki %} {% block head %} -<link rel="alternate" type="application/rss+xml" title="Arch Linux News Updates" href="/feeds/news/" /> -<link rel="alternate" type="application/rss+xml" title="Arch Linux Package Updates" href="/feeds/packages/" /> +<link rel="alternate" type="application/rss+xml" title="{{ BRANDING_DISRONAME }} News Updates" href="/feeds/news/" /> +<link rel="alternate" type="application/rss+xml" title="{{ BRANDING_DISRONAME }} Package Updates" href="/feeds/packages/" /> {% endblock %} {% block content_left %} @@ -12,7 +13,7 @@ <div id="intro" class="box"> <h2>A simple, lightweight distribution</h2> - <p>You've reached the website for <strong>Arch Linux</strong>, a + <p>You've reached the website for <strong>{{BRANDING_DISTRONAME}}</strong>, a lightweight and flexible Linux® distribution that tries to Keep It Simple.</p> @@ -25,14 +26,14 @@ <p>Our strong community is diverse and helpful, and we pride ourselves on the range of skillsets and uses for Arch that stem from it. Please check out our <a href="https://bbs.archlinux.org/" title="Arch Forums">forums</a> - and <a href="https://mailman.archlinux.org/mailman/listinfo/" - title="Arch Mailing Lists">mailing lists</a> - to get your feet wet. Also glance through our <a href="https://wiki.archlinux.org/" - title="Arch Wiki">wiki</a> - if you want to learn more about Arch.</p> + and <a href="{{ MAILMAN_BASE_URL }}/mailman/listinfo/" + title="{{ BRANDING_SHORTNAME }} Mailing Lists">mailing lists</a> + to get your feet wet. Also glance through our <a href="{% wiki_url %}" + title="{{BRANDING_WIKINAME}}">wiki</a> + if you want to learn more about {{BRANDING_SHORTNAME}}.</p> <p class="readmore"><a href="{% url 'page-about' %}" - title="Learn more about Arch Linux">Learn more...</a></p> + title="Learn more about {{ BRANDING_DISTRONAME }}">Learn more...</a></p> </div> <div id="news"> @@ -41,7 +42,7 @@ <span class="arrow"></span> </h3> - <a href="/feeds/news/" title="Arch News RSS Feed" + <a href="/feeds/news/" title="{{ BRANDING_SHORTNAME }} News RSS Feed" 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 %} @@ -88,7 +89,7 @@ <h3>Recent Updates <span class="more">(<a href="/packages/?sort=-last_update" title="Browse all of the latest packages">more</a>)</span></h3> - <a href="/feeds/packages/" title="Arch Package Updates RSS Feed" + <a href="/feeds/packages/" title="{{ BRANDING_SHORTNAME }} Package Updates RSS Feed" class="rss-icon"><img width="16" height="16" src="{% static "rss.png" %}" alt="RSS Feed" /></a> <table> @@ -109,29 +110,30 @@ <div id="nav-sidebar" class="widget"> <h4>Documentation</h4> <ul> - <li><a href="https://wiki.archlinux.org/" + <li><a href="{% wiki_url %}" title="Community documentation">Wiki</a></li> - <li><a href="https://wiki.archlinux.org/index.php/Installation_guide" + <li><a href="{% wiki_url 'Installation_guide' %}" title="Installation guide">Installation Guide</a></li> - <li><a href="https://wiki.archlinux.org/index.php/Beginners'_guide" + <li><a href="{% wiki_url "Beginners'_guide" %}" title="A good place to start for beginners">Beginners' Guide</a></li> </ul> <h4>Community</h4> <ul> - <li><a href="https://mailman.archlinux.org/mailman/listinfo/" + <li><a href="{{ MAILMAN_BASE_URL }}/mailman/listinfo/" title="Community and developer mailing lists">Mailing Lists</a></li> - <li><a href="https://wiki.archlinux.org/index.php/IRC_channels" + <li><a href="{% wiki_url 'IRC_channels' %}" title="Official and regional IRC communities">IRC Channels</a></li> <li><a href="https://planet.archlinux.org/" title="Arch in the blogosphere">Planet Arch</a></li> - <li><a href="https://wiki.archlinux.org/index.php/International_communities" - title="Arch communities in your native language">International Communities</a></li> + <li><a href="{% wiki_url 'International_communities' %}" + title="{{DISTRO_SHORTNAME}} communities in your native language">International Communities</a></li> </ul> <h4>Support</h4> <ul> - <li><a href="{% url 'page-donate' %}" title="Help support Arch Linux">Donate</a></li> + <li><a href="{% url 'page-donate' %}" + title="Help support {{ BRANDING_DISTRONAME }}">Donate</a></li> <li><a href="http://schwag.archlinux.ca/" title="USB keys, jewellery, case badges">Arch Schwag</a></li> <li><a href="http://www.zazzle.com/archlinux*" @@ -154,11 +156,11 @@ <h4>Development</h4> <ul> - <li><a href="https://projects.archlinux.org/" - title="Official Arch projects (git)">Projects in Git</a></li> + <li><a href="{{ PROJECTS_URL }}" + title="Official {{BRANDING_SHORTNAME}} projects (git)">Projects in Git</a></li> <li><a href="{% url 'page-svn' %}" title="View SVN entries for packages">SVN Repositories</a></li> - <li><a href="https://wiki.archlinux.org/index.php/DeveloperWiki" + <li><a href="{% wiki_url 'DeveloperWiki' %}" title="Developer Wiki articles">Developer Wiki</a></li> <li><a href="/groups/" title="View the available package groups">Package Groups</a></li> @@ -183,9 +185,9 @@ <h4>More Resources</h4> <ul> - <li><a href="https://wiki.archlinux.org/index.php/Arch_Linux_press_coverage" - title="Arch Linux in the media">Press Coverage</a></li> - <li><a href="{% url 'page-art' %}" title="Arch logos and other artwork for promotional use">Logos & Artwork</a></li> + <li><a href="{% wiki_url 'Arch_Linux_press_coverage' %}" + title="{{ BRANDING_DISTRONAME }} in the media">Press Coverage</a></li> + <li><a href="{% url 'page-art' %}" title="{{ BRANDING_SHORTNAME }} logos and other artwork for promotional use">Logos & Artwork</a></li> <li><a href="{% url 'news-list' %}" title="News Archives">News Archives</a></li> <li><a href="/feeds/" title="Various RSS Feeds">RSS Feeds</a></li> </ul> diff --git a/templates/public/keys.html b/templates/public/keys.html index 37d5b232..f15ec1a9 100644 --- a/templates/public/keys.html +++ b/templates/public/keys.html @@ -2,13 +2,13 @@ {% load static from staticfiles %} {% load pgp %} -{% block title %}Arch Linux - Master Signing Keys{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Master Signing Keys{% endblock %} {% block content %} <div id="signing-keys" class="box"> <h2>Master Signing Keys</h2> - <p>This page lists the Arch Linux Master Keys. This is a distributed set of + <p>This page lists the {{ BRANDING_DISTORNAME }} Master Keys. This is a distributed set of keys that are seen as "official" signing keys of the distribution. Each key is held by a different developer, and a revocation certificate for the key is held by a different developer. Thus, no one developer has absolute hold @@ -63,7 +63,7 @@ personal key of the developer is signed by the given master key. A 'No' indicates it has not been signed; however, this does not necessarily mean the key should not be trusted.</p> - <p>All official Arch Linux developers and trusted users should have their + <p>All official {{ BRANDING_DISTRONAME }} developers and trusted users should have their key signed by at least three master keys if they are responsible for packaging software in the repositories. This is in accordance with the PGP <em>web of trust</em> concept. If a user is willing to marginally trust all diff --git a/templates/public/svn.html b/templates/public/svn.html index 0d067098..01c2ef80 100644 --- a/templates/public/svn.html +++ b/templates/public/svn.html @@ -1,17 +1,17 @@ {% extends "base.html" %} -{% block title %}Arch Linux - SVN{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - SVN{% endblock %} {% block content %} <div class="box"> <h2 class="title">SVN Repositories</h2> <p> The PKGBUILD files can be fetched via the ABS utility. To learn more - about ABS, see <a href="https://wiki.archlinux.org/index.php/ABS">the ABS wiki page</a>. + about ABS, see <a href="{% wiki_url 'ABS' %}">the ABS wiki page</a>. </p> <p>The SVN repositories have been cloned into git repositories and can be viewed via the cgit interface. - <a href="https://projects.archlinux.org/svntogit/packages.git/">All + <a href="{{ PROJECTS_URL }}/svntogit/packages.git/">All packages</a> are available here except for - <a href="https://projects.archlinux.org/svntogit/community.git/">community + <a href="{{ PROJECTS_URL }}/svntogit/community.git/">community and multilib</a> which are available in a different repository.</p> <p> You can also get individual PKGBUILDs directly from SVN. This can be @@ -31,7 +31,7 @@ cd community svn update <your-package-name></pre> <p> - Visit <a href="https://wiki.archlinux.org/index.php?title=Getting_PKGBUILDS_From_SVN">the wiki</a> + Visit <a href="{% wiki_url 'Getting_PKGBUILDS_From_SVN' %}">the wiki</a> for more tips on checking out and updating svn PKGBUILDs. </p> diff --git a/templates/public/userlist.html b/templates/public/userlist.html index b49c5de2..d49a1539 100644 --- a/templates/public/userlist.html +++ b/templates/public/userlist.html @@ -2,14 +2,14 @@ {% load static from staticfiles %} {% load cache %} -{% block title %}Arch Linux - {{ group.name }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - {{ group.name }}{% endblock %} {% block head %}<link rel="stylesheet" type="text/css" href="{% static "flags/fam.css" %}" media="screen, projection" />{% endblock %} {% block content %} {% cache 600 dev-tu-profiles group.name %} <div id="dev-tu-profiles" class="box"> - <h2>Arch Linux {{ group.name }}</h2> + <h2>{{BRANDING_DISTRONAME}} {{ group.name }}</h2> <p>{{ group.description }}</p> diff --git a/templates/registration/login.html b/templates/registration/login.html index b5894319..ff360de3 100644 --- a/templates/registration/login.html +++ b/templates/registration/login.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Developer Login{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Developer Login{% endblock %} {% block content %} <div id="dev-login" class="box"> diff --git a/templates/registration/logout.html b/templates/registration/logout.html index 84bbff94..5c296c5d 100644 --- a/templates/registration/logout.html +++ b/templates/registration/logout.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Logout successful{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Logout successful{% endblock %} {% block content %} <div id="dev-logout" class="box"> diff --git a/templates/releng/add.html b/templates/releng/add.html index d060395d..80afda80 100644 --- a/templates/releng/add.html +++ b/templates/releng/add.html @@ -1,12 +1,12 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Test Result Entry{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Test Result Entry{% endblock %} {% block content %} <div class="box"> - <h2>Arch Releng Testbuild Feedback Entry</h2> + <h2>{{ BRANDING_SHORTNAME }} Releng Testbuild Feedback Entry</h2> - <p>This page allows you to submit feedback after testing an Arch Linux installation + <p>This page allows you to submit feedback after testing an {{ BRANDING_SHORTNAME }} installation using a release engineering testbuild. Mark all the options you used during the installation; at the end you can specify whether everything went OK. Be sure to only denote a successful install after having checked the diff --git a/templates/releng/release_detail.html b/templates/releng/release_detail.html index 11155c0c..97017600 100644 --- a/templates/releng/release_detail.html +++ b/templates/releng/release_detail.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static %} -{% block title %}Arch Linux - Release: {{ release.version }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Release: {{ release.version }}{% endblock %} {% block content %} <div class="release box"> diff --git a/templates/releng/release_list.html b/templates/releng/release_list.html index fa15bcb9..3f442d07 100644 --- a/templates/releng/release_list.html +++ b/templates/releng/release_list.html @@ -2,10 +2,10 @@ {% load cycle from future %} {% load static from staticfiles %} -{% block title %}Arch Linux - Releases{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Releases{% endblock %} {% block head %} -<link rel="alternate" type="application/rss+xml" title="Arch Linux News Updates" href="/feeds/releases/" /> +<link rel="alternate" type="application/rss+xml" title="{{BRANDING_DISTRONAME}} News Updates" href="/feeds/releases/" /> {% endblock %} {% block content %} diff --git a/templates/releng/results.html b/templates/releng/results.html index 59d8351d..71a31fef 100644 --- a/templates/releng/results.html +++ b/templates/releng/results.html @@ -1,6 +1,7 @@ {% extends "base.html" %} +{% load wiki %} -{% block title %}Arch Linux - Release Engineering Testbuild Results{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Release Engineering Testbuild Results{% endblock %} {% block content %} <div class="box"> @@ -17,7 +18,7 @@ the <a href="{% url 'releng-iso-overview' %}">overview</a>.</p> <p>For more information, see the <a - href="https://wiki.archlinux.org/index.php/DeveloperWiki:releng_testimages_feedback">documentation + href="{% wiki_url 'DeveloperWiki:releng_testimages_feedback' %}">documentation on the wiki</a>.</p> <p>All ISOs referenced on this page are available from diff --git a/templates/releng/thanks.html b/templates/releng/thanks.html index 2462dafd..b772fad3 100644 --- a/templates/releng/thanks.html +++ b/templates/releng/thanks.html @@ -1,6 +1,6 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Feedback - Thanks!{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Feedback - Thanks!{% endblock %} {% block content %} <div class="box"> diff --git a/templates/todolists/list.html b/templates/todolists/list.html index 983a49f0..5cfd6a02 100644 --- a/templates/todolists/list.html +++ b/templates/todolists/list.html @@ -2,7 +2,7 @@ {% load cycle from future %} {% load static from staticfiles %} -{% block title %}Arch Linux - Todo Lists{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Todo Lists{% endblock %} {% block content %} <div id="dev-todo" class="box"> diff --git a/templates/todolists/todolist_confirm_delete.html b/templates/todolists/todolist_confirm_delete.html index 5545462f..6d7ec0ab 100644 --- a/templates/todolists/todolist_confirm_delete.html +++ b/templates/todolists/todolist_confirm_delete.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% block title %}Arch Linux - Delete Todo List: {{object.name}}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Delete Todo List: {{object.name}}{% endblock %} {% block content %} <div id="dev-todo-delete" class="box"> diff --git a/templates/todolists/view.html b/templates/todolists/view.html index ec203b39..4ae25fb0 100644 --- a/templates/todolists/view.html +++ b/templates/todolists/view.html @@ -4,7 +4,7 @@ {% load package_extras %} {% load todolists %} -{% block title %}Arch Linux - Todo: {{ list.name }}{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Todo: {{ list.name }}{% endblock %} {% block content %} <div id="dev-todo-details" class="box"> diff --git a/templates/visualize/index.html b/templates/visualize/index.html index 446bdebe..e091c761 100644 --- a/templates/visualize/index.html +++ b/templates/visualize/index.html @@ -1,7 +1,7 @@ {% extends "base.html" %} {% load static from staticfiles %} -{% block title %}Arch Linux - Visualizations{% endblock %} +{% block title %}{{ BRANDING_DISTRONAME }} - Visualizations{% endblock %} {% block content %} <div class="box"> diff --git a/todolists/views.py b/todolists/views.py index 75c3d2d6..a0b56e25 100644 --- a/todolists/views.py +++ b/todolists/views.py @@ -3,6 +3,7 @@ from operator import attrgetter from django import forms from django.http import HttpResponse +from django.conf import settings from django.core.mail import send_mail from django.shortcuts import (get_list_or_404, get_object_or_404, redirect, render) @@ -232,7 +233,7 @@ def send_todolist_emails(todo_list, new_packages): template = loader.get_template('todolists/email_notification.txt') send_mail('Packages added to todo list \'%s\'' % todo_list.name, template.render(ctx), - 'Arch Website Notification <nobody@archlinux.org>', + settings.BRANDING_EMAIL, [maint], fail_silently=True) diff --git a/visualize/static/visualize.js b/visualize/static/visualize.js index 5254c26b..32e2a304 100644 --- a/visualize/static/visualize.js +++ b/visualize/static/visualize.js @@ -1,3 +1,23 @@ +/* archweb.js + * Homepage: https://projects.archlinux.org/archweb.git/ + * Copyright: 2011-2013 The Archweb Team (Dan McGee) + * License: GPLv2 + * + * This file is part of Archweb. + * + * Archweb is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License version 2 as + * published by the Free Software Foundation. + * + * Archweb is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Archweb. If not, see <http://www.gnu.org/licenses/>. + */ + function packages_treemap(chart_id, orderings, default_order) { var jq_div = jQuery(chart_id), color = d3.scale.category20(); |