Source

article / article / templates / recipe_list.html

Scott Nixon 5ff5d7c 
Scott Nixon 06ca034 
Scott Nixon 5ff5d7c 

Scott Nixon f66ef8d 
Scott Nixon 06ca034 
Scott Nixon f66ef8d 

Scott Nixon a98a2e7 
Scott Nixon 5ff5d7c 
Scott Nixon f66ef8d 
Scott Nixon 5ff5d7c 
Scott Nixon 06ca034 
Scott Nixon 5ff5d7c 
Scott Nixon 06ca034 
Scott Nixon b253896 
Scott Nixon 5ff5d7c 


Scott Nixon 420980e 
Scott Nixon 06ca034 




Scott Nixon 5ff5d7c 
Scott Nixon 06ca034 
Scott Nixon 5ff5d7c 
Scott Nixon 06ca034 
Scott Nixon b253896 
Scott Nixon 06ca034 
Scott Nixon 5ff5d7c 
Scott Nixon 06ca034 
Scott Nixon 5ff5d7c 


Scott Nixon 8ae4c9a 
Scott Nixon 06ca034 







Scott Nixon b253896 

Scott Nixon 06ca034 
Scott Nixon 23f1f29 
Scott Nixon 06ca034 












Scott Nixon 8841264 
Scott Nixon 06ca034 

Scott Nixon 16114ef 
Scott Nixon 06ca034 





Scott Nixon 16114ef 

Scott Nixon 06ca034 
Scott Nixon 16114ef 

Scott Nixon 06ca034 

Scott Nixon 16114ef 

Scott Nixon 06ca034 









Scott Nixon 23f1f29 
Scott Nixon 3655f54 
Scott Nixon efc4513 
Scott Nixon b253896 

Scott Nixon 06ca034 

Scott Nixon 8ae4c9a 
Scott Nixon 06ca034 
Scott Nixon 16114ef 
Scott Nixon 23f1f29 
Scott Nixon 06ca034 
Scott Nixon 3655f54 
Scott Nixon 8ae4c9a 
Scott Nixon 8841264 
Scott Nixon 8ae4c9a 
Scott Nixon 8841264 
Scott Nixon 8ae4c9a 
Scott Nixon 8841264 
Scott Nixon efa0f2d 
Scott Nixon 8ae4c9a 
Scott Nixon 16114ef 
Scott Nixon 06ca034 






Scott Nixon 9ab9396 
Scott Nixon 06ca034 

Scott Nixon 23f1f29 
Scott Nixon 8ae4c9a 
Scott Nixon 06ca034 
Scott Nixon 16114ef 
Scott Nixon 8ae4c9a 
Scott Nixon 23f1f29 
Scott Nixon 06ca034 
Scott Nixon 3473994 

Scott Nixon 8ae4c9a 
Scott Nixon 06ca034 
Scott Nixon 3473994 
Scott Nixon 06ca034 






Scott Nixon b253896 
Scott Nixon 06ca034 

Scott Nixon 29cd2e7 

Scott Nixon 06ca034 


Scott Nixon 16114ef 
Scott Nixon 06ca034 
Scott Nixon 29cd2e7 
Scott Nixon 06ca034 






Scott Nixon b253896 
Scott Nixon 718e53c 
Scott Nixon b253896 
Scott Nixon 718e53c 

Scott Nixon b253896 




Scott Nixon 718e53c 
Scott Nixon b253896 











Scott Nixon 16114ef 



Scott Nixon b253896 
Scott Nixon 06ca034 


Scott Nixon 23f1f29 
Scott Nixon 3655f54 
Scott Nixon b253896 
Scott Nixon 3655f54 
Scott Nixon b253896 
Scott Nixon 3655f54 
Scott Nixon b253896 



Scott Nixon 3655f54 




Scott Nixon b253896 


Scott Nixon 3655f54 
Scott Nixon b253896 
Scott Nixon 3655f54 
Scott Nixon b253896 

Scott Nixon 16114ef 

Scott Nixon 06ca034 









Scott Nixon 5ff5d7c 
Scott Nixon efc4513 




{% extends "theme_base.html" %}

