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

added city field in home.erb, subscribe.erb, and app.rb #3

Open
wants to merge 27 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
d3caf84
added city field in home.erb, subscribe.erb, and app.rb
Jun 21, 2016
37d811d
Fix FavIcon
wilcoxky Jun 21, 2016
89ed5d0
Fixed Merge
wilcoxky Jun 21, 2016
3f9e35a
Changed to two column layout
clc230 Jun 21, 2016
77b9de4
Changed column layout
clc230 Jun 21, 2016
f919adf
Changed names of columns
clc230 Jun 21, 2016
c635f32
Fixed Logo and Image
wilcoxky Jun 21, 2016
0851c22
Fixed Favicon 2
wilcoxky Jun 21, 2016
df0bde6
Youtube Video Embedded
wilcoxky Jun 21, 2016
a4345f6
two columns on schedule page complete
clc230 Jun 21, 2016
9afe4df
created team.erb to display photos and names, changed app and home.er…
Jun 21, 2016
3964e4e
Merge branch 'master' of github.com:joclarke/startup-sprint
Jun 21, 2016
78492f2
fixed home link
Jun 21, 2016
fa142c3
added empty page for Rainbow easter egg
magdalenemc Jun 21, 2016
1fa9ff2
Merge branch 'master' of github.com:joclarke/startup-sprint
clc230 Jun 21, 2016
99bf947
Merge branch 'master' of github.com:joclarke/startup-sprint
clc230 Jun 21, 2016
d97884e
brute forced app.rb and home.erb to save field values on email error
Jun 21, 2016
2f11c7a
Created rainbow easter egg
magdalenemc Jun 21, 2016
b37425e
Test Added
wilcoxky Jun 21, 2016
8501245
Ben Changes added *home
wilcoxky Jun 21, 2016
5af2e19
Rainbow done
magdalenemc Jun 21, 2016
30fdcd4
Merge branch 'master' of github.com:joclarke/startup-sprint
magdalenemc Jun 21, 2016
12a8b43
fixed CSS
wilcoxky Jun 21, 2016
92454ce
Nyan Cat added
wilcoxky Jun 21, 2016
1e89f9c
splash page complete
clc230 Jun 21, 2016
767e82f
Merge branch 'master' of github.com:joclarke/startup-sprint
clc230 Jun 21, 2016
d2d9f1a
Redirect shortened
wilcoxky Jun 21, 2016
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
Empty file modified Gemfile
100644 → 100755
Empty file.
6 changes: 0 additions & 6 deletions Gemfile.lock
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -69,9 +69,3 @@ DEPENDENCIES
shotgun
sinatra
thin

RUBY VERSION
ruby 2.2.0p0

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.
27 changes: 26 additions & 1 deletion app.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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 protected](/.+@.+/)
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'))
Expand Down Expand Up @@ -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
Expand Down
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.
Empty file modified public/favicon.ico
100644 → 100755
Empty file.
Empty file modified public/images/.keep
100644 → 100755
Empty file.
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.
Binary file added public/images/sam.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/javascripts/.keep
100644 → 100755
Empty file.
Empty file modified public/stylesheets/.keep
100644 → 100755
Empty file.
72 changes: 71 additions & 1 deletion public/stylesheets/main.css
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ html {
line-height: 1.4;
}




}

