Skip to content
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

Carets- Julia Meier- API Muncher #25

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
43689ef
initial setup. copied lib and lib_test files from previous project. m…
julmeier Nov 1, 2017
b2d35cc
added recipes_controller
julmeier Nov 1, 2017
86dde1e
added config.autoload_paths line to the config/application.rb file
julmeier Nov 1, 2017
b3d54f1
continued testing of edamam_api_wrapper. Found some leftover text aft…
julmeier Nov 1, 2017
17fea3b
created controller methods and made index and search html pages. Was …
julmeier Nov 2, 2017
7b7cb33
made show controller, route and view
julmeier Nov 2, 2017
96a423f
created show_recipe method. modified list_recipes method to take in t…
julmeier Nov 2, 2017
86d29f0
save of number_of_recipes/10 loop in the search view. experimenting w…
julmeier Nov 3, 2017
5d36257
figured out how to pass the from/to parameters to the controller. Abo…
julmeier Nov 3, 2017
a7e2304
some nuggets of wisdom from dee about how to inject from/to into the …
julmeier Nov 3, 2017
48e4dd3
got help from dee to finish with pagination. found out that the API o…
julmeier Nov 3, 2017
b81cdc9
added additional elements to show page. will start to refactor contro…
julmeier Nov 3, 2017
cb93b6f
added logic to search view to display the pagination correctly when t…
julmeier Nov 3, 2017
d9a40cf
additional refactoring
julmeier Nov 3, 2017
8484a07
commented out require stuff at the top of controllers
julmeier Nov 3, 2017
2a57fd1
changed line 12 in search.html to consider nil class based on heroku …
julmeier Nov 3, 2017
dae937d
added required lines to the application.rb and production.rb based on…
julmeier Nov 3, 2017
737276d
changed line 12 in search view to be &&
julmeier Nov 3, 2017
a533fe2
removed the portion of the view page that displays the pagination bec…
julmeier Nov 3, 2017
6e27d54
added back in the pagination view code. Took it out to see if it was …
julmeier Nov 3, 2017
2401968
added require dependency to the API controller too
julmeier Nov 3, 2017
cf5b4c4
added styling to the form and search pages. having issue oissue of wr…
julmeier Nov 5, 2017
f0208ef
continued styling on show and search pages. The Health Information da…
julmeier Nov 5, 2017
2a3f897
can't get the photo captions to wrap
julmeier Nov 5, 2017
a5b9107
fixed columns on the show page so that all content lines up correctly
julmeier Nov 5, 2017
86650bd
heroku is not uploading my background image for the search headers. a…
julmeier Nov 5, 2017
fc33205
removed config.assets.compile = false from production.rb
julmeier Nov 5, 2017
b236ded
finished all required styling
julmeier Nov 5, 2017
823c83a
centered grid on results page. on an xlarge screen, the home page has…
julmeier Nov 5, 2017
3fda7b6
tried to fix gap between footer and image on home page- no go
julmeier Nov 5, 2017
868b12d
changed name to What's Cookin'?
julmeier Nov 5, 2017
d628354
fixed CSS mistakes that were preventing upload to heroku
julmeier Nov 6, 2017
5f1550b
controller testing ongoing. saving because computer is getting blippy
julmeier Nov 6, 2017
f5fe8d5
changed failure case from @keywords.nil? to @keywords.blank? after te…
julmeier Nov 6, 2017
29bbac7
additional controller tests
julmeier Nov 6, 2017
f4f1af7
additional model and controller testing
julmeier Nov 6, 2017
d86e89f
Chris helped me get lib tests to work by recreating postgres. Fixed l…
julmeier Nov 6, 2017
25d67ab
changed CSS body to 100% height which fixed smartphone issues with la…
julmeier Nov 14, 2017
8d869b2
changed footer CSS on results page so that it's fixed to the bottom (…
julmeier Nov 14, 2017
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
Prev Previous commit
Next Next commit
finished all required styling
julmeier committed Nov 5, 2017
commit b236dedeed616551f6a73bb4533186b4fcfe21b4
File renamed without changes
68 changes: 60 additions & 8 deletions app/assets/stylesheets/application.css
Original file line number Diff line number Diff line change
@@ -28,38 +28,88 @@
body {
position: relative;
/*margin: 2em;*/
padding-bottom: 6rem;
/*padding-bottom: 6rem;*/
min-height: 100%;
}

/**
* Footer Styles
*/

.footer {
font-family: 'Delius Unicase', cursive;
.footer-search-and-show {
position: absolute;
right: 0;
bottom: 0;
left: 0;
padding: 1rem;
background-color: #efefef;
text-align: center;
}

.footer-index a {
color: white
}

.footer-index a:hover {
color: red;
}

.footer-index {
position: absolute;
right: 0;
bottom: 0;
left: 0;
padding: 1rem;
background-color: #3a9e53;
text-align: center;
color: white;
}

#footer-style {
font-family: 'Delius Unicase', cursive;
}

/**********INDEX PAGE*******************/
/**********INDEX PAGE*******************/
/**********INDEX PAGE*******************/

.home-page-container {
#home-logo {
font-family: 'Delius Unicase', cursive;
font-size: 4em;
color: white;
}

.home-page-container {
font-family: 'Delius Unicase', cursive;
background-image: url(italian-cuisine.jpg);
background-repeat: no-repeat;
background-position: center;
background-size:cover;
display: block;
/*height: 100%;*/
position: relative;
padding: 200px 50px 300px 50px;
/*padding: inherit;*/
margin: 0;
}
span {
text-align: center;
}

.home-page-search {
display: flex;
justify-content: center;
align-items: center;
flex-direction: row;
}


.home-page-search div {
width: 300px;
}
/**********PAGE HEADER (FORM)*******************/
.page-header h1 {

}

.page-header {
display: flex;
@@ -150,8 +200,12 @@ body {
}
/*****PAGINATION*****/
.pagination-container {
position: sticky;
display: flex;
align-items: center;
padding-bottom: 6rem;
min-height: 200px;

}

.page-numbers {
@@ -176,13 +230,11 @@ body {

.food-image, .ingredient-list {
margin: 2em;
max-width: 300px;
width: 300px;
}

.health-container, .dietary-container {
margin: 2em;

/*max-width: 50%*/
}

.health-container h4, .dietary-container h4 {
2 changes: 1 addition & 1 deletion app/assets/stylesheets/foundation.css
Original file line number Diff line number Diff line change
@@ -1189,7 +1189,7 @@ select {
vertical-align: middle;
margin: 0 0 1rem 0;
font-family: inherit;
padding: 0.85em 1em;
/*padding: 0.85em 1em;*/
-webkit-appearance: none;
border: 1px solid transparent;
border-radius: 3px;
6 changes: 0 additions & 6 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
@@ -18,11 +18,5 @@
<% end %>

<%= yield %>

<footer class="footer">
<h4>
Powered by <%= link_to "Edamam", "https://www.edamam.com/" %>
</h4>
</footer>
</body>
</html>
18 changes: 14 additions & 4 deletions app/views/recipes/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,9 +1,19 @@
<header .home-page-container>
<h1>Muncher</h1>
<nav>
<header class = "home-page-container">
<span>
<h1 id = "home-logo">Muncher</h1>
</span>
<span class = "home-page-search">
<div>
<%= form_tag recipes_search_path, :method => "get" do %>
<%= text_field_tag :keywords%>
<%= submit_tag "Search"%>
<% end %>
</nav>
</div>
</span>
</header>

<footer class="footer-index" id = "footer-style">
<h4>
Powered by <%= link_to "Edamam", "https://www.edamam.com/" %>
</h4>
</footer>
9 changes: 7 additions & 2 deletions app/views/recipes/search.html.erb
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@
<%= params %> -->
<section class="search-and-show-body">

<section "results-header">
<section class = "results-header">
<% unless params[:keywords] == nil %>
<h4>results for "<%= @keywords %>" </h4>
<%end%>
@@ -54,5 +54,10 @@
<h3>No recipes are available for those search terms</h3>
<%end%>


</section>

<footer class="footer-search-and-show" id = "footer-style">
<h4>
Powered by <%= link_to "Edamam", "https://www.edamam.com/" %>
</h4>
</footer>
26 changes: 16 additions & 10 deletions app/views/recipes/show.html.erb
Original file line number Diff line number Diff line change
@@ -31,19 +31,25 @@
<%end%>
</div>

<div class= "dietary-container">
<h4>Dietary Information</h4>
<%if @recipe.dietLabels.length == 0%>
<p>No available dietary information.</p>
<%else%>
<ul><%@recipe.dietLabels.each do |diet_label|%>
<li><%=diet_label%></li>
</ul>
<div class= "dietary-container">
<h4>Dietary Information</h4>
<%if @recipe.dietLabels.length == 0%>
<p>No available dietary information.</p>
<%else%>
<ul><%@recipe.dietLabels.each do |diet_label|%>
<li><%=diet_label%></li>
</ul>
<%end%>
<%end%>
<%end%>
</div>
</div>
</section>

<h4><%= link_to "Source Website", @recipe.url%> </h4>

</section>

<footer class="footer-search-and-show" id = "footer-style">
<h4>
Powered by <%= link_to "Edamam", "https://www.edamam.com/" %>
</h4>
</footer>