add a footer link bar, add /privacy and /about

if these templates (ignored by git) are not present, just show some
text rather than raise an error
This commit is contained in:
joshua stein 2013-10-18 15:55:20 -05:00
parent 66f433176a
commit aeb25d22b6
5 changed files with 49 additions and 7 deletions

4
.gitignore vendored
View file

@ -20,6 +20,10 @@
vendor/bundle
public/assets
# templates to be created per-site
app/views/home/privacy.*
app/views/home/about.*
# files added in production
lib/tasks/deploy.rake
config/initializers/production.rb

View file

@ -214,7 +214,7 @@ input:disabled, button:disabled {
div#wrapper {
margin-left: auto;
margin-right: auto;
padding-bottom: 5em;
padding-bottom: 2em;
min-width: 800px;
max-width: 1000px;
}
@ -298,14 +298,15 @@ div#inside {
/* footer */
div#footer {
clear: both;
color: gray;
font-style: italic;
margin-bottom: 2em;
padding-top: 1em;
float: right;
font-weight: bold;
margin-top: 1.5em;
padding-right: 42px;
}
div#footer a {
color: gray;
color: #999;
text-decoration: none;
padding-left: 0.75em;
}
@ -515,6 +516,10 @@ div.story_content {
margin-bottom: 3em;
}
div.morelink {
float: left;
}
div.morelink,
div.page_link_buttons {
margin-top: 1.5em;

View file

@ -88,6 +88,26 @@ class HomeController < ApplicationController
end
end
def privacy
begin
render :action => "privacy"
rescue
render :text => "<div class=\"box wide\">" <<
"You apparently have no privacy." <<
"</div>", :layout => "application"
end
end
def about
begin
render :action => "about"
rescue
render :text => "<div class=\"box wide\">" <<
"A mystery." <<
"</div>", :layout => "application"
end
end
private
def find_stories_for_user_and_tag_and_newest_and_by_user(user, tag = nil,
newest = false, by_user = nil)

View file

@ -102,6 +102,16 @@
<% end %>
<%= yield %>
<div id="footer">
<a href="/moderations">Moderation Log</a>
<% if @user %>
<a href="/invitations">Invitation Queue</a>
<% end %>
<a href="/privacy">Privacy</a>
<a href="/about">About</a>
</div>
<div class="clear"></div>
</div>
</div>
</body>

View file

@ -88,4 +88,7 @@ Lobsters::Application.routes.draw do
get "/moderations" => "moderations#index"
get "/moderations/page/:page" => "moderations#index"
get "/privacy" => "home#privacy"
get "/about" => "home#about"
end