diff --git a/Gemfile b/Gemfile old mode 100644 new mode 100755 diff --git a/Gemfile.lock b/Gemfile.lock old mode 100644 new mode 100755 diff --git a/Procfile b/Procfile old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/Rakefile b/Rakefile old mode 100644 new mode 100755 diff --git a/app.rb b/app.rb old mode 100644 new mode 100755 index 68e111c..b52d31f --- a/app.rb +++ b/app.rb @@ -3,15 +3,22 @@ class App < Sinatra::Base get '/' do @error = params['error'] + @full_name = params['full_name'] + @city = params['city'] erb :home end + get '/home' do + redirect to('/') + end + post '/subscribe' do @full_name = params[:full_name] @email = params[:email] + @city = params[:city] if !@email.match(/.+@.+/) - redirect to('/?error=email') + redirect to('/?error=email&full_name='+@full_name+'&city='+@city) end erb :subscribe @@ -49,8 +56,12 @@ class App < Sinatra::Base erb :schedule end -end + get '/rainbow' do + erb :rainbow + end + +end class App < Sinatra::Base get '/fib/:n' do # TODO: implement an algorithm to calculate the fibonacci sequence at @@ -63,8 +74,29 @@ class App < Sinatra::Base # separated names. Randomize this list of names and display it as an # ordered list (
    ). 5 points end - def fib(n) # TODO: calculate fib end end + +# in app.rb +class App + get '/youtube' do + "Hello World" + erb :youtube + end +end + +class App + get '/training' do + "Hello World" + erb :training + end +end + +class App + get '/reddit' do + "hello world" + erb :reddit + end +end diff --git a/config.ru b/config.ru old mode 100644 new mode 100755 diff --git a/config/environment.rb b/config/environment.rb old mode 100644 new mode 100755 diff --git a/models/.keep b/models/.keep old mode 100644 new mode 100755 diff --git a/models/sample_model.rb b/models/sample_model.rb old mode 100644 new mode 100755 diff --git a/public/favicon.ico b/public/favicon.ico old mode 100644 new mode 100755 diff --git a/public/images/.keep b/public/images/.keep old mode 100644 new mode 100755 diff --git a/public/images/favicon.ico b/public/images/favicon.ico new file mode 100755 index 0000000..4153693 Binary files /dev/null and b/public/images/favicon.ico differ diff --git a/public/images/learnco.png b/public/images/learnco.png old mode 100644 new mode 100755 diff --git a/public/javascripts/.keep b/public/javascripts/.keep old mode 100644 new mode 100755 diff --git a/public/stylesheets/.keep b/public/stylesheets/.keep old mode 100644 new mode 100755 diff --git a/public/stylesheets/main.css b/public/stylesheets/main.css old mode 100644 new mode 100755 index 3c995a6..0d3149a --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -1,3 +1,20 @@ +/* + * From csslayout +*/ + +#container1 { + float:left; + width:100%; +} +#col1 { + float:left; + width:50%; +} +#col2 { + float:left; + width:50%; +} + /* * What follows is the result of much research on cross-browser styling. * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal, diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb old mode 100644 new mode 100755 diff --git a/views/.keep b/views/.keep old mode 100644 new mode 100755 diff --git a/views/home.erb b/views/home.erb index 19d8743..d3f51a1 100644 --- a/views/home.erb +++ b/views/home.erb @@ -1,14 +1,33 @@

    Startup Sprint!

    - + -

    Subscribe to the Stertup Sprint newsletter

    +

    Subscribe to the Startup Sprint newsletter

    <% if @error == 'email' %> -

    Please enter a valid email

    +

    <%= @full_name %>, please enter a valid email

    +
    + + required> + + + + > + +
    +<%else%> +
    + + + + + + + +
    <% end %> -
    - - - - - -
    +