Frontpage and style tweaks
Added whitespace and centering to latest tags. Show more latest posts.
Distinguish refs from hyperlinks by making them gray.
font-size: 16pt;
}
+#latest-tags {
+ text-align: center;
+ line-height: 2em;
+}
+
+#latest-tags a {
+ margin: 0 0.75em;
+}
+
#latest-posts {
- height: 92pt;
+ height: 184pt;
overflow: hidden;
}
#latest-posts .record {
font-size: 12pt;
- margin: 4pt 0;
+ margin: 8pt 0;
}
.author {
<div id="welcome">
<div id="latest">
- <h2>Latest tags</h2>
- <div id="latest-tags"></div>
<h2>Latest posts</h2>
<div id="latest-posts"></div>
+ <h2>Latest tags</h2>
+ <div id="latest-tags"></div>
</div>
<h2>I am 12 and what is this</h2>
'<div class="record">#{data}<div class="info">Posted #{date}</div></div>'
);
var tagRecordTemplate = new Template(
- '<div class="record">#{data}<div class="info">Posted by <a class="author" href="/\##{author}">@#{author}</a> on #{date}</div></div>'
+ '<div class="record">#{data}<div class="info">Posted by <a class="author ref" href="/\##{author}">@#{author}</a> on #{date}</div></div>'
);
var latestRecordsTemplate = new Template(
- '<div class="record"><a class="author" href="/\##{author}">@#{author}</a> #{data}</div>'
+ '<div class="record"><a class="author ref" href="/\##{author}">@#{author}</a> #{data}</div>'
);
// Page elements
// Show the first five
tickerHead = $('latest-posts').firstChild;
- for (var i = 0; i < 5 && tickerHead; i++) {
+ for (var i = 0; i < 10 && tickerHead; i++) {
tickerHead.show();
tickerHead = tickerHead.nextSibling;
}
j.tags.each(function(v) {
var a = new Element('a', {href: '/#tag/' + v});
a.insert('#' + v);
+ a.className = 'ref';
$('latest-tags').insert(a);
$('latest-tags').appendChild(document.createTextNode(' '));
});