From 33a6b79bd78f1903011367f6a5adf2f91d160f74 Mon Sep 17 00:00:00 2001 From: John Firebaugh Date: Tue, 16 Jul 2013 15:59:09 -0700 Subject: [PATCH] Add help page --- app/assets/stylesheets/common.css.scss | 43 +++++++++++++++++++++++++- app/controllers/site_controller.rb | 3 ++ app/views/layouts/site.html.erb | 10 ++---- app/views/site/help.html.erb | 12 +++++++ config/locales/en.yml | 31 +++++++++++++------ config/routes.rb | 1 + 6 files changed, 83 insertions(+), 17 deletions(-) create mode 100644 app/views/site/help.html.erb diff --git a/app/assets/stylesheets/common.css.scss b/app/assets/stylesheets/common.css.scss index 42467adb3..c9b7046f9 100644 --- a/app/assets/stylesheets/common.css.scss +++ b/app/assets/stylesheets/common.css.scss @@ -1108,7 +1108,8 @@ ul.results-list li { border-bottom: 1px solid #ccc; } .user-terms, .user-confirm, .site-copyright, -.site-welcome { +.site-welcome, +.site-help { #content { max-width: 740px; } @@ -2559,3 +2560,43 @@ a.button { border-radius: 4px; } } + +.site-help { + #content { + a { + display: inline-block; + width: 45%; + height: 200px; + float: left; + text-align: center; + color: #000; + margin: 10px; + padding: 10px; + border-radius: 10px; + } + + h3 { + margin-top: 50px; + } + + a:hover { + text-decoration: none; + } + + .welcome { + background-color: #D6FFB9; + } + + .learnosm { + background-color: #BAFCFF; + } + + .help { + background-color: #FCFFB9; + } + + .wiki { + background-color: #FFB9CC; + } + } +} diff --git a/app/controllers/site_controller.rb b/app/controllers/site_controller.rb index 280f39fd8..4945aaa4f 100644 --- a/app/controllers/site_controller.rb +++ b/app/controllers/site_controller.rb @@ -71,6 +71,9 @@ class SiteController < ApplicationController def welcome end + def help + end + def preview render :text => RichText.new(params[:format], params[:text]).to_html end diff --git a/app/views/layouts/site.html.erb b/app/views/layouts/site.html.erb index ed8a6cf18..461257207 100644 --- a/app/views/layouts/site.html.erb +++ b/app/views/layouts/site.html.erb @@ -39,13 +39,6 @@ <% end %>