From 04a7c00830ce59943da1200a82fd385008f24038 Mon Sep 17 00:00:00 2001 From: Jason Woofenden Date: Thu, 17 Nov 2011 17:20:24 -0500 Subject: [PATCH] hilight current nav item, visual cleanup --- code/cms.php | 3 +++ style.css | 18 +++++++++++++----- style.less | 22 +++++++++++++++++----- template.html | 4 ++-- 4 files changed, 35 insertions(+), 12 deletions(-) diff --git a/code/cms.php b/code/cms.php index 6111440..d8b6452 100644 --- a/code/cms.php +++ b/code/cms.php @@ -5,6 +5,9 @@ function cms_display($basename, &$tem) { $nav_items = db_get_assocs('cms_pages', "coalesce(nullif(nav_title,''), title) as title,filename", 'where navbar!=0 order by navbar'); if($nav_items) { foreach($nav_items as &$nav_item) { + if($nav_item['filename'] == $basename) { + $nav_item['current'] = true; + } if($nav_item['filename'] == 'index') { $nav_item['filename'] = './'; } diff --git a/style.css b/style.css index ebad33f..25233b1 100644 --- a/style.css +++ b/style.css @@ -36,20 +36,28 @@ nav { padding: 10px; background: #ddffff; } -nav a { - display: block; +nav h3 span { + color: #ddffff; +} +nav h3.current span { + color: inherit; +} +nav h3.current a { + text-decoration: none; } #main-body { float: left; width: 704px; - padding: 18px 18px 18px 18px; + padding: 18px 18px 54px 18px; background: #ffffff; } footer { clear: both; - width: 940px; - height: 50px; + width: 904px; + padding: 18px; + text-align: center; background: #ddddff; + font-size: 80%; } #wfpl_messages { border: 2px solid red; diff --git a/style.less b/style.less index 0545b5f..3d32093 100644 --- a/style.less +++ b/style.less @@ -46,23 +46,35 @@ nav { width: @nav-width - 2*@nav-padding; padding: @nav-padding; background: @nav-color; - a { - display: block; + h3 { + span { + color: @nav-color; + } + } + h3.current { + span { + color: inherit; + } + a { + text-decoration: none; + } } } #main-body { float: left; width: @site-main-body-width; - padding: @site-gutter-width @site-gutter-width @site-gutter-width @site-gutter-width; + padding: @site-gutter-width @site-gutter-width 3*@site-gutter-width @site-gutter-width; background: @site-body-color; } footer { clear: both; - width: @site-width; - height: 50px; + width: @site-width - 2*@site-gutter-width; + padding: @site-gutter-width; + text-align: center; background: @site-footer-color; + font-size: 80%; } #wfpl_messages { diff --git a/template.html b/template.html index b996076..a6330d9 100644 --- a/template.html +++ b/template.html @@ -12,13 +12,13 @@ - +
header image here
-- 1.7.10.4