From 4d7b8e8bc62f697e18c9eacfee42dc8d9873b820 Mon Sep 17 00:00:00 2001 From: Chip Black Date: Mon, 7 Feb 2011 02:14:37 -0800 Subject: [PATCH] Frontpage and style tweaks Added whitespace and centering to latest tags. Show more latest posts. Distinguish refs from hyperlinks by making them gray. --- www/css/blerg.css | 13 +++++++++++-- www/index.html | 4 ++-- www/js/blerg.js | 7 ++++--- 3 files changed, 17 insertions(+), 7 deletions(-) diff --git a/www/css/blerg.css b/www/css/blerg.css index 9de598b..f818e10 100644 --- a/www/css/blerg.css +++ b/www/css/blerg.css @@ -135,14 +135,23 @@ h1, h2, h3 { 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 { diff --git a/www/index.html b/www/index.html index 9ca1cbb..ae652ab 100644 --- a/www/index.html +++ b/www/index.html @@ -56,10 +56,10 @@
-

Latest tags

-

Latest posts

+

Latest tags

+

I am 12 and what is this

diff --git a/www/js/blerg.js b/www/js/blerg.js index 22fbded..1851a0f 100644 --- a/www/js/blerg.js +++ b/www/js/blerg.js @@ -8,10 +8,10 @@ var recordTemplate = new Template( '
#{data}
Posted #{date}
' ); var tagRecordTemplate = new Template( - '
#{data}
Posted by @#{author} on #{date}
' + '
#{data}
Posted by @#{author} on #{date}
' ); var latestRecordsTemplate = new Template( - '
@#{author} #{data}
' + '
@#{author} #{data}
' ); // Page elements @@ -447,7 +447,7 @@ function startTicker() { // 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; } @@ -470,6 +470,7 @@ function loadLatest() { 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(' ')); }); -- 2.25.1