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 { diff --git a/public/css/style.css b/public/css/style.css index aae32c4..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 Neue"; + font-family: Helvetica; text-rendering: optimizeLegibility; } @@ -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; @@ -19,9 +25,14 @@ 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; + position: fixed; + top: 0; + left: 0; + height: 30px; + width:100%; } header h1 { @@ -35,9 +46,13 @@ header h1 a { color:#333; } +header a { + color: #fff +} + content { display:block; - margin-top:20px; + margin-top:70px; margin-bottom:20px; padding: 15px; } @@ -63,8 +78,8 @@ nav a { rnav { color:#aaa; position: absolute; - top: 5px; - right: 10px; + top: 20px; + right: 20px; font-weight:bold; font-size:14px; } @@ -117,6 +132,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; @@ -237,4 +261,4 @@ userinfo h2 { display:inline; font-size:28px; color: #444; -} +} \ No newline at end of file