From 0dcb34a4d6775c2aa62bdebd77a843029c1b0375 Mon Sep 17 00:00:00 2001 From: Wesley Moore Date: Sun, 19 Aug 2018 09:18:26 +1000 Subject: [PATCH] Small design and layout tweaks --- Rules | 1 + content/screen.sass | 25 +++++++++---------------- layouts/_head.html | 9 ++++++--- layouts/_header.html | 5 ++--- layouts/article.html | 39 +++++++++++++++++---------------------- layouts/default.html | 1 - layouts/page.html | 4 ++++ layouts/page.yaml | 2 ++ lib/default.rb | 1 + output/js/application.js | 4 ---- 10 files changed, 42 insertions(+), 49 deletions(-) create mode 100644 layouts/page.html create mode 100644 layouts/page.yaml diff --git a/Rules b/Rules index 4ea3c22..d5019a0 100644 --- a/Rules +++ b/Rules @@ -48,6 +48,7 @@ end compile '*' do filter :rdiscount + layout 'page' layout 'default' filter :rubypants end diff --git a/content/screen.sass b/content/screen.sass index bfbc29a..fe2fd2d 100644 --- a/content/screen.sass +++ b/content/screen.sass @@ -1,4 +1,5 @@ $ans-serif: Carlito, Calibri, sans-serif +$header-colour: #242424 body font-family: $ans-serif @@ -134,7 +135,7 @@ body > header font-size: 18px color: white padding: 0.5em - background: #1C1C1C + background-color: $header-colour a -webkit-transition: border-bottom-color 500ms ease-out @@ -147,16 +148,16 @@ body > header &:hover border-bottom-color: rgba(255, 255, 255, 1.0) - span - display: none - #menu float: right padding-right: 0.25em li - font-size: inherit + font-size: 14px + font-weight: bold + text-transform: uppercase + letter-spacing: 0.5px #content @@ -303,17 +304,12 @@ body.articles #content nav #respond - margin-top: 10px - padding: 10px - background-color: #ddd + margin: 3em 0 clear: both h2 margin-top: 0 - .short - font-size: smaller - #content .published font-family: $ans-serif @@ -521,13 +517,10 @@ body.weather body font-size: 20px - body > header span - float: right - display: inline - cursor: pointer + body > header + text-align: center #menu - display: none float: none padding: 0.5em 0 0 0 line-height: 2 diff --git a/layouts/_head.html b/layouts/_head.html index 434fa3d..498b9c2 100644 --- a/layouts/_head.html +++ b/layouts/_head.html @@ -1,17 +1,20 @@ <%=h [@item[:title], 'WezM.net by Wesley Moore'].compact.join(' - ') %> + <% if @item[:extra] %><% end %> <% if @item[:keywords] %><% end %> - - - + + + + + diff --git a/layouts/_header.html b/layouts/_header.html index e08f61a..1e7166f 100644 --- a/layouts/_header.html +++ b/layouts/_header.html @@ -1,12 +1,11 @@
WezM.net - Menu
diff --git a/layouts/article.html b/layouts/article.html index e13f80e..ec02789 100644 --- a/layouts/article.html +++ b/layouts/article.html @@ -1,24 +1,19 @@ <% post_date = WezM::Helpers.parse_post_date(@item) %> -<% short = @item[:short_url] %> -
- Published on - - <%= post_date.strftime('%a') %>, - <%= post_date.day %> - <%= post_date.strftime('%B') %> - <%= post_date.year %> - -
-<%= yield %> -
-

- Comment icon - Stay in touch! -

-

Follow me on Twitter, or Mastodon, subscribe to the feed, or send me an email. -

- -
- Short URL: <%= short %> +
+ diff --git a/layouts/default.html b/layouts/default.html index 6c4d783..3e61a9a 100644 --- a/layouts/default.html +++ b/layouts/default.html @@ -12,7 +12,6 @@ > <%= render '_header' %>
-

<%=h @item[:title] %>

<%= yield %>
<%= render '_footer' %> diff --git a/layouts/page.html b/layouts/page.html new file mode 100644 index 0000000..261b598 --- /dev/null +++ b/layouts/page.html @@ -0,0 +1,4 @@ +
+

<%=h @item[:title] %>

+ <%= yield %> +
diff --git a/layouts/page.yaml b/layouts/page.yaml new file mode 100644 index 0000000..20670d5 --- /dev/null +++ b/layouts/page.yaml @@ -0,0 +1,2 @@ +--- {} + diff --git a/lib/default.rb b/lib/default.rb index 1a3d129..36a3133 100644 --- a/lib/default.rb +++ b/lib/default.rb @@ -2,6 +2,7 @@ # before nanoc starts compiling. require 'json' +require 'rouge' include Nanoc::Helpers::Rendering include Nanoc::Helpers::Blogging diff --git a/output/js/application.js b/output/js/application.js index 33e4944..a71f037 100644 --- a/output/js/application.js +++ b/output/js/application.js @@ -1,8 +1,4 @@ jQuery(function() { - $('body > header span').click(function() { - $('#menu').slideToggle('normal'); - }) - /*** Article Search ***/ function reset_search() { $('#articles li').css({height: 'auto', opacity: 1.0});