Remove unnecessary <p> around the links to switch between all and latest articles

This commit is contained in:
Tissevert 2019-02-16 08:11:58 +01:00
parent a320aa9621
commit 9d2411ef61
2 changed files with 6 additions and 8 deletions

View file

@ -72,13 +72,11 @@ function DomRenderer(modules) {
return function(articlePreviews) { return function(articlePreviews) {
return [ return [
modules.dom.make('h2', {innerText: pageTitle(tag, all)}), modules.dom.make('h2', {innerText: pageTitle(tag, all)}),
modules.dom.make('p', {}, [
modules.dom.make('a', { modules.dom.make('a', {
class: 'navigation', class: 'navigation',
innerText: all ? 'See only latest' : 'See all', innerText: all ? 'See only latest' : 'See all',
href: otherUrl(tag, all) href: otherUrl(tag, all)
}) }),
]),
modules.dom.make('div', {class: 'articles'}, articlePreviews.filter(modules.fun.defined)) modules.dom.make('div', {class: 'articles'}, articlePreviews.filter(modules.fun.defined))
]; ];
}; };

View file

@ -40,7 +40,7 @@ instance Page ArticlesList where
content al@(ArticlesList {featured}) = do content al@(ArticlesList {featured}) = do
preview <- Article.preview <$> (Blog.get $skin.$previewLinesCount) preview <- Article.preview <$> (Blog.get $skin.$previewLinesCount)
h2_ . toHtml . pack $ pageTitle al h2_ . toHtml . pack $ pageTitle al
p_ . navigationA [href_ . pack $ otherUrl al] . toHtml . pack $ otherLink al navigationA [href_ . pack $ otherUrl al] . toHtml . pack $ otherLink al
div_ [class_ "articles"] ( div_ [class_ "articles"] (
mapM_ (article False . preview) featured mapM_ (article False . preview) featured
) )