add current revision to download page, add border fixes #861

This commit is contained in:
j 2012-06-19 22:56:26 +02:00
commit 4341824d81
3 changed files with 14 additions and 3 deletions

View file

@ -18,6 +18,7 @@ Ox.getJSON('json/pandora.json', function(pandora) {
.html('=>'),
tourIndex = 0;
Ox.forEach(pandora.pages, function(data, page) {
var $element, text;
if (page == '') {
@ -41,6 +42,14 @@ Ox.getJSON('json/pandora.json', function(pandora) {
loadPage();
Ox.get('http://code.0x2620.org/pandora/.bzr/branch/last-revision', function(data) {
var hash = window.location.hash.substr(1).split('.'),
page = hash[0],
version = data.split(' ')[0];
pandora.pages['download'] = pandora.pages['download'].replace('{version}', '<br>Latest revision is <b>r'+version+'</b>');
page == 'download' && loadPage();
});
function loadPage() {
var hash = window.location.hash.substr(1).split('.'),
page = hash[0],
@ -179,7 +188,7 @@ Ox.getJSON('json/pandora.json', function(pandora) {
$('<p>').html(pandora.pages.tour[part - 1][1])
);
} else {
text = pandora.pages[page];
text = pandora.pages[page].replace('{version}', '');
}
$head.empty().append(
page == '' ? 'pan.do/ra &mdash; open media archive'