diff --git a/share/js/domRenderer.js b/share/js/domRenderer.js index aa4a57b..1a28d36 100644 --- a/share/js/domRenderer.js +++ b/share/js/domRenderer.js @@ -83,12 +83,30 @@ function DomRenderer(modules) { return function(articlePreviews) { return [ modules.dom.make('h2', {innerText: pageTitle(tag, all)}), - modules.dom.make('a', { - innerText: all ? blog.wording.latestLink : blog.wording.allLink, - href: otherUrl(tag, all) - }), - modules.dom.make('div', {class: 'articles'}, articlePreviews.filter(modules.fun.defined)) + modules.dom.make('ul', {}, articlesListLinks(tag, all)), + modules.dom.make('div', {class: 'articles'}, + articlePreviews.filter(modules.fun.defined) + ) ]; }; } + + function articlesListLinks(tag, all) { + var links = [ + modules.dom.make('a', { + innerText: all ? blog.wording.latestLink : blog.wording.allLink, + href: otherUrl(tag, all), + class: 'other' + }) + ]; + if(blog.hasRSS) { + links.unshift(modules.dom.make('a', { + innerText: blog.wording.rssLink, + href: 'rss.xml', + class: 'RSS', + title: modules.template.render('rssTitle', {tag: tag}) + })); + } + return links.map(function(e) {return modules.dom.make('li', {}, [e]);}); + } }