Mercurial > planet-ubiquity-redesign
changeset 3:b7aa5afa19de
Added some basic formatting.
author | Atul Varma <varmaa@toolness.com> |
---|---|
date | Sat, 28 Feb 2009 13:47:20 -0800 |
parents | 2be94bbd7f04 |
children | 0342c0407851 |
files | about-mozilla.css about-mozilla.html about-mozilla.js |
diffstat | 3 files changed, 67 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/about-mozilla.css Sat Feb 28 13:08:03 2009 -0800 +++ b/about-mozilla.css Sat Feb 28 13:47:20 2009 -0800 @@ -1,7 +1,50 @@ body { - font-family: Helvetica; + font-family: Helvetica Neue; + font-size: 9pt; + line-height: 1.4em; +} + +#issue { + display: none; + width: 40em; +} + +#header { + /* Too bad font-stretch isn't implemented in Firefox yet... */ + font-stretch: condensed; + font-variant: small-caps; + font-weight: bold; + font-size: 18pt; + border-bottom: 1px solid black; } -#raw-entry { +#subheader { + display: inline; + font-size: 9pt; + font-weight: normal; + color: gray; +} + +#body { + margin-top: 1em; +} + +.entry { +} + +.headline { + font-weight: bold; +} + +.content { +} + +#raw-issue { display: none; } + +a { + color: black; + text-decoration: none; + border-bottom: 1px dotted gray; +}
--- a/about-mozilla.html Sat Feb 28 13:08:03 2009 -0800 +++ b/about-mozilla.html Sat Feb 28 13:47:20 2009 -0800 @@ -8,7 +8,13 @@ <title></title> </head> <body> -<div id="raw-entry"> +<div id="issue"> + <div id="header">about:mozilla + <div id="subheader">for the week of <span class="date"></span></div> + </div> + <div id="body"></div> +</div> +<div id="raw-issue"> </div> </body> <script src="jquery.js"></script>
--- a/about-mozilla.js Sat Feb 28 13:08:03 2009 -0800 +++ b/about-mozilla.js Sat Feb 28 13:47:20 2009 -0800 @@ -1,19 +1,30 @@ +var ISSUE_URL = "issue-2009-02-24.html"; +var ISSUE_DATE = "February 24, 2009"; + function onIssueLoaded() { - $("#raw-entry a[name]").each( + $("#raw-issue a[name]").each( function(i) { var headline = $(this).next().text(); - var body = $("<div></div>"); + var content = $('<div class="content"></div>'); for (var node = $(this).parent().next(); node.length && !node.find("a[name]").length; node = node.next(":not(.postmetadata)")) - body.append(node.clone()); + content.append(node.clone()); + + var entry = $('<div class="entry"></div>'); + entry.append($('<div class="headline"></div>').text(headline)); + entry.append(content); + $("#body").append(entry); } ); + + $(".date").text(ISSUE_DATE); + $("#issue").fadeIn(); } $(window).ready( function() { - $("#raw-entry").load("issue-2009-02-24.html .entry", + $("#raw-issue").load(ISSUE_URL + " .entry", null, onIssueLoaded); });