-
Notifications
You must be signed in to change notification settings - Fork 27
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
My Movie Project #11
base: master
Are you sure you want to change the base?
My Movie Project #11
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,129 @@ | ||
h1 { | ||
text-align: center; | ||
color: rgb(52, 73, 94); | ||
font-size: 40px; | ||
} | ||
|
||
h2 { | ||
color: white; | ||
text-align: center; | ||
color: rgb(236, 240, 241); | ||
} | ||
#error1 { | ||
text-align: center; | ||
color:rgba(236, 38, 44,1.0); | ||
} | ||
#error3 { | ||
text-align: center; | ||
color: rgb(236, 240, 241); | ||
} | ||
|
||
form { | ||
text-align: center; | ||
font-family : inherit; | ||
font-size : 30px; | ||
color: rgb(236, 240, 241); | ||
|
||
} | ||
.search { | ||
height: 30px; | ||
width: 300px; | ||
font-size: 15px; | ||
} | ||
|
||
body { | ||
background-image: url("http://www.hollywoodreporter.com/sites/default/files/2011/12/imdb_a.jpg"); | ||
background-repeat: no-repeat; | ||
background-size: cover; | ||
} | ||
|
||
p { | ||
color: rgb(236, 240, 241); | ||
} | ||
#second_head { | ||
text-decoration: underline; | ||
} | ||
a { | ||
display: block; | ||
margin-right: auto; | ||
margin-left: auto; | ||
color: white; | ||
font-size: 35px; | ||
text-decoration: none; | ||
|
||
} | ||
a:hover { | ||
color:maroon; | ||
} | ||
|
||
#picture { | ||
float: left; | ||
margin: 0 2em 0 12em; | ||
} | ||
#goback { | ||
text-align: center; | ||
color: white; | ||
} | ||
.movies { | ||
text-align: center; | ||
color: rgb(127, 140, 141) | ||
} | ||
|
||
#words { | ||
/*text-align: center;*/ | ||
color: rgb(127, 140, 141); | ||
font-size: 23px; | ||
} | ||
|
||
.button { | ||
text-align: center; | ||
background-color:#4b3f39; | ||
font-family: 'Open Sans', sans-serif; | ||
font-size:20px; | ||
text-decoration:none; | ||
color:#fff; | ||
position:relative; | ||
padding:10px 20px; | ||
padding-right:50px; | ||
background-image: linear-gradient(bottom, rgb(62,51,46) 0%, rgb(101,86,78) 100%); | ||
border-radius: 5px; | ||
box-shadow: inset 0px 1px 0px #9e8d84, 0px 5px 0px 0px #322620, 0px 10px 5px #999; | ||
} | ||
|
||
.button:active { | ||
top:3px; | ||
background-image: linear-gradient(bottom, rgb(62,51,46) 100%, rgb(101,86,78) 0%); | ||
box-shadow: inset 0px 1px 0px #9e8d84, 0px 2px 0px 0px #322620, 0px 5px 3px #999; | ||
} | ||
|
||
.button::before { | ||
background-color:#322620; | ||
background-image:url(http://www.clker.com/cliparts/0/5/7/9/1195435734741708243kuba_arrow_button_set_2.svg.med.png); background-repeat:no-repeat; | ||
background-position:center center; | ||
content:""; | ||
width:20px; | ||
height:20px; | ||
position:absolute; | ||
right:15px; | ||
top:50%; | ||
margin-top:-9px; | ||
border-radius: 50%; | ||
box-shadow: inset 0px 1px 0px #19120f, 0px 1px 0px #827066; | ||
} | ||
|
||
.button:active::before { | ||
top:50%; | ||
margin-top:-12px; | ||
box-shadow: inset 0px 1px 0px #827066, 0px 3px 0px #19120f, 0px 6px 3px #382e29; | ||
} | ||
|
||
#second_button { | ||
display: block; | ||
width: 6em; | ||
} | ||
|
||
#end_button { | ||
text-align: center; | ||
display: block; | ||
width: 6em; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<br><br><br> | ||
<h1>Welcome to the Movie Search</h1> | ||
<br><br><br><br><br><br><br><br> | ||
|
||
<form id="form" action="/search" method="get"> | ||
Movie: <input class = "search" type="text" name="movie" placeholder="Enter movie here."><br> | ||
<input class="button" id="go_button" type="submit" value="Go!"> | ||
</form> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,11 @@ | ||
<!doctype html> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Your Title Here</title> | ||
<link rel="stylesheet" href="/stylesheets/style.css"> | ||
<title>Movie Search</title> | ||
</head> | ||
<body> | ||
|
||
<%= yield %> | ||
</body> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<% if @movies == nil %> | ||
<br><br><br><br> | ||
<h1 id="error1">ERROR!</h1> | ||
<br><br><br><br><br><br> | ||
<h2 id ="error2">The movie name you entered didn't match any movie on file</h1> | ||
<br><br> | ||
<h3 id ="error3">Please go back and enter a different movie name.</h3> | ||
<br><br><br><br><br><br><br> | ||
<a class ="button" id="second_button" href="/">Go Back</a> | ||
|
||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I reviewed your app and I don't see too much room for improvement. Which is good. I like your error messages if @movies == nil. I see that you use a lot of |
||
<% else %> | ||
<br><br><br><br> | ||
<h1 id="second_head"> Results </h1> | ||
<div class="movies"> <% @movies.each do |item| %> | ||
<li> <a href='/show/<%=item["imdbID"]%>'> | ||
<%=item["Title"]%> - <%=item["Year"]%></a> | ||
</li> | ||
<%end%> | ||
</div> | ||
<%end%> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
<h1 id="movie_title"><%=@result2["Title"]%></h1> | ||
<br><br><br> | ||
<div class ="elements"> | ||
<img id="picture" src='<%=@picture%>'/> | ||
<div id ="words"> | ||
<p id="director">Director: <%= @result2["Director"] %></p> | ||
<p id="">Released Year: <%= @result2["Released"] %></p> | ||
<p id="rated">Rated: <%= @result2["Rated"] %></p> | ||
<p id="runtime">Runtime: <%= @result2["Runtime"] %></p> | ||
<p id="genre">Genre: <%= @result2["Genre"] %></p> | ||
<!-- <p id="plot">Plot: <%= @result2["Plot"] %></p> --> | ||
<p id="actors">Actors: <%= @result2["Actors"] %></p> | ||
</div> | ||
<br><br><br><br><br><br><br><br> | ||
<a class ="button" id="end_button" href="/">Main Page</a> | ||
</div> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be careful on with indentation