/*
* Remove text-shadow in selection highlight:
* https://twitter.com/miketaylr/status/12228805301
Expand Down Expand Up @@ -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;


}



Expand Down
13 changes: 13 additions & 0 deletions spec/one_test_spec.rb
Original file line number Diff line number Diff line change
@@ -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
Empty file modified spec/spec_helper.rb
100644 → 100755
Empty file.
Empty file modified views/.keep
100644 → 100755
Empty file.
24 changes: 19 additions & 5 deletions views/home.erb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,14 +1,28 @@
<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 %>
<form method=POST action="/subscribe">
<form method=POST action="/subscribe">
<label for="full-name">Full Name</label>
<input type="text" id="full-name" name="full_name" value="<%= @full_name %>" required>
<label for="email">Email</label>
<input type="text" id="email" name="email" value="<%= @email %>" required>
<label for="city">City</label>
<input type="text" id ="city" name="city" value="<%= @city %>" required>
<input type="Submit">
</form>
<% else %>
<form method=POST action="/subscribe">
<label for="full-name">Full Name</label>
<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="city" required>
<input type="Submit">
</form>
</form>
<% end %>

<a href="/team">The Team</a>
2 changes: 1 addition & 1 deletion views/layout.erb
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<meta http-equiv="x-ua-compatible" content="ie=edge">
<title>Startup Sprint</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="icon" href="favicon.ico" type="image/x-icon"/>
<link rel="icon" href="favicon.ico" type="image/x-con"/>
<link rel="stylesheet" href="stylesheets/main.css">
</head>
<body>
Expand Down
9 changes: 9 additions & 0 deletions views/rainbow.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<div class="container">
<div class="red">&nbsp;</div>
<div class="orange">&nbsp;</div>
<div class="yellow">&nbsp;</div>
<div class="green">&nbsp;</div>
<div class="blue">&nbsp;</div>
<div class="indigo">&nbsp;</div>
<div class="violet">&nbsp;</div>
</div>
Empty file modified views/reddit.erb
100644 → 100755
Empty file.
4 changes: 2 additions & 2 deletions views/schedule.erb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
<div>
<div class="column">
<div class="column1">
<h3>Today</h3>
<ol>
<% @today.each do |item| %>
<li><%= item.first %>: <%= item.last %></li>
<% end %>
</ol>
</div>
<div class="column">
<div class="column2">
<h3>Tomorrow</h3>
<ol>
<% @tomorrow.each do |item| %>
Expand Down
77 changes: 77 additions & 0 deletions views/splash.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<html>
<head>
<title>Welcome!</title>

<style type="text/CSS">
body {
background-image: url("images/sam.jpg");
background-size: cover;
}
h8 {
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
text-align: center;
color: white;
font-size: 80px;
position: absolute;
top:45px;
bottom: 0;
left: 0;
right: 0;
padding-bottom:20;
padding-top:20;
text-shadow: 2px 2px 4px #000000;
}
p1 {
position: fixed;
bottom:0;
left:0;
right:0;
text-align: center;
}
button {
background-color: #730505; /* Firebrick */
border: none;
color: white;
padding: 10px 32px;
text-align: center;
text-decoration: none;
display: inline-block;
font-size: 20px;
width:100%;
height:45px;
font-family: "Lucida Sans Unicode", "Lucida Grande", sans-serif;
opacity:0.6;
font-weight: bold;
}
</style>

<script type="text/javascript">

window.onload=timeout;
function timeout(){
window.setTimeout("redirect()",3000)}
var div = document.getElementById("mybutton");
// Prints: function onclick(event) { alert('old') }
// div.onclick = redirect();
function redirect(){
window.location="/"
return}

</script>

</head>
<body>
<body onload="timeout()">
<span class="s1"><div class="splash fade-in">
</span> <h8>FLATIRON SCHOOL + <br> VENTURE FOR AMERICA</h8>
<p1><form>
<button id="mybutton" type="submit" value="Continue to Website" onclick="return redirect();">Continue to Website</button>
</form></p1>
</div>

<br>



</body>
</html>
1 change: 1 addition & 0 deletions views/subscribe.erb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<p>Thanks for subscribing <%= @full_name %></p>
<p>Your city is set to <%= @city %></p>

<a href="/">Home</a>
30 changes: 30 additions & 0 deletions views/team.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<h1>The Team</h1>

<table>
<colgroup>
</colgroup>

<tr>
<th> Kyle Wilcox </th>
<th> Cherie Chung </th>
<th> Magdalene McArthur </th>
</tr>

<tr>
<td><img src="http://ventureforamerica.org/wp-content/uploads/Kyle-Wilcox-500x500.png" style="width:128px;height:128px;"></td>
<td><img src="http://ventureforamerica.org/wp-content/uploads/cherie_chung_1024-500x500.jpg" style="width:128px;height:128px;"></td>
<td><img src="http://ventureforamerica.org/wp-content/uploads/Magdalene-McArthur-500x500.png" style="width:128px;height:128px;"></td>
</tr>

<tr>
<th> Ben Romero </th>
<th> Jim Clarke </th>
</tr>

<tr>
<td><img src="http://ventureforamerica.org/wp-content/uploads/John-Romero-500x500.png" style="width:128px;height:128px;"></td>
<td><img src="http://ventureforamerica.org/wp-content/uploads/Jim-Clarke-500x500.png" style="width:128px;height:128px;"></td>
</tr>
</table>

<a href="/">Home</a>
4 changes: 4 additions & 0 deletions views/youtube.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<div class="youtube">
<iframe width="640" height="360" src="https://www.youtube.com/embed/QH2-TGUlwu4" frameborder="0" allowfullscreen></iframe>

</div>