diff --git a/.gitignore b/.gitignore index f7d7e16..b5ec40a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ +.ruby-version .bundle .sass-cache diff --git a/CHANGELOG.md b/CHANGELOG.md index e69de29..a67533f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -0,0 +1,2 @@ +## 0.0.1 +- Fixing TBG URL issues diff --git a/app.rb b/app.rb index d2b3a69..c9725ec 100644 --- a/app.rb +++ b/app.rb @@ -10,18 +10,32 @@ set :logging, false end + get "/" do haml :index end -post '/display-email' do - tbg() - haml :email +get "/tbg" do + haml :tbg_form +end + +post '/display-tbg_email' do + tbg + haml :tbg_email +end + +get "/vxb" do + haml :vxb_form +end + +post '/display-vxb_email' do + vxb + haml :vxb_email end def tbg @companyLogo = "http://tbg-assets.s3.amazonaws.com/thebeansgroup/email_footer/ef-TBG-logo.jpg" - @companyURL = "http://thebeansgroup.com" + @companyURL = "http://www.thebeansgroup.com" @companyColor = "#00993b" @companyName = "The Beans Group" @companyPhone = "0870 3831 599" @@ -29,4 +43,16 @@ def tbg @companyTwitter = "@thebeansgroup" @companyTwitterURL = "http://twitter.com/thebeansgroup" @companyLinkedin = "http://www.linkedin.com/company/the-beans-group" -end \ No newline at end of file +end + +def vxb + @companyLogo = "http://tbg-assets.s3.amazonaws.com/voxburner/email_footer/ef-VXB-logo.png" + @companyURL = "http://voxburner.com" + @companyColor = "#25C7EE" + @companyName = "Voxburner" + @companyPhone = "0870 3831 599" + @companyWeb = "www.voxburner.com" + @companyTwitter = "@voxburner" + @companyTwitterURL = "http://twitter.com/voxburner" + @companyLinkedin = "http://www.linkedin.com/company/voxburner" +end diff --git a/config/deploy.rb b/config/deploy.rb index 6fc6169..a867561 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -2,8 +2,8 @@ require "bundler/capistrano" # Set-up rvm for use with capistrano -# set :rvm_ruby_string, 'ree@rails3' # Or: -set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") # Read from local system +set :rvm_ruby_string, '1.9.3-p125' # Or: +#set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") # Read from local system require "rvm/capistrano" # Load RVM's capistrano plugin. set :user, "deploy" @@ -37,15 +37,15 @@ namespace :deploy do task :start, :roles => [:web] do - run "cd #{deploy_to}/current && nohup thin start --daemonize --environment=production" + run "cd #{deploy_to}/current && nohup bundle exec thin start --port 3000 --daemonize --environment=production" end - + task :stop, :roles => [:web] do - run "cd #{deploy_to}/current && nohup thin stop" + run "cd #{deploy_to}/current && nohup bundle exec thin stop" end - + task :restart, :roles => [:web] do deploy.stop deploy.start end - end \ No newline at end of file + end diff --git a/views/index.haml b/views/index.haml index 69137f3..678dce9 100644 --- a/views/index.haml +++ b/views/index.haml @@ -8,29 +8,13 @@ %header %h1 %span Cobblr - - - - %form{:method=>"post", :action=>"/display-email", :class=>"group"} - %ul - %li.l - %ul - %li - %label{:for=>"full_name"} Full Name - %input{:type=>"text",:id=>"full_name", :name=>"name", :placeholder=>"Full name", :required=>true} - %li - %label{:for=>"job"} Job Title - %input{:type=>"text", :id=>"job", :name=>"job_title", :placeholder=>"Job Title", :required=>true} - %li.r - %ul - %li - %label{:for=>"cta_body"} CTA Body Text - %input{:type=>"text", :id=>"cta_body", :name=>"cta_body", :placeholder=>"Call to action body text", :required=>true} - %li - %label{:for=>"cta_link_text"} CTA Link Text - %input{:type=>"text", :id=>"cta_link_text", :name=>"cta_link_text", :placeholder=>"Call to action link text", :required=>true} - %li - %label{:for=>"cta_link"} CTA Link URL - %input{:type=>"text",:id=>"cta_link", :name=>"cta_link", :placeholder=>"Call to action link", :required=>true} - %li.c - %input{:type=>"submit"} \ No newline at end of file + %h2{:style=>"text-align: center;"} Select your weapon of choice + %ul.group + %li.l + Generate footer for: + %br + %a{:href=>"/tbg"} The Beans Group + %li.r + Generate footer for: + %br + %a{:href=>"/vxb"} Voxburner diff --git a/views/email.haml b/views/tbg_email.haml similarity index 94% rename from views/email.haml rename to views/tbg_email.haml index 18dcfae..119940b 100644 --- a/views/email.haml +++ b/views/tbg_email.haml @@ -13,7 +13,7 @@ = @companyPhone %br %strong Web: - %a{:href=>@companyWeb, :style=>"color:#0000ff;"}= @companyWeb + %a{:href=>@companyURL, :style=>"color:#0000ff;"}= @companyWeb %br %strong Twitter: %a{:href=>@companyTwitterURL, :style=>"color:#0000ff;"}= @companyTwitter @@ -28,4 +28,4 @@ Office address: Unit 2, Bradley House, St Albans Lane, Golders Green, London NW11 7QE %br Registered Office: 6 Breams Buildings, London EC4A 1QL. Registered as a company in England and Wales, number: 5486885. VAT Registration Number: 873 0262 33 - %br \ No newline at end of file + %br diff --git a/views/tbg_form.haml b/views/tbg_form.haml new file mode 100644 index 0000000..052bd87 --- /dev/null +++ b/views/tbg_form.haml @@ -0,0 +1,36 @@ +!!! +%html + %head + %title Cobblr - Email Footer Cobbling + %link{ :href=>'http://fonts.googleapis.com/css?family=PT+Sans:400,700|PT+Serif:700,400italic,700italic', :rel=>'stylesheet', :type=>'text/css'} + %link{ rel: "stylesheet", type: "text/css", href: "/style.css" } + %body + %header + %h1 + %span Cobblr + + + + %form{:method=>"post", :action=>"/display-tbg_email", :class=>"group"} + %ul + %li.l + %ul + %li + %label{:for=>"full_name"} Full Name + %input{:type=>"text",:id=>"full_name", :name=>"name", :placeholder=>"Full name", :required=>true} + %li + %label{:for=>"job"} Job Title + %input{:type=>"text", :id=>"job", :name=>"job_title", :placeholder=>"Job Title", :required=>true} + %li.r + %ul + %li + %label{:for=>"cta_body"} CTA Body Text + %input{:type=>"text", :id=>"cta_body", :name=>"cta_body", :placeholder=>"Call to action body text", :required=>true} + %li + %label{:for=>"cta_link_text"} CTA Link Text + %input{:type=>"text", :id=>"cta_link_text", :name=>"cta_link_text", :placeholder=>"Call to action link text", :required=>true} + %li + %label{:for=>"cta_link"} CTA Link URL + %input{:type=>"text",:id=>"cta_link", :name=>"cta_link", :placeholder=>"Call to action link", :required=>true} + %li.c + %input{:type=>"submit"} diff --git a/views/vxb_email.haml b/views/vxb_email.haml new file mode 100644 index 0000000..b06024b --- /dev/null +++ b/views/vxb_email.haml @@ -0,0 +1,28 @@ +%font{ :face=>"Arial, Helvetica, Geneva, Sans-Serif", :color=>"#000000", :style=>"font-size: 11px;line-height: 15px;"} + %br + %a{:href=>@companyURL} + %img{:src=>@companyLogo, :width=>20, :height=>26, :style=>"display:block", :border=>"0"} + %font{:style=>"font-size: 13px;"} + %strong{:style=>" padding-bottom: 3px; padding-top: 10px; display: block"}= params[:name] + = params[:job_title] + %font{:color=>@companyColor} + | + = @companyName + %br :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + Phone: + = @companyPhone + %br + Web: + %a{:href=>@companyURL, :style=>"color:#0000ff;"}= @companyWeb + %br + Twitter: + %a{:href=>@companyTwitterURL, :style=>"color:#0000ff;"}= @companyTwitter + %br + Join us on + %a{:href=>@companyLinkedin, :style=>"color:#0000ff;"} LinkedIn + %br :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: + %font{:style=>"font-size: 10px;"} + Office address: Unit 2, Bradley House, St Albans Lane, Golders Green, London NW11 7QE + %br + Registered Office: 6 Breams Buildings, London EC4A 1QL. Registered as a company in England and Wales, number: 5486885. VAT Registration Number: 873 0262 33 + %br diff --git a/views/vxb_form.haml b/views/vxb_form.haml new file mode 100644 index 0000000..61ec62e --- /dev/null +++ b/views/vxb_form.haml @@ -0,0 +1,25 @@ +!!! +%html + %head + %title Cobblr - Email Footer Cobbling + %link{ :href=>'http://fonts.googleapis.com/css?family=PT+Sans:400,700|PT+Serif:700,400italic,700italic', :rel=>'stylesheet', :type=>'text/css'} + %link{ rel: "stylesheet", type: "text/css", href: "/style.css" } + %body + %header + %h1 + %span Cobblr + + + + %form{:method=>"post", :action=>"/display-vxb_email", :class=>"group"} + %ul + %li.l + %ul + %li + %label{:for=>"full_name"} Full Name + %input{:type=>"text",:id=>"full_name", :name=>"name", :placeholder=>"Full name", :required=>true} + %li + %label{:for=>"job"} Job Title + %input{:type=>"text", :id=>"job", :name=>"job_title", :placeholder=>"Job Title", :required=>true} + %li.c + %input{:type=>"submit"}