diff options
-rw-r--r-- | app/controllers/home_controller.rb | 4 | ||||
-rw-r--r-- | app/views/home/index.html.haml | 23 | ||||
-rw-r--r-- | app/views/layouts/_content.html.haml | 2 | ||||
-rw-r--r-- | app/views/layouts/application.html.haml | 3 | ||||
-rw-r--r-- | app/views/layouts/home.html.haml | 12 | ||||
-rw-r--r-- | config/application.rb | 6 |
6 files changed, 34 insertions, 16 deletions
diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 120541e..be26eb6 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -1,9 +1,9 @@ - class HomeController < ApplicationController + layout 'home' + def index if logged_in? redirect_to user_overview_url(current_user) end - debugger if params[:debug] end end diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 9b82cf3..258ccec 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -1,14 +1,17 @@ -%h1= t(:welcome, :provider => APP_CONFIG[:domain]) +#main + .container-fluid + .row-fluid + %h1= t(:welcome, :provider => APP_CONFIG[:domain]) -%p - We provide secure communication services, including encrypted internet, email (coming soon), and chat (coming later). + %p + We provide secure communication services, including encrypted internet, email (coming soon), and chat (coming later). -= home_page_buttons + = home_page_buttons -- if Rails.env == 'development' - .row-fluid - %hr - %p - = link_to "fetch a cert", cert_path + - if Rails.env == 'development' + .row-fluid + %hr + %p + = link_to "fetch a cert", cert_pat +- # TODO: will want link to donation (anonymous payment), which is new_payment_path -- # TODO: will want link to donation (anonymous payment), which is new_payment_path
\ No newline at end of file diff --git a/app/views/layouts/_content.html.haml b/app/views/layouts/_content.html.haml index 19af627..d5c2fa3 100644 --- a/app/views/layouts/_content.html.haml +++ b/app/views/layouts/_content.html.haml @@ -1,5 +1,5 @@ -# --# Partial for displaying the page content. This is the only place that content should be displayed. +-# Partial for displaying the page content. This is the only place that content should be displayed (except for home layout) -# - if content_for?(:content) diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 380f92d..816b558 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,8 +11,7 @@ = yield(:head) %body #masthead - - if params[:controller] != 'home' - = render 'layouts/masthead' + = render 'layouts/masthead' #main .container-fluid - if logged_in? diff --git a/app/views/layouts/home.html.haml b/app/views/layouts/home.html.haml new file mode 100644 index 0000000..e6fa15d --- /dev/null +++ b/app/views/layouts/home.html.haml @@ -0,0 +1,12 @@ +!!! +%html + %head + %meta{:content => "width=device-width, initial-scale=1.0", :name => "viewport"} + %title= html_title + %meta{:content => content_for?(:description) ? yield(:description) : "LEAP Web", :name => "description"} + = stylesheet_link_tag "application", :media => "all" + = javascript_include_tag "application" + = csrf_meta_tags + = yield(:head) + %body + = yield
\ No newline at end of file diff --git a/config/application.rb b/config/application.rb index ec25da5..354127b 100644 --- a/config/application.rb +++ b/config/application.rb @@ -17,7 +17,11 @@ end APP_CONFIG = ["defaults.yml", "config.yml"].inject({}) {|config, file| filepath = File.expand_path(file, File.dirname(__FILE__)) - config.merge(File.exists?(filepath) ? YAML.load_file(filepath)[Rails.env] : {}) + if File.exists?(filepath) && settings = YAML.load_file(filepath)[Rails.env] + config.merge(settings) + else + config + end }.with_indifferent_access module LeapWeb |