# HG changeset patch # User Atul Varma # Date 1262550237 28800 # Node ID c0e3b69849863a7092418a78faa61a931dcaa2d5 # Parent a4df72a6d8a152b38dd38ede5ffaea45e101a30f normalized html output a bit diff -r a4df72a6d8a1 -r c0e3b6984986 daily-edition.css --- a/daily-edition.css Sun Jan 03 11:59:19 2010 -0800 +++ b/daily-edition.css Sun Jan 03 12:23:57 2010 -0800 @@ -26,6 +26,10 @@ float: right; } +#header #info #issue-no, #header #info #pub-date { + color: gray; +} + .article { padding-top: 1em; padding-bottom: 1em; @@ -43,14 +47,21 @@ color: gray; } +/* Get rid of annoying
's at the beginning of articles. */ +.article .content br { + display: none; +} + .article .content a { color: black; } +a:hover { + background: yellow; +} + .article .content img { display: none; - border: none; - padding: 0.5em; } .article .title { diff -r a4df72a6d8a1 -r c0e3b6984986 daily-edition.js --- a/daily-edition.js Sun Jan 03 11:59:19 2010 -0800 +++ b/daily-edition.js Sun Jan 03 12:23:57 2010 -0800 @@ -25,9 +25,15 @@ var html = [content.value for each (content in article.content) if (content.type == "text/html")]; - if (html.length > 0) - div.find(".content").html(html[0]); - else + if (html.length > 0) { + var content = div.find(".content"); + content.html(html[0]); + if (content.get(0).firstChild.nodeType == 3) + // The child isn't wrapped in a containing block + // element, so do that to ensure it has some + // padding from everything around it. + content.html("

" + html[0] + "

"); + } else console.warn("no html content for", article, "by", author); div.find(".date").text(date);