Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Font changes & Page titles #40

Open
wants to merge 7 commits into from

1 participant

@dannymcc

Helvetica Neue isn't available on Windows, I don't think. So I've added the following font stack:

Helvetica, “Helvetica Neue”, Arial, sans-serif

The fallback should look fine in most browsers.

I've also added a slightly different style for the first h2 on the page, the sub page title.

I've also tidied up some of the page titles, nothing major, just capitalised some of the words so it's consistent.

A screenshot of the style changes

Style changes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 37 additions and 13 deletions.
  1. +5 −5 app.rb
  2. +32 −8 public/css/style.css
View
10 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 {
View
40 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;
-}
+}
Something went wrong with that request. Please try again.