Skip to content
This repository has been archived by the owner on Nov 25, 2017. It is now read-only.

Fixed Home Page Typo #5

Open
wants to merge 20 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions Gemfile
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ gem 'thin'
gem 'shotgun'
gem 'pry'
gem 'require_all'
# Below could cause and issue
gem 'bootstrap-sass', '~> 3.1.1.0'
gem 'youtube_it', '~> 2.4.0'
# Above is what Leigh did that could cause an issue

group :test do
gem 'rspec'
Expand Down
39 changes: 36 additions & 3 deletions Gemfile.lock
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,17 +1,40 @@
GEM
remote: http://rubygems.org/
specs:
bootstrap-sass (3.1.1.1)
sass (~> 3.2)
builder (3.2.2)
coderay (1.1.0)
daemons (1.2.3)
diff-lcs (1.2.5)
domain_name (0.5.20160615)
unf (>= 0.0.5, < 1.0.0)
eventmachine (1.2.0.1)
excon (0.49.0)
faraday (0.9.2)
multipart-post (>= 1.2, < 3)
http-cookie (1.0.2)
domain_name (~> 0.5)
json (1.8.3)
jwt (1.5.4)
method_source (0.8.2)
mime-types (2.99.2)
mini_portile2 (2.1.0)
multi_json (1.12.1)
multi_xml (0.5.5)
multipart-post (2.0.0)
netrc (0.11.0)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
oauth (0.4.7)
oauth2 (1.0.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
multi_json (~> 1.3)
multi_xml (~> 0.5)
rack (~> 1.2)
pkg-config (1.1.7)
pry (0.10.1)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
Expand Down Expand Up @@ -40,8 +63,10 @@ GEM
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.2.0)
rspec-support (3.2.2)
sass (3.4.22)
shotgun (0.9)
rack (>= 1.0)
simple_oauth (0.3.1)
sinatra (1.4.5)
rack (~> 1.4)
rack-protection (~> 1.4)
Expand All @@ -55,11 +80,21 @@ GEM
unf (0.1.4)
unf_ext
unf_ext (0.0.7.2)
youtube_it (2.4.2)
builder
excon
faraday (>= 0.8, < 0.10)
json (~> 1.8)
nokogiri (~> 1.6.0)
oauth (~> 0.4.4)
oauth2 (~> 1.0.0)
simple_oauth (>= 0.1.5)

PLATFORMS
ruby

DEPENDENCIES
bootstrap-sass (~> 3.1.1.0)
pry
rack-test
rake
Expand All @@ -69,9 +104,7 @@ DEPENDENCIES
shotgun
sinatra
thin

RUBY VERSION
ruby 2.2.0p0
youtube_it (~> 2.4.0)

BUNDLED WITH
1.12.5
Empty file modified Procfile
100644 → 100755
Empty file.
Empty file modified README.md
100644 → 100755
Empty file.
Empty file modified Rakefile
100644 → 100755
Empty file.
26 changes: 21 additions & 5 deletions app.rb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
require_relative 'config/environment'

class App < Sinatra::Base
get '/' do

get '/home' do
@error = params['error']
erb :home
end

post '/subscribe' do
@full_name = params[:full_name]
@email = params[:email]
@city = params[:city]

if [email protected](/.+@.+/)
redirect to('/?error=email')
Expand All @@ -17,9 +19,19 @@ class App < Sinatra::Base
erb :subscribe
end

get '/youtube' do
erb :youtube
end

get '/rainbow' do
erb :rainbow

end

get '/reddit' do
# TODO: we can probably get the listings with something like:
# JSON.parse(RestClient.get('http://reddit.com/.json'))
# http://www.reddit.com/r/subreddit/new.json?sort=new

@listings = []

Expand Down Expand Up @@ -53,9 +65,7 @@ class App < Sinatra::Base

class App < Sinatra::Base
get '/fib/:n' do
# TODO: implement an algorithm to calculate the fibonacci sequence at
# the nth position and display
# (4) points
fib(4)
end

get '/team-randomizer' do
Expand All @@ -65,6 +75,12 @@ class App < Sinatra::Base
end

def fib(n)
# TODO: calculate fib
if n == 0
if n == 1
n
else
fib(n-1) + fib(n-2)
end
end
end
end
Empty file modified config.ru
100644 → 100755
Empty file.
Empty file modified config/environment.rb
100644 → 100755
Empty file.
Empty file modified models/.keep
100644 → 100755
Empty file.
Empty file modified models/sample_model.rb
100644 → 100755
Empty file.
Binary file added public/.DS_Store
Binary file not shown.
Empty file modified public/favicon.ico
100644 → 100755
Empty file.
Empty file modified public/images/.keep
100644 → 100755
Empty file.
Binary file added public/images/Danielle.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/Darren.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/Edward.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/Hayden.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added public/images/Leigh.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified public/images/learnco.png
100644 → 100755
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Empty file modified public/javascripts/.keep
100644 → 100755
Empty file.
Empty file modified public/stylesheets/.keep
100644 → 100755
Empty file.
4 changes: 3 additions & 1 deletion public/stylesheets/main.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,9 @@ textarea {
Author's custom styles
========================================================================== */


.img-circle {
border-radius: 50%;
}



Expand Down
36 changes: 36 additions & 0 deletions rainbow.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<!DOCTYPE html>
<html>
<head>
<style>
#p01 {
color: red;
}
#p02 {
color: orange;
}
#p03 {
color: yellow;
}
#p04 {
color: green;
}
#p05 {
color: blue;
}
#p06 {
color: indigo;
}
#p07 {
color: violet;
}
</style>
</head>
<body>

