Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Font changes & Page titles #40

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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)
Expand All @@ -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 {
Expand Down
40 changes: 32 additions & 8 deletions public/css/style.css
Original file line number Diff line number Diff line change
@@ -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;
}

Expand All @@ -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;
Expand All @@ -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 {
Expand All @@ -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;
}
Expand All @@ -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;
}
Expand Down Expand Up @@ -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;
Expand Down Expand Up @@ -237,4 +261,4 @@ userinfo h2 {
display:inline;
font-size:28px;
color: #444;
}
}