diff options
author | elijah <elijah@riseup.net> | 2013-06-23 22:18:28 -0700 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2013-06-23 22:18:28 -0700 |
commit | 7190ef710f246ddd86faed3c62bcfb5026fcbf83 (patch) | |
tree | 2fd0ee912c24556ec936c70850a94cbea8a3c7f7 /app | |
parent | fdf67344a80fcde0aab21c27d00412eeca609ca1 (diff) |
new home page
Diffstat (limited to 'app')
-rw-r--r-- | app/assets/stylesheets/leap.scss | 22 | ||||
-rw-r--r-- | app/helpers/navigation_helper.rb | 82 | ||||
-rw-r--r-- | app/views/home/_home_text.html.haml | 7 | ||||
-rw-r--r-- | app/views/home/index.html.haml | 12 |
4 files changed, 34 insertions, 89 deletions
diff --git a/app/assets/stylesheets/leap.scss b/app/assets/stylesheets/leap.scss index 6b44986..a7d6261 100644 --- a/app/assets/stylesheets/leap.scss +++ b/app/assets/stylesheets/leap.scss @@ -45,6 +45,10 @@ input.large { line-height: $baseLineHeight * 1.5; } +.p { + @extend p; +} + // // FORMS // @@ -99,6 +103,24 @@ input, textarea { } } +.home-buttons { + .span6 { + margin-bottom: 20px; + } + div { + a { + width: 10em; + margin-bottom: 4px; + display: block; + } + .info { + } + span { + } + } +} + + // // Side Navigation // diff --git a/app/helpers/navigation_helper.rb b/app/helpers/navigation_helper.rb deleted file mode 100644 index 19cb934..0000000 --- a/app/helpers/navigation_helper.rb +++ /dev/null @@ -1,82 +0,0 @@ -module NavigationHelper - - # - # used to create a side navigation link. - # - # Signature is the same as link_to, except it accepts an :active value in the html_options - # - def link_to_navigation(*args) - if args.last.is_a? Hash - html_options = args.pop.dup - active_class = html_options.delete(:active) ? 'active' : nil - html_options[:class] = [html_options[:class], active_class].join(' ') - args << html_options - else - active_class = nil - end - content_tag :li, :class => active_class do - link_to(*args) - end - end - - # - # returns true if params[:action] matches one of the args. - # - def action?(*actions) - actions.detect do |action| - if action.is_a? String - action == action_string - elsif action.is_a? Symbol - if action == :none - action_string == nil - else - action == action_symbol - end - end - end - end - - # - # returns true if params[:controller] matches one of the args. - # - # for example: - # controller?(:me, :home) - # controller?('groups/') <-- matches any controller in namespace 'groups' - # - def controller?(*controllers) - controllers.each do |cntr| - if cntr.is_a? String - if cntr.ends_with?('/') - return true if controller_string.starts_with?(cntr.chop) - end - return true if cntr == controller_string - elsif cntr.is_a? Symbol - return true if cntr == controller_symbol - end - end - return false - end - - private - - def controller_string - @controller_string ||= params[:controller].to_s.gsub(/^\//, '') - end - - def controller_symbol - @controller_symbol ||= params[:controller].gsub(/^\//,'').gsub('/','_').to_sym - end - - def action_string - params[:action] - end - - def action_symbol - @action_symbol ||= if params[:action].present? - params[:action].to_sym - else - nil - end - end - -end diff --git a/app/views/home/_home_text.html.haml b/app/views/home/_home_text.html.haml index 1055091..4de4b5e 100644 --- a/app/views/home/_home_text.html.haml +++ b/app/views/home/_home_text.html.haml @@ -1,3 +1,6 @@ -Welcome to the LEAP web application. +%h1= t(:welcome, :provider => APP_CONFIG[:domain]) -For more information, visit #{link_to('leap.se', 'https://leap.se')}
\ No newline at end of file +%p + We provide secure communication services, including encrypted internet, email (coming soon), and chat (coming later). + += home_page_buttons diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 0b3bbf9..96a3aee 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -1,8 +1,10 @@ -.row-fluid - .span8 - = render 'home_text' - .span4 - = render '/login_or_signup' +/ .row-fluid +/ .span8 +/ = render 'home_text' +/ .span4 +/ = render '/login_or_signup' + += render 'home_text' - if Rails.env == 'development' .row-fluid |