<p id="p01">rainbow</p>
<p id="p02">rainbow</p>
<p id="p03">rainbow</p>
<p id="p04">rainbow</p>
<p id="p05">rainbow</p>
<p id="p06">rainbow</p>
<p id="p07">rainbow</p>
Empty file modified spec/spec_helper.rb
100644 → 100755
Empty file.
Empty file modified views/.keep
100644 → 100755
Empty file.
6 changes: 4 additions & 2 deletions views/home.erb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h1>Startup Sprint!</h1>
<img src="images/learnco.jpg">
<img src="images/learnco.png">

<h3>Subscribe to the Stertup Sprint newsletter</h3>
<h3>Subscribe to the Startup Sprint newsletter</h3>
<% if @error == 'email' %>
<p style="color: red;">Please enter a valid email</p>
<% end %>
Expand All @@ -10,5 +10,7 @@
<input type="text" id="full-name" name="full_name" required>
<label for="email">Email</label>
<input type="text" id="email" name="email" required>
<label for="city">City</label>
<input type="text" id="city" name="cityVar" required>
<input type="Submit">
</form>
1 change: 1 addition & 0 deletions views/layout.erb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<link rel="stylesheet" href="stylesheets/main.css">
<%= favicon_link_tag %>
</head>
<body>
<!--[if lt IE 8]>
Expand Down
38 changes: 38 additions & 0 deletions views/rainbow.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<!doctype html>
<html>
<p>
<svg>
<rect id="red" height="100" width="1000" fill="red" />
</svg>
</p>
<p>
<svg>
<rect id="orange" height="100" width="1000" fill="orange" />
</svg>
</p>
<p>
<svg>
<rect id="yellow" height="100" width="1000" fill="yellow" />
</svg>
</p>
<p>
<svg>
<rect id="green" height="100" width="1000" fill="green" />
</svg>
</p>
<p>
<svg>
<rect id="blue" height="100" width="1000" fill="blue" />
</svg>
</p>
<p>
<svg>
<rect id="indigo" height="100" width="1000" fill="indigo" />
</svg>
</p>
<p>
<svg>
<rect id="violet" height="100" width="1000" fill="violet"/>
</svg>
</p>
</html>
Empty file modified views/reddit.erb
100644 → 100755
Empty file.
48 changes: 30 additions & 18 deletions views/schedule.erb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,18 +1,30 @@
<div>
<div class="column">
<h3>Today</h3>
<ol>
<% @today.each do |item| %>
<li><%= item.first %>: <%= item.last %></li>
<% end %>
</ol>
</div>
<div class="column">
<h3>Tomorrow</h3>
<ol>
<% @tomorrow.each do |item| %>
<li><%= item.first %>: <%= item.last %></li>
<% end %>
</ol>
</div>
</div>
<html>
<head>
<style>
.schedule {
-webkit-column-count: 2; / Chrome, Safari, Opera /
-moz-column-count: 2; / Firefox /
column-count: 2;
}
</style>
</head>
<body>

<div class="schedule">

<h3>Today</h3>
<ol>
<% @today.each do |item| %>
<li><%= item.first %>: <%= item.last %></li>
<% end %>
</ol>

<h3>Tomorrow</h3>
<ol>
<% @tomorrow.each do |item| %>
<li><%= item.first %>: <%= item.last %></li>
<% end %>
</ol>

</body>
</html>
Empty file added views/splash.erb
Empty file.
4 changes: 3 additions & 1 deletion views/subscribe.erb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<p>Thanks for subscribing <%= @full_name %></p>
<p>Thanks for subscribing <%= @full_name %> from <%= @cityVar %>
</p>


<a href="/">Home</a>
26 changes: 26 additions & 0 deletions views/team.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<div>
<div class="column">
<img class="img-circle" src="/Users/darrendouglas/startup-sprint/public/images/Darren.jpg" width="300" height="300"/>
<h3>Darren Douglas</h3>
</div>
<div class="column">
<img src="/Users/darrendouglas/startup-sprint/public/images/Danielle.jpg" width="300" height="300">
<h3>Danielle Harris</h3>
</div>

<div class="column">
<img src="/Users/darrendouglas/startup-sprint/public/images/Edward.jpg" width="300" height="300">
<h3>Edward Gordon</h3>
</div>

<div class="column">
<img src="/Users/darrendouglas/startup-sprint/public/images/Leigh.jpg" width="300" height="300">
<h3>Leigh Stauffer</h3>
</div>

<div class="column">
<img src="/Users/darrendouglas/startup-sprint/public/images/Hayden.jpg" width="300" height="300">
<h3>Hayden Gridley</h3>
</div>

</div>
4 changes: 4 additions & 0 deletions views/youtube.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
This is dope
<div class="embed-container">
<iframe width="420" height="315" src="https://www.youtube.com/embed/FtX8nswnUKU" frameborder="0" allowfullscreen></iframe>
</div>