split output
This commit is contained in:
parent
6a18c14d42
commit
02bde095e4
1 changed files with 10 additions and 2 deletions
|
@ -29,11 +29,19 @@ function render() {
|
||||||
keys: ['title', 'layers']
|
keys: ['title', 'layers']
|
||||||
}, function(result) {
|
}, function(result) {
|
||||||
var html = ''
|
var html = ''
|
||||||
|
var url = document.location.protocol + '//' + document.location.host + '/' + item + '/' + time[0] + ',' + time[1];
|
||||||
html += '<h1>' + result.data.title + ': ' + time[0] + ' - ' + time[1] + '</h1>'
|
html += '<h1>' + result.data.title + ': ' + time[0] + ' - ' + time[1] + '</h1>'
|
||||||
html += '<img src="/' + item + '/240p'+in_+'.jpg">'
|
html += url + '<br><br>'
|
||||||
|
html += '<a href="' + url + '"><img src="/' + item + '/240p'+in_+'.jpg"></a><br>'
|
||||||
|
var current
|
||||||
Ox.sortBy(result.data.layers.keywords, 'value').forEach(function(keyword) {
|
Ox.sortBy(result.data.layers.keywords, 'value').forEach(function(keyword) {
|
||||||
if (keyword['in'] <= out && keyword['out'] >= in_) {
|
if (keyword['in'] <= out && keyword['out'] >= in_) {
|
||||||
html += '<br>' + keyword['value'];
|
var section = keyword['value'].split(': ')[0]
|
||||||
|
if (section != current) {
|
||||||
|
current = section
|
||||||
|
html += '<br><b>' + section + ':</b><br>';
|
||||||
|
}
|
||||||
|
html += keyword['value'].split(': ')[1] + '<br>';
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
document.body.innerHTML = html;
|
document.body.innerHTML = html;
|
||||||
|
|
Loading…
Reference in a new issue