diff options
author | elijah <elijah@riseup.net> | 2014-01-22 02:18:30 -0800 |
---|---|---|
committer | elijah <elijah@riseup.net> | 2014-01-23 11:37:49 -0800 |
commit | 67650ea9fead442cb2f66a2fbbec452c890d0775 (patch) | |
tree | 22e2042d2b416f01f645f75901f2bf077329f412 | |
parent | 87383e624855def55e13d238b2f20b79c418c1d9 (diff) |
added a default footer with links to privacy policy, tos, pricing, about us, contact.
-rw-r--r-- | app/assets/stylesheets/leap.scss | 58 | ||||
-rw-r--r-- | app/views/home/_content.html.haml | 14 | ||||
-rw-r--r-- | app/views/home/_masthead.html.haml | 6 | ||||
-rw-r--r-- | app/views/home/index.html.haml | 42 | ||||
-rw-r--r-- | app/views/layouts/_footer.html.haml | 21 | ||||
-rw-r--r-- | app/views/layouts/_masthead.html.haml | 5 | ||||
-rw-r--r-- | app/views/layouts/application.html.haml | 21 | ||||
-rw-r--r-- | config/locales/en.yml | 2 |
8 files changed, 124 insertions, 45 deletions
diff --git a/app/assets/stylesheets/leap.scss b/app/assets/stylesheets/leap.scss index 02b6241..120b978 100644 --- a/app/assets/stylesheets/leap.scss +++ b/app/assets/stylesheets/leap.scss @@ -4,7 +4,8 @@ // This is a trick to be able to use bootstrap fluid layout and also have a max-width. // It is like having your cake and eating it too. -#main { +// not needed in bootstrap 3 +#main, #masthead-text { *zoom: 1; margin-left: auto; margin-right: auto; @@ -212,6 +213,9 @@ input, textarea { .sitename { font-weight: bold; } + a { + color: $textColor; + } } .home-buttons { @@ -265,3 +269,55 @@ input, textarea { .overview li { padding: 6px 0; } + +// +// STICKY FOOTER for BOOSTRAP 2 +// http://getbootstrap.com/2.3.2/examples/sticky-footer.html +// when upgrading to bootstrap 3, use this instead: +// http://getbootstrap.com/examples/sticky-footer/ +// + +$footer-height: 60px; +$footer-border-width: 1px; +$footer-gutter: 20px; // vertical gap above footer +$footer-combined: $footer-height + $footer-border-width + $footer-gutter; +$footer-color: $grayLighter !default; + +html, body { + height: 100%; + padding: 0; + margin: 0; +} + +#wrap { + min-height: 100%; + height: auto !important; + height: 100%; + margin: 0 auto -1 * ($footer-height + $footer-border-width + $footer-gutter); +} + +#push { + height: $footer-height + $footer-gutter - $footer-border-width; +} + +#footer { + padding-top: $footer-gutter; + height: $footer-height - $footer-border-width; + .full-height { + text-align: center; + line-height: $footer-height - $footer-border-width; + border-top: $footer-border-width solid darken($footer-color, 10%); + background-color: $footer-color; + a { + color: $black; + margin: 0 5px; + } + } +} + + @media (max-width: 767px) { + #footer a { + font-size: 80%; + margin: 0 2px; + } +} diff --git a/app/views/home/_content.html.haml b/app/views/home/_content.html.haml new file mode 100644 index 0000000..3d351e9 --- /dev/null +++ b/app/views/home/_content.html.haml @@ -0,0 +1,14 @@ +.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). + +.row-fluid + = home_page_buttons + + - if Rails.env == 'development' + .row-fluid + %hr + %p + = link_to "fetch a cert", cert_path + %p + = link_to "make donation", new_payment_path if APP_CONFIG[:payment].present? diff --git a/app/views/home/_masthead.html.haml b/app/views/home/_masthead.html.haml new file mode 100644 index 0000000..e5d63d6 --- /dev/null +++ b/app/views/home/_masthead.html.haml @@ -0,0 +1,6 @@ +-# An example masthead: +-# +-# #masthead-text +-# .container-fluid +-# .row-fluid +-# %h1 Example
\ No newline at end of file diff --git a/app/views/home/index.html.haml b/app/views/home/index.html.haml index 67b2c06..2d5b238 100644 --- a/app/views/home/index.html.haml +++ b/app/views/home/index.html.haml @@ -1,21 +1,21 @@ -#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). - - .row-fluid - .span6.offset3 - = render 'layouts/messages' - .row-fluid - = home_page_buttons - - - if Rails.env == 'development' - .row-fluid - %hr - %p - = link_to "fetch a cert", cert_path - %p - = link_to "make donation", new_payment_path if APP_CONFIG[:payment].present? +!!! +%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 + #wrap + #masthead + = render 'home/masthead' + #main + .container-fluid + = render 'home/content' + #push + -# #push is used for sticky footer in bootstrap 2. remove when upgrading to bootstrap 3 + #footer + = render 'layouts/footer'
\ No newline at end of file diff --git a/app/views/layouts/_footer.html.haml b/app/views/layouts/_footer.html.haml index ab925e8..5909bdd 100644 --- a/app/views/layouts/_footer.html.haml +++ b/app/views/layouts/_footer.html.haml @@ -1,11 +1,10 @@ -.container - .row - = link_to t(:home), home_path - = link_to t(:privacy_policy), privacy_policy_path - = link_to t(:terms_of_service), terms_of_service_path - - if lookup_context.exists?('pages/about') - = link_to t(:about), about_path - - if lookup_context.exists?('pages/contact') - = link_to t(:contact), contact_path - - if APP_CONFIG[:service_levels] - = link_to t(:pricing), pricing_path
\ No newline at end of file +.full-height + = link_to icon('home') + t(:home), home_path + = link_to icon('eye-close') + t(:privacy_policy), privacy_policy_path + = link_to icon('file') + t(:terms_of_service), terms_of_service_path + - if lookup_context.exists?('pages/about') + = link_to icon('info-sign') + t(:about), about_path + - if lookup_context.exists?('pages/contact') + = link_to icon('comment') + t(:contact), contact_path + - if APP_CONFIG[:service_levels] + = link_to icon('shopping-cart') + t(:pricing), pricing_path
\ No newline at end of file diff --git a/app/views/layouts/_masthead.html.haml b/app/views/layouts/_masthead.html.haml index 280f2c2..5f40c05 100644 --- a/app/views/layouts/_masthead.html.haml +++ b/app/views/layouts/_masthead.html.haml @@ -1,4 +1,5 @@ .title %span.sitename - = APP_CONFIG[:domain] - = t(:user_control_panel)
\ No newline at end of file + %a{:href => home_path}= APP_CONFIG[:domain] + - if @show_navigation + = t(:user_control_panel)
\ No newline at end of file diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 816b558..e52ca7f 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -10,15 +10,18 @@ = csrf_meta_tags = yield(:head) %body - #masthead - = render 'layouts/masthead' - #main - .container-fluid - - if logged_in? + #wrap + #masthead + = render 'layouts/masthead' + #main + .container-fluid + - if logged_in? + .row-fluid + .span12 + = render 'layouts/header' .row-fluid - .span12 - = render 'layouts/header' - .row-fluid - = render 'layouts/content' + = render 'layouts/content' + #push + -# #push is used for sticky footer in bootstrap 2. remove when upgrading to bootstrap 3 #footer = render 'layouts/footer' diff --git a/config/locales/en.yml b/config/locales/en.yml index 00ef06b..96c47ca 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1,6 +1,6 @@ en: privacy_policy: Privacy Policy - terms_of_use: Terms of Use + terms_of_service: Terms of Service pricing: Pricing about: About Us contact: Contact
\ No newline at end of file |