{% block meta %}
    <meta name="keywords" content="Vegan, Vegetarian, Recipes, low fat, Blog" />
    <meta name="description" content="Lindsay S. Nixon's recipes and cookbooks will save you money by using 'everyday' inexpensive ingredients, save you time with easy, no fuss recipes and improve your health with each nutritional bite." />

    <meta property="og:title" content="Recipe Index | Happy Herbivore"/>
    <meta property="og:type" content="website"/>
    <meta property="og:image" content="http://photos.happyherbivore.com/2012/04/FruitWithVeggies.jpg"/>
    <meta property="og:description"
          content="Lindsay S. Nixon's recipes and cookbooks will save you money by using 'everyday' inexpensive ingredients, save you time with easy, no fuss recipes and improve your health with each nutritional bite."/>
{% endblock %}

{% block css %}
    <!-- ad-gallery -->
    <link rel="stylesheet" type="text/css" href="//css.happyherbivore.com/jquery.ad-gallery.css">
{% endblock %}
   
{% block js %}
    <script type="text/javascript" src="//css.happyherbivore.com/jquery.ad-gallery-path.js"></script>
    <script type="text/javascript">
    $(function() {
      var galleries = $('.ad-gallery').adGallery();
    });
    </script>
{% endblock %}

{% block extra_head %}{% endblock %}

{% block head_title %}Recipe Index{% endblock %}

