From 87383e624855def55e13d238b2f20b79c418c1d9 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 21 Jan 2014 13:54:45 -0800 Subject: added default pricing, privacy policy and tos pages. --- config/initializers/markdown_handler.rb | 19 +++++++++++++++++++ config/locales/en.yml | 5 +++++ config/routes.rb | 8 ++++++++ 3 files changed, 32 insertions(+) create mode 100644 config/initializers/markdown_handler.rb (limited to 'config') diff --git a/config/initializers/markdown_handler.rb b/config/initializers/markdown_handler.rb new file mode 100644 index 0000000..b9e73ba --- /dev/null +++ b/config/initializers/markdown_handler.rb @@ -0,0 +1,19 @@ +# +# This adds support for markdown in views. Just name the template with ".md" +# erb expansion is supported. +# + +require 'rdiscount' + +module MarkdownHandler + def self.erb + @erb ||= ActionView::Template.registered_template_handler(:erb) + end + + def self.call(template) + compiled_source = erb.call(template) + "RDiscount.new(begin;#{compiled_source};end, :generate_toc, :smart, :autolink).to_html" + end +end + +ActionView::Template.register_template_handler :md, MarkdownHandler diff --git a/config/locales/en.yml b/config/locales/en.yml index 63f1c3e..00ef06b 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -1 +1,6 @@ en: + privacy_policy: Privacy Policy + terms_of_use: Terms of Use + pricing: Pricing + about: About Us + contact: Contact \ No newline at end of file diff --git a/config/routes.rb b/config/routes.rb index b3e24b9..f8f0c26 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -6,5 +6,13 @@ LeapWeb::Application.routes.draw do root :to => "home#index" get '(:locale)' => 'home#index', :locale => MATCH_LOCALE, :as => 'home' + scope "(:locale)", :locale => MATCH_LOCALE, :controller => 'pages', :action => 'show' do + get 'privacy-policy', :as => 'privacy_policy' + get 'terms-of-service', :as => 'terms_of_service' + get 'about', :as => 'about' + get 'contact', :as => 'contact' + get 'pricing', :as => 'pricing' + end + get '/provider.json' => 'static_config#provider' end -- cgit v1.2.3 From 67650ea9fead442cb2f66a2fbbec452c890d0775 Mon Sep 17 00:00:00 2001 From: elijah Date: Wed, 22 Jan 2014 02:18:30 -0800 Subject: added a default footer with links to privacy policy, tos, pricing, about us, contact. --- config/locales/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'config') 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 -- cgit v1.2.3 From ce412a9a0ccce22b5b9d90f70369b91d5fc46e4f Mon Sep 17 00:00:00 2001 From: elijah Date: Thu, 23 Jan 2014 11:36:17 -0800 Subject: added a customizable 'bye' page for when a user leaves --- config/routes.rb | 1 + 1 file changed, 1 insertion(+) (limited to 'config') diff --git a/config/routes.rb b/config/routes.rb index f8f0c26..f8bb8fb 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -12,6 +12,7 @@ LeapWeb::Application.routes.draw do get 'about', :as => 'about' get 'contact', :as => 'contact' get 'pricing', :as => 'pricing' + get 'bye', :as => 'bye' end get '/provider.json' => 'static_config#provider' -- cgit v1.2.3