From f1252cb2a49bbad70d3fa9c5d581d2c0bd95accd Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Wed, 3 Feb 2010 21:53:58 +1100 Subject: [PATCH] More tweaks to the archive pages --- content/articles/page.html | 4 +++- content/personal/articles/page.html | 4 +++- content/technical/articles/page.html | 4 +++- layouts/article.html | 2 +- layouts/articles.html | 15 ++++++++------- output/css/style.css | 16 ++++------------ output/js/articles.js | 9 ++------- output/js/common.js | 10 ++++++++++ 8 files changed, 34 insertions(+), 30 deletions(-) create mode 100644 output/js/common.js diff --git a/content/articles/page.html b/content/articles/page.html index a23abbe..34ed09b 100644 --- a/content/articles/page.html +++ b/content/articles/page.html @@ -1 +1,3 @@ - + diff --git a/content/personal/articles/page.html b/content/personal/articles/page.html index a23abbe..34ed09b 100644 --- a/content/personal/articles/page.html +++ b/content/personal/articles/page.html @@ -1 +1,3 @@ - + diff --git a/content/technical/articles/page.html b/content/technical/articles/page.html index a23abbe..34ed09b 100644 --- a/content/technical/articles/page.html +++ b/content/technical/articles/page.html @@ -1 +1,3 @@ - + diff --git a/layouts/article.html b/layouts/article.html index b667cc9..72bf4d4 100644 --- a/layouts/article.html +++ b/layouts/article.html @@ -7,6 +7,6 @@

<%= @article[:title] %> - A one sentence summary of this post would go here this one is longer then the other one. + <%= @item[:summary] %>

diff --git a/layouts/articles.html b/layouts/articles.html index 4cdc39c..06e9103 100644 --- a/layouts/articles.html +++ b/layouts/articles.html @@ -3,6 +3,7 @@ <%= render 'head_common' %> + <% if @item.identifier =~ %r{/page/$} %> @@ -10,17 +11,16 @@ <% else %> <% end %> <%= render 'header' %> +

Archives

-

Archives

<% menu = [ @@ -33,8 +33,9 @@ <% menu.each do |menu_item| label, count = menu_item path = (label != "All" ? '/' + label.downcase : '') + "/articles/" + active = (@item.identifier.sub(%r{page/$}, '') == path) %> -
  • ><%= label %> (<%= count %>)
  • +
  • ><%= label %> (<%= count %>)
  • <% end %>
    <%= render 'footer' %> diff --git a/output/css/style.css b/output/css/style.css index 80ab0d1..9933e32 100644 --- a/output/css/style.css +++ b/output/css/style.css @@ -3,14 +3,14 @@ body { font-size: 62.5%; background: #fff; color: #223; -/* padding: 2em;*/ } -p,li { +p,li,div { font-size: 16px; +} +p,li { line-height: 1.2; } - p { margin: 0 0 1em 0; } @@ -109,21 +109,13 @@ pre { } ul#menu { -/* list-style: none;*/ float: right; -/* margin: 0;*/ padding-right: 0.25em; } ul#menu li { -/* display: inline;*/ font-size: inherit; } -/*body.article h1 { - padding-left: 20px; - padding-right: 20px; -}*/ - #content { padding: 0 20px; clear: both; @@ -143,7 +135,7 @@ body.articles #content { } #footer .copyright { font-family: "Helvetica Neue", Helvetica, "Liberation Sans", "Bitstream Vera Sans", Tahoma, Geneva, Arial, sans-serif; - font-size: 1.4em; + font-size: 14px; padding-top: 1em; display: block; font-weight: 200; diff --git a/output/js/articles.js b/output/js/articles.js index e0d0576..2476839 100644 --- a/output/js/articles.js +++ b/output/js/articles.js @@ -70,13 +70,8 @@ // Since the event is only triggered when the hash changes, we need to trigger // the event now, to handle the hash the page may have loaded with. $(window).trigger('hashchange'); - $('.pagination').show(); - $('#search').show(); - - if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0) { - // WebKit browser - $('#search input').css('paddingTop', 0); - } + show_javascript_widgets(); + webkit_search_tweak(); }); }; diff --git a/output/js/common.js b/output/js/common.js new file mode 100644 index 0000000..13f5b94 --- /dev/null +++ b/output/js/common.js @@ -0,0 +1,10 @@ +function show_javascript_widgets() { + $('.pagination').show(); + $('#search').show(); +}; + +function webkit_search_tweak() { + if(navigator.userAgent.toLowerCase().indexOf('webkit') >= 0) { + $('#search input').css('paddingTop', 0); + } +};