Mercurial > daily-edition
changeset 31:a4df72a6d8a1
added header to html view, changed article by-lines
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sun, 03 Jan 2010 11:59:19 -0800 |
parents | 74f23dc049e8 |
children | c0e3b6984986 |
files | daily-edition.css daily-edition.html daily-edition.js publish_edition.py |
diffstat | 4 files changed, 36 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/daily-edition.css Sun Jan 03 11:37:34 2010 -0800 +++ b/daily-edition.css Sun Jan 03 11:59:19 2010 -0800 @@ -14,13 +14,33 @@ display: none; } +#header { + border-bottom: 1px dotted gray; +} + +#header #static { + display: inline; +} + +#header #info { + float: right; +} + .article { padding-top: 1em; padding-bottom: 1em; } .article .author { - font-style: italic; + font-size: 10pt; + display: inline; + font-weight: bold; +} + +.article .date { + font-size: 10pt; + display: inline; + color: gray; } .article .content a {
--- a/daily-edition.html Sun Jan 03 11:37:34 2010 -0800 +++ b/daily-edition.html Sun Jan 03 11:59:19 2010 -0800 @@ -8,6 +8,13 @@ </head> <body> <div id="container"> + <div id="header"> + <div id="static">This is The Daily Edition.</div> + <div id="info"> + <span id="issue">Issue <span id="issue-no"></span></span> + <span id="pub">— <span id="pub-date"></span></span> + </div> + </div> <div id="articles"></div> </div> <div id="templates">
--- a/daily-edition.js Sun Jan 03 11:37:34 2010 -0800 +++ b/daily-edition.js Sun Jan 03 11:59:19 2010 -0800 @@ -9,6 +9,9 @@ var info = JSON.parse(req.responseText); req = null; + $("#issue-no").text(info.id + 1); + $("#pub-date").text(info.pubDate.join(".")); + info.authors.forEach( function(author) { if (author in info.articles)
--- a/publish_edition.py Sun Jan 03 11:37:34 2010 -0800 +++ b/publish_edition.py Sun Jan 03 11:59:19 2010 -0800 @@ -227,10 +227,13 @@ save(issues, ISSUES_FILENAME) if not dry_run: - json.dump({'authors': names, 'articles': filtered_articles}, + json.dump({'id': issue_id, + 'authors': names, + 'articles': filtered_articles, + 'pubDate': to_date_tuple(date.today())}, open(JSON_FILENAME, 'w')) - logging.info('wrote %s (issue #%d).' % (JSON_FILENAME, issue_id)) + logging.info('wrote %s (issue #%d).' % (JSON_FILENAME, issue_id+1)) parser_options = { ('-w', '--refresh-whoisi',):