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 index 3b1fad1..5a5de82 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -69,9 +69,3 @@ DEPENDENCIES shotgun sinatra thin - -RUBY VERSION - ruby 2.2.0p0 - -BUNDLED WITH - 1.12.5 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 index 68e111c..1c93a0f 100644 --- a/app.rb +++ b/app.rb @@ -3,20 +3,32 @@ class App < Sinatra::Base get '/' do @error = params['error'] + @full_name = params['full_name'] + @email = params['email'] + @city = params['city'] erb :home 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 + '&email=' + @email + '&city=' + @city) end erb :subscribe end + get '/home' do + redirect to('/') + end + + get '/team' do + erb :team + end + get '/reddit' do # TODO: we can probably get the listings with something like: # JSON.parse(RestClient.get('http://reddit.com/.json')) @@ -49,6 +61,19 @@ class App < Sinatra::Base erb :schedule end + + get '/splash' do + erb :splash + end + + get '/youtube' do + erb :youtube + end + + get '/rainbow' do + erb :rainbow + end + end class App < Sinatra::Base 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/learnco.png b/public/images/learnco.png old mode 100644 new mode 100755 diff --git a/public/images/sam.jpg b/public/images/sam.jpg new file mode 100755 index 0000000..9a4221f Binary files /dev/null and b/public/images/sam.jpg differ 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..89a101f --- a/public/stylesheets/main.css +++ b/public/stylesheets/main.css @@ -14,6 +14,11 @@ html { line-height: 1.4; } + + + +} + /* * Remove text-shadow in selection highlight: * https://twitter.com/miketaylr/status/12228805301 @@ -87,11 +92,76 @@ textarea { /* ========================================================================== Author's custom styles ========================================================================== */ +.container { + position:fixed; + width:100%; + height:100%; + top:0px; + left:0px; + z-index:1000; + padding:0; +} +.red { + background-color: red; + width: 100%; + height: 14%; + padding: 0; +} +.orange { + background-color: orange; + width: 100%; + height: 14%; +} +.yellow { + background-color: yellow; + width: 100%; + height: 14%; +} +.green { + background-color: green; + width: 100%; + height: 14%; +} +.blue { + background-color: blue; + width: 100%; + height: 14%; +} +.indigo { + background-color: indigo; + width: 100%; + height: 14%; +} +.violet { + background-color: violet; + width: 100%; + height: 14%; +} +.column1 { + float:left; + width:200px; + padding-left:10px; + padding-right:10px; + border-style: solid; + border-width: 2px; + margin:20px; + margin-left:30px; + margin-top:30px; +} +.column2 { + float:left; + width:200px; + padding-left:10px; + padding-right:10px; + border-style: solid; + border-width:2px; + margin:20px; + margin-top:30px; - +} diff --git a/spec/one_test_spec.rb b/spec/one_test_spec.rb new file mode 100644 index 0000000..c09f093 --- /dev/null +++ b/spec/one_test_spec.rb @@ -0,0 +1,13 @@ +require_relative '../config/environment' + +describe "Sample test" do + + it 'Html Test' do + # $stdout represents the output of your program, don't worry about how + # we are testing this, focus on simply coding your solution. + res = RestClient.get('http://localhost:9292/') + puts res.headers + expect(res.headers[:content_type]).to include("html") + end + +end \ No newline at end of file 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 old mode 100644 new mode 100755 index 19d8743..77528ff --- a/views/home.erb +++ b/views/home.erb @@ -1,14 +1,28 @@

Startup Sprint!

- + -

Subscribe to the Stertup Sprint newsletter

+

Subscribe to the Startup Sprint newsletter

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

Please enter a valid email

-<% end %> -
+ + + + + + + + +
+<% else %> +
+ + -
+ +<% end %> + +The Team diff --git a/views/layout.erb b/views/layout.erb old mode 100644 new mode 100755 index 17df63b..8feec1e --- a/views/layout.erb +++ b/views/layout.erb @@ -5,7 +5,7 @@ Startup Sprint - + diff --git a/views/rainbow.erb b/views/rainbow.erb new file mode 100755 index 0000000..5d87f16 --- /dev/null +++ b/views/rainbow.erb @@ -0,0 +1,9 @@ +
+
 
+
 
+
 
+
 
+
 
+
 
+
 
+
diff --git a/views/reddit.erb b/views/reddit.erb old mode 100644 new mode 100755 diff --git a/views/schedule.erb b/views/schedule.erb old mode 100644 new mode 100755 index 3ef5281..5b5bc7f --- a/views/schedule.erb +++ b/views/schedule.erb @@ -1,5 +1,5 @@
-
+

Today

    <% @today.each do |item| %> @@ -7,7 +7,7 @@ <% end %>
-
+

Tomorrow

    <% @tomorrow.each do |item| %> diff --git a/views/splash.erb b/views/splash.erb new file mode 100644 index 0000000..548c9ea --- /dev/null +++ b/views/splash.erb @@ -0,0 +1,77 @@ + + +Welcome! + + + + + + + + +
    + FLATIRON SCHOOL +
    VENTURE FOR AMERICA
    +
    + +
    +
    + +
    + + + + + diff --git a/views/subscribe.erb b/views/subscribe.erb old mode 100644 new mode 100755 index 6a5d527..66032f4 --- a/views/subscribe.erb +++ b/views/subscribe.erb @@ -1,3 +1,4 @@

    Thanks for subscribing <%= @full_name %>

    +

    Your city is set to <%= @city %>

    Home diff --git a/views/team.erb b/views/team.erb new file mode 100755 index 0000000..67b3971 --- /dev/null +++ b/views/team.erb @@ -0,0 +1,30 @@ +

    The Team

    + + + + + + + + + + + + + + + + + + + + + + + + + + +
    Kyle Wilcox Cherie Chung Magdalene McArthur
    Ben Romero Jim Clarke
    + +Home diff --git a/views/youtube.erb b/views/youtube.erb new file mode 100755 index 0000000..24ed6c3 --- /dev/null +++ b/views/youtube.erb @@ -0,0 +1,4 @@ +
    + + +
    \ No newline at end of file