From 21ab2099d644a27a4a8076f096c9723af1aa4164 Mon Sep 17 00:00:00 2001 From: Danny McClelland Date: Sun, 23 Oct 2011 18:11:53 +0200 Subject: [PATCH 1/7] Added better base font-stack. --- public/css/style.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/css/style.css b/public/css/style.css index aae32c4..2d77e53 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1,7 +1,7 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; } body { - font-family: "Helvetica Neue"; + font-family: "Helvetica, “Helvetica Neue”, Arial, sans-serif"; text-rendering: optimizeLegibility; } From 355ea620226932ff23394a0e400c20a4e0782387 Mon Sep 17 00:00:00 2001 From: Danny McClelland Date: Sun, 23 Oct 2011 18:24:10 +0200 Subject: [PATCH 2/7] Added style to page title h2:first-child --- public/css/style.css | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/public/css/style.css b/public/css/style.css index 2d77e53..929ca34 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -10,6 +10,12 @@ a { color:#666; } +h2:first-child { + font-weight:bold; + border-bottom:1px solid #ccc; + padding-bottom: 10px; +} + h2 { margin-bottom:20px; font-size:22px; From b1573152eedd2c9cfdff7f3194247d3d841ce155 Mon Sep 17 00:00:00 2001 From: Danny McClelland Date: Sun, 23 Oct 2011 18:36:13 +0200 Subject: [PATCH 3/7] Spaced the details of the news items out a little. --- public/css/style.css | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 929ca34..dd7fca1 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -69,7 +69,7 @@ nav a { rnav { color:#aaa; position: absolute; - top: 5px; + top: 10px; right: 10px; font-weight:bold; font-size:14px; @@ -123,6 +123,15 @@ news h2 a:visited { color: #999999; } +newslist news p { + padding-top: 10px; +} + +newslist news p a { + background-color: #eee; + padding: 3px; +} + news uparrow, news downarrow { font-size: 16px; cursor: pointer; @@ -243,4 +252,4 @@ userinfo h2 { display:inline; font-size:28px; color: #444; -} +} \ No newline at end of file From 4395f8c84885079be559c044eba7f3e093125375 Mon Sep 17 00:00:00 2001 From: Danny McClelland Date: Sun, 23 Oct 2011 19:05:19 +0200 Subject: [PATCH 4/7] Tidied up page titles and error messages. --- app.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/app.rb b/app.rb index 9a22667..7bb1335 100644 --- a/app.rb +++ b/app.rb @@ -59,15 +59,15 @@ H.set_title "Top News - #{SiteName}" news = get_top_news H.page { - H.h2 {"Top news"}+news_list_to_html(news) + H.h2 {"Top News"}+news_list_to_html(news) } end get '/latest' do - H.set_title "Latest news - #{SiteName}" + H.set_title "Latest News - #{SiteName}" news = get_latest_news H.page { - H.h2 {"Latest news"}+news_list_to_html(news) + H.h2 {"Latest News"}+news_list_to_html(news) } end @@ -234,7 +234,7 @@ get "/editnews/:news_id" do redirect "/login" if !$user news = get_news_by_id(params["news_id"]) - halt(404,"404 - This news does not exist.") if !news + halt(404,"404 - This news item does not exist.") if !news halt(500,"Permission denied.") if $user['id'].to_i != news['user_id'].to_i if news_domain(news) @@ -243,7 +243,7 @@ text = news_text(news) news['url'] = "" end - H.set_title "Edit news - #{SiteName}" + H.set_title "Edit News - #{SiteName}" H.page { news_to_html(news)+ H.submitform { From b2d929dd83ab7534d29758c172600deaf1364562 Mon Sep 17 00:00:00 2001 From: Danny McClelland Date: Sun, 23 Oct 2011 20:25:07 +0200 Subject: [PATCH 5/7] Added blue style to header --- public/css/style.css | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index dd7fca1..9248562 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -25,9 +25,9 @@ h2 { header { display:block; position:relative; - padding: 15px 0px 0px 15px; - background-color:#eee; - border-bottom: 1px #ccc solid; + padding: 15px 0px 10px 15px; + background-color:#7487ab; + border-bottom: 5px #adbad3 solid; } header h1 { @@ -41,6 +41,10 @@ header h1 a { color:#333; } +header a { + color: #fff +} + content { display:block; margin-top:20px; From d24a73ef644905d65bd5cf0c45ae1ad532f4bbbb Mon Sep 17 00:00:00 2001 From: Danny McClelland Date: Sun, 23 Oct 2011 20:36:59 +0200 Subject: [PATCH 6/7] Fixed header so it's always viewable. --- public/css/style.css | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/public/css/style.css b/public/css/style.css index 9248562..6eacc29 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -28,6 +28,11 @@ header { padding: 15px 0px 10px 15px; background-color:#7487ab; border-bottom: 5px #adbad3 solid; + position: fixed; + top: 0; + left: 0; + height: 50px; + width:100%; } header h1 { @@ -47,7 +52,7 @@ header a { content { display:block; - margin-top:20px; + margin-top:70px; margin-bottom:20px; padding: 15px; } From 29bee2c9f2f6ea8ccec7699b104fe76619db6ff2 Mon Sep 17 00:00:00 2001 From: Danny McClelland Date: Sun, 23 Oct 2011 20:46:37 +0200 Subject: [PATCH 7/7] Minor style fixes. --- public/css/style.css | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/public/css/style.css b/public/css/style.css index 6eacc29..e37577e 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -1,7 +1,7 @@ html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, font, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td { margin: 0; padding: 0; border: 0; outline: 0; font-weight: inherit; font-style: inherit; font-size: 100%; font-family: inherit; vertical-align: baseline; } body { - font-family: "Helvetica, “Helvetica Neue”, Arial, sans-serif"; + font-family: Helvetica; text-rendering: optimizeLegibility; } @@ -31,7 +31,7 @@ header { position: fixed; top: 0; left: 0; - height: 50px; + height: 30px; width:100%; } @@ -78,8 +78,8 @@ nav a { rnav { color:#aaa; position: absolute; - top: 10px; - right: 10px; + top: 20px; + right: 20px; font-weight:bold; font-size:14px; }