{% block body %}

    {% load generic_flatblocks %}
    {% load disqus_tags %}
    {% load humanize %}	
    {% load tagging_tags %}

  <div id="content">

      <!-- breadcrumb -->
      <div class="container">
        <div class="row">
          <div class="span12">
            <ul class="breadc clearfix">
              <li><a href="/">Home</a></li>
              <li><a href="/recipes/">Recipes</a></li>
            </ul>
            <h1 class="page-title">Happy Herbivore Recipes</h1>
          </div>
        </div>
      </div>

    <div id="outer-wrapper">
    
      <div class="container">
        <div class="wrapper-box">
        <!-- Content -->
        <div class="row">
          <div class="span6">
            <div class="recipes-carousel">            
              <div class="arrow-box">
                <p class="text">Featured</p>
              </div>


              <div id="gallery" class="ad-gallery">
                <div class="ad-image-wrapper">
                </div>
                <div class="ad-nav">
                  <div class="ad-thumbs">
                    <ul class="ad-thumb-list">

                      {% for i in sub_featured %}
                      <li>
                        <a {% for photo in i.recipephotos_set.all|slice:"1:2" %}href="{{ photo.url }}">{%endfor%}
                          <img {% for photo in i.recipephotos_set.all|slice:"1:2" %}src="{{ photo.url }}"{%endfor%} title="{{ i.recipe_name }}" alt="Total time: {{ i.total_time|floatformat }} mins" class="image{{ i.pk }}" />
                        </a>
                      </li>
				      {% endfor %}

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


            </div><!-- / recipes-carousel -->
          </div>
          <div class="span6">
             <div class="search-box">
                <h2>Search by Recipe Name</h2>
                <form action="/recipes/" method="get">
                  <input name="qname" type="text" id="recipe" value="{{ request.GET.qname }}" data-provide="typeahead" data-minLength='2' data-source='[{% for i in autocomplete %}"{{ i.recipe_name }}"{% if not forloop.last %},{% endif %}{% endfor %}]' required data-items="4" autocomplete="off"/>
                  <input type="submit" value="Find recipes" class="button-orange-big-round" />
                </form>
             </div><!-- / search-box -->

             
              <div class="form-box">
                
                <h2>Search by Ingredient Name</h2>
                <p>Select up to three ingredients you have available, and let us suggest the perfect recipe!</p>
                <form action="/recipes/" method="get">
                  <label for="ingredient1">Ingredient 1</label>
                  <input name="i1" type="text" id="ingredient1" value="{{ ingred1|default:'' }}" required />
                  <label for="ingredient2">Ingredient 2 (optional)</label>
                  <input name="i2" type="text" value="{{ ingred2|default:'' }}" id="ingredient2" />
                  <label for="ingredient3">Ingredient 3 (optional)</label>
                  <input name="i3" type="text" value="{{ ingred3|default:'' }}" id="ingredient3" />
                  <input type="submit" value="What can I make?" class="button-orange-big-round" />
                </form>
                <!---->
             </div><!-- / form-box -->

          </div>
        </div>

        <hr class="separator" />

        <div class="row" id="recipe-box">
          <div class="span3">
            <div class="filter">
              <h2>Filter by...</h2>
              <a href="/recipes/">Show All</a>

              {% tag_cloud_for_model article.Recipe as rcptags %}

              <h3>Tag Name</h3>
              <ul>
                {% for tag in rcptags %}                
                <li><a {%if tag_obj.name == tag.name %}class="selected" {%endif%}href="/recipes/{{ tag.name }}/#recipe-box">{{ tag.name }}</a></li>
	            {% endfor %}
              </ul>

            </div><!-- / filter -->
          </div>
          <div class="span9">
            <div class="gallery clearfix">
              <div class="gal-search">
                <div class="row">
                  <div class="span6">
                    <span>Showing {{ recipes.start_index }}-{{ recipes.end_index }} of {{ recipes_list.count }} plant-based recipes</span> 
                  </div>
                  <div class="span3">
                    
                    <!--
                    <span>sort results:</span>
                    <select id="sortby">
                      <option value="alpha">Alphanumeric</option> 
                      <option value="cat">Tag</option> 
                    </select>
                    -->
                  </div>
                </div>
                                

                
              </div><!-- / gal-search -->
              <div class="row">
                {% for recipe in recipes.object_list %}
                {% for photo in recipe.get_subfeature_photos|slice:":1" %}
                    <div class="span3">
                      <div class="recipe-wrapper">
                      <div class="recipe-img-wrapper">
                        <a href="/recipe/{{ recipe.recipe_slug }}/">
                          <img src="{{ photo.url }}" title="{{ recipe.recipe_name }}" 
                               alt="photo of {{ recipe.recipe_name }}"/></a>
                      </div>
                      <h4><a href="/recipe/{{ recipe.recipe_slug }}/">{{ recipe.recipe_name }}</a></h4>
                      </div>
                    </div>
                  {% empty %}
                    <div class="span3">
                       <div style="width:220px; height:178px; overflow:hidden;">
                         <a href="/recipe/{{ recipe.recipe_slug }}/">
                           <img src="http://img.happyherbivore.com/default/default-recipe-278x209.png" 
                              title="{{ recipe.recipe_name }}" alt="photo of {{ recipe.recipe_name }}"/></a>
                       </div>
                      <h4><a href="/recipe/{{ recipe.recipe_slug }}/">{{ recipe.recipe_name }}</a></h4>
                    </div>
                {% endfor %}
                {% endfor %}

                {% if errormsg %}
                    <p class="warning"><i class="icon-ban-circle"></i> {{ errormsg|safe }}</p>
                {% endif %}
                
              </div>
            </div><!-- / gallery -->

            {% if not recipes.object_list.count == 0 %}
            <div class="pagination">                
			{% if recipes.has_previous %}
				<a class="prev" href="?page={{ recipes.previous_page_number }}{{ queryparams }}#recipe-box">« Prev</a>
			{% endif %}
                <a href="?page={{ recipes.number }}{{ queryparams }}#recipe-box" class="current">{{ recipes.number }}</a> 


            {% if recipes.number !=  recipes.paginator.num_pages %}
              {% if recipes.number|add:"4" <  recipes.paginator.num_pages %}
                <a href="?page={{ recipes.next_page_number }}{{ queryparams }}#recipe-box">{{ recipes.next_page_number }}</a> 
                <a href="?page={{ recipes.next_page_number|add:"1" }}{{ queryparams }}#recipe-box">{{ recipes.next_page_number|add:"1" }}</a> 
                <a href="?page={{ recipes.next_page_number|add:"2" }}{{ queryparams }}#recipe-box">{{ recipes.next_page_number|add:"2" }}</a> 
                <a href="?page={{ recipes.next_page_number|add:"3" }}{{ queryparams }}#recipe-box">{{ recipes.next_page_number|add:"3" }}</a> 
                <a href="?page={{ recipes.next_page_number|add:"4" }}{{ queryparams }}#recipe-box">{{ recipes.next_page_number|add:"4" }}</a>
              {% endif %}
            {% endif%}
                ...
                <a href="?page={{ recipes.paginator.num_pages }}{{ queryparams }}#recipe-box">{{ recipes.paginator.num_pages }}</a> 
			{% if recipes.has_next %}
				<a class="next" href="?page={{ recipes.next_page_number }}{{ queryparams }}#recipe-box">Next »</a>
			{% endif %}             

            </div> <!-- /pagination -->
            {% endif %}
          </div>
        </div>

 
        </div><!-- /wrapper-box -->
      </div> <!-- /container -->

    </div><!-- / outer-wrapper -->
  </div><!-- / content -->  

{% endblock %}
{% block extra_body %}
{% endblock %}

{% block onready %}
$("#recipe").typeahead();
{% endblock %}