Skip to content

Commit

Permalink
correction in recipies
Browse files Browse the repository at this point in the history
  • Loading branch information
hmtanbir committed Feb 27, 2016
1 parent 0f5b047 commit e9fac95
Show file tree
Hide file tree
Showing 8 changed files with 228 additions and 281 deletions.
167 changes: 105 additions & 62 deletions .idea/workspace.xml

Large diffs are not rendered by default.

Binary file added app/assets/images/footer-bg-full.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/assets/stylesheets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2785,7 +2785,7 @@ a.mean-expand {
opacity: 1;
}
.footer-boxed .footer-inner {
background-image: url("temp-images/footer-bg.jpg");
background-image: url("footer-bg-full.jpg");
}
.footer-fluid {
background-image: url("temp-images/footer-bg-full.jpg");
Expand Down
8 changes: 1 addition & 7 deletions app/controllers/recipes_controller.rb
Original file line number Diff line number Diff line change
@@ -1,15 +1,9 @@
class RecipesController < ApplicationController
before_action :set_recipe, only: [:show, :edit, :update, :destroy]
before_action :authenticate_user!,except: [:recipe,:show]
before_action :authenticate_user!,except: [:index,:show]
# GET /recipes
# GET /recipes.json


def recipe
@recipes = Recipe.all
end


def index
@recipes = Recipe.all
end
Expand Down
4 changes: 2 additions & 2 deletions app/views/layouts/_footer.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,10 @@
</div>
</div>
<div class="footer-copyright text-center wow animated flipInY">
<p>&copy; Copyright 2015 All Rights Reserved by <a href="#">Majestic Themes</a></p>
<p>&copy; Copyright 2016 All Rights Reserved by <a href="#">BDMADE</a></p>
</div>
<div class="corner-image wow animated fadeInRight">
<img src="images/footer-corner-image.jpg" alt="image"/>
<img src="images/footer-corner-image1.jpg" alt="image"/>
</div>
</div>
</div>
Expand Down
119 changes: 119 additions & 0 deletions app/views/recipes/index.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
<% if user_signed_in? %>

<p id="notice"><%= notice %></p>

<h1>Listing Recipes</h1>
Expand Down Expand Up @@ -29,3 +31,120 @@
<br>

<%= link_to 'New Recipe', new_recipe_path %>

<% else %>

<div class="recipes-home-body">
<div class="container">
<div class="row">
<div class="col-md-8 col-lg-9">
<div class="body-contents">

<div class="recipe-set">
<h2>All Recipes</h2>

<div class="boxed-recipes text-center">

<% @recipes.each do |p| %>
<!--single recipe-->
<div class="recipe-single animated wow flipInY">
<div class="recipe-image">
<a href="<%= recipe_path(p.id) %>"><%= image_tag p.image.url(:medium) %></a>
</div>
<div class="outer-detail">
<div class="detail">
<h3><a href="<%= recipe_path(p.id) %>"><%= p.title %></a></h3>

<div class="short-separator"></div>
<div class="rating-box">
<span class="rating-icons"><svg class="icon-container" width="25" height="19" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 19">

<g>
<title>background</title>
<rect fill="none" height="21" width="27" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<path class="icon-svg"
d="m24.671816,17.625433c0,0.438 -0.286999,0.801001 -0.681,0.935001c-0.095001,0.036999 -0.198002,0.064999 -0.318001,0.064999l-16.000998,0c-0.553,0 -1,-0.448 -1,-1c0,-0.553999 0.447,-1 1,-1l14.950999,0c-0.500999,-5.053999 -4.764997,-9 -9.950999,-9c-5.523,0 -10,4.477001 -10,10c0,0 0.063,1 -1,1c-1.062,0 -1,-1 -1,-1c0,-5.769999 4.071,-10.581999 9.495001,-11.734999c-0.306002,-0.52 -0.495001,-1.117001 -0.495001,-1.765001c0,-1.933999 1.566999,-3.499999 3.5,-3.499999c1.931999,0 3.499,1.567 3.499,3.499999c0,0.739 -0.232998,1.423 -0.624998,1.989c4.984999,1.459 8.625998,6.056 8.625998,11.511l0,0zm-11.499,-15c-0.828999,0 -1.500999,0.670001 -1.500999,1.499001c0,0.827999 0.672001,1.5 1.500999,1.5c0.828001,0 1.499001,-0.672001 1.499001,-1.5c0,-0.829 -0.671,-1.499001 -1.499001,-1.499001l0,0z"
clip-rule="evenodd" fill-rule="evenodd"/>
</g>
</svg></span>
<span class="rating-icons"><svg class="icon-container" width="25" height="19" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 19">

<g>
<title>background</title>
<rect fill="none" height="21" width="27" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<path class="icon-svg"
d="m24.671816,17.625433c0,0.438 -0.286999,0.801001 -0.681,0.935001c-0.095001,0.036999 -0.198002,0.064999 -0.318001,0.064999l-16.000998,0c-0.553,0 -1,-0.448 -1,-1c0,-0.553999 0.447,-1 1,-1l14.950999,0c-0.500999,-5.053999 -4.764997,-9 -9.950999,-9c-5.523,0 -10,4.477001 -10,10c0,0 0.063,1 -1,1c-1.062,0 -1,-1 -1,-1c0,-5.769999 4.071,-10.581999 9.495001,-11.734999c-0.306002,-0.52 -0.495001,-1.117001 -0.495001,-1.765001c0,-1.933999 1.566999,-3.499999 3.5,-3.499999c1.931999,0 3.499,1.567 3.499,3.499999c0,0.739 -0.232998,1.423 -0.624998,1.989c4.984999,1.459 8.625998,6.056 8.625998,11.511l0,0zm-11.499,-15c-0.828999,0 -1.500999,0.670001 -1.500999,1.499001c0,0.827999 0.672001,1.5 1.500999,1.5c0.828001,0 1.499001,-0.672001 1.499001,-1.5c0,-0.829 -0.671,-1.499001 -1.499001,-1.499001l0,0z"
clip-rule="evenodd" fill-rule="evenodd"/>
</g>
</svg></span>
<span class="rating-icons"><svg class="icon-container" width="25" height="19" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 19">

<g>
<title>background</title>
<rect fill="none" height="21" width="27" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<path class="icon-svg"
d="m24.671816,17.625433c0,0.438 -0.286999,0.801001 -0.681,0.935001c-0.095001,0.036999 -0.198002,0.064999 -0.318001,0.064999l-16.000998,0c-0.553,0 -1,-0.448 -1,-1c0,-0.553999 0.447,-1 1,-1l14.950999,0c-0.500999,-5.053999 -4.764997,-9 -9.950999,-9c-5.523,0 -10,4.477001 -10,10c0,0 0.063,1 -1,1c-1.062,0 -1,-1 -1,-1c0,-5.769999 4.071,-10.581999 9.495001,-11.734999c-0.306002,-0.52 -0.495001,-1.117001 -0.495001,-1.765001c0,-1.933999 1.566999,-3.499999 3.5,-3.499999c1.931999,0 3.499,1.567 3.499,3.499999c0,0.739 -0.232998,1.423 -0.624998,1.989c4.984999,1.459 8.625998,6.056 8.625998,11.511l0,0zm-11.499,-15c-0.828999,0 -1.500999,0.670001 -1.500999,1.499001c0,0.827999 0.672001,1.5 1.500999,1.5c0.828001,0 1.499001,-0.672001 1.499001,-1.5c0,-0.829 -0.671,-1.499001 -1.499001,-1.499001l0,0z"
clip-rule="evenodd" fill-rule="evenodd"/>
</g>
</svg></span>
<span class="rating-icons"><svg class="icon-container" width="25" height="19" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 19">

<g>
<title>background</title>
<rect fill="none" height="21" width="27" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<path class="icon-svg"
d="m24.671816,17.625433c0,0.438 -0.286999,0.801001 -0.681,0.935001c-0.095001,0.036999 -0.198002,0.064999 -0.318001,0.064999l-16.000998,0c-0.553,0 -1,-0.448 -1,-1c0,-0.553999 0.447,-1 1,-1l14.950999,0c-0.500999,-5.053999 -4.764997,-9 -9.950999,-9c-5.523,0 -10,4.477001 -10,10c0,0 0.063,1 -1,1c-1.062,0 -1,-1 -1,-1c0,-5.769999 4.071,-10.581999 9.495001,-11.734999c-0.306002,-0.52 -0.495001,-1.117001 -0.495001,-1.765001c0,-1.933999 1.566999,-3.499999 3.5,-3.499999c1.931999,0 3.499,1.567 3.499,3.499999c0,0.739 -0.232998,1.423 -0.624998,1.989c4.984999,1.459 8.625998,6.056 8.625998,11.511l0,0zm-11.499,-15c-0.828999,0 -1.500999,0.670001 -1.500999,1.499001c0,0.827999 0.672001,1.5 1.500999,1.5c0.828001,0 1.499001,-0.672001 1.499001,-1.5c0,-0.829 -0.671,-1.499001 -1.499001,-1.499001l0,0z"
clip-rule="evenodd" fill-rule="evenodd"/>
</g>
</svg></span>
<span class="rating-icons"><svg class="icon-container" width="25" height="19" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 25 19">

<g>
<title>background</title>
<rect fill="none" height="21" width="27" y="-1" x="-1"/>
</g>
<g>
<title>Layer 1</title>
<path class="icon-svg"
d="m24.671816,17.625433c0,0.438 -0.286999,0.801001 -0.681,0.935001c-0.095001,0.036999 -0.198002,0.064999 -0.318001,0.064999l-16.000998,0c-0.553,0 -1,-0.448 -1,-1c0,-0.553999 0.447,-1 1,-1l14.950999,0c-0.500999,-5.053999 -4.764997,-9 -9.950999,-9c-5.523,0 -10,4.477001 -10,10c0,0 0.063,1 -1,1c-1.062,0 -1,-1 -1,-1c0,-5.769999 4.071,-10.581999 9.495001,-11.734999c-0.306002,-0.52 -0.495001,-1.117001 -0.495001,-1.765001c0,-1.933999 1.566999,-3.499999 3.5,-3.499999c1.931999,0 3.499,1.567 3.499,3.499999c0,0.739 -0.232998,1.423 -0.624998,1.989c4.984999,1.459 8.625998,6.056 8.625998,11.511l0,0zm-11.499,-15c-0.828999,0 -1.500999,0.670001 -1.500999,1.499001c0,0.827999 0.672001,1.5 1.500999,1.5c0.828001,0 1.499001,-0.672001 1.499001,-1.5c0,-0.829 -0.671,-1.499001 -1.499001,-1.499001l0,0z"
clip-rule="evenodd" fill-rule="evenodd"/>
</g>
</svg></span>
<span class="rating-figure">(4.1 / 5)</span>
</div>
</div>
</div>
</div>
<!--single recipe ends-->
<% end %>

</div>
</div>



</div>
</div>
<div class="col-md-4 col-lg-3">

</div>
</div>
</div>
</div>




<% end %>
Loading

0 comments on commit e9fac95

Please sign in to comment.