124 lines
5.4 KiB
HTML
124 lines
5.4 KiB
HTML
{% extends "base.html" %}
|
|
{% block extra_css %}
|
|
<link rel="stylesheet" href="/static/css/book_list.css">
|
|
<link rel="stylesheet" href="/static/css/book_panel2.css">
|
|
<link rel="stylesheet" href="/static/css/search.css">
|
|
<style type="text/css">
|
|
#scrolldown:last-child{ display:block}
|
|
#scrolldown{ display:none}
|
|
</style>
|
|
{% endblock %}
|
|
{% block extra_head %}
|
|
<script type="text/javascript" src="/static/js/wishlist.js"></script>
|
|
<script type="text/javascript" src="/static/js/greenpanel.js"></script>
|
|
<script type="text/javascript" src="/static/js/toggle.js"></script>
|
|
<script type="text/javascript" src="/static/js/jquery.endless-scroll.js"></script>
|
|
<script type="text/javascript">
|
|
var $j = jQuery.noConflict();
|
|
var page = 1;
|
|
$j(document).ready(function() {
|
|
$j(document).endlessScroll({
|
|
bottomPixels: 250,
|
|
fireOnce: false,
|
|
fireDelay: false,
|
|
insertAfter: "#results-bottom",
|
|
loader: '<img src="/static/images/loading.gif" alt="loading..." />',
|
|
callback: function(p) {
|
|
page += 1;
|
|
var url = "?q={{ q }}&page=" + page;
|
|
$j.get(url, function(html) {
|
|
var view = $j(".listview").length > 0 ? "list" : "panel";
|
|
var results = $j(html).find(".book");
|
|
$j("#results").append(results);
|
|
if (view === "list") toggleList();
|
|
else togglePanel();
|
|
setupWishlistControls();
|
|
});
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
{% endblock %}
|
|
|
|
{% block title %}Google Books search results{% endblock %}
|
|
|
|
{% block content %}
|
|
<div id="main-container">
|
|
<div class="js-main">
|
|
<div id="js-leftcol">
|
|
{% include "explore.html" %}
|
|
</div>
|
|
|
|
<div id="js-maincol-fr">
|
|
<div class="js-maincol-inner">
|
|
<div id="content-block">
|
|
{% if campaign_works %}
|
|
<div class="content-block-heading">
|
|
<h2 class="content-heading">These books are Free, or want to be!</span></h2>
|
|
<ul class="book-list-view">
|
|
<li>View As:</li>
|
|
<li class="view-list">
|
|
<a href="#" id="toggle-list">
|
|
<img src="/static/images/booklist/view-list.png" align="view list" title="view list" height="21" width="24" alt="use list view" />
|
|
</a>
|
|
</li>
|
|
<li class="view-list">
|
|
<a href="#" id="toggle-panel">
|
|
<img src="/static/images/booklist/view-icon.png" align="view icon" title="view icon" height="22" width="22" alt="use panel view" />
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</div>
|
|
<div id="content-block-content-1"><div id="unglueit-results" style="margin-bottom: 3em;">
|
|
{% for work in campaign_works %}
|
|
<div class="{% cycle 'row1' 'row2' %} book">
|
|
{% with work.googlebooks_id as googlebooks_id %}
|
|
{% with work.last_campaign_status as status %}
|
|
{% with work.last_campaign.deadline as deadline %}
|
|
{% include "book_panel.html" %}
|
|
{% endwith %}{% endwith %}{% endwith %}
|
|
</div>
|
|
{% endfor %}
|
|
</div></div>
|
|
{% endif %}
|
|
<div class="content-block-heading">
|
|
<h2 class="content-heading"><a href="https://www.google.com/search?q={{q }}&tbm=bks">Google Books</a> search results</span></h2>
|
|
|
|
{% if not campaign_works %}
|
|
<ul class="book-list-view">
|
|
<li>View As:</li>
|
|
<li class="view-list">
|
|
<a href="#" id="toggle-list">
|
|
<img src="/static/images/booklist/view-list.png" align="view list" title="view list" height="21" width="24" alt="use list view" />
|
|
</a>
|
|
</li>
|
|
<li class="view-list">
|
|
<a href="#" id="toggle-panel">
|
|
<img src="/static/images/booklist/view-icon.png" align="view icon" title="view icon" height="22" width="22" alt="use panel view" />
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
{% endif %}
|
|
</div>
|
|
<div id="content-block-content"><div id="results">
|
|
<div id="scrolldown" style=" text-indent: 12em; margin-bottom: 1em;">(scroll down to see Google Books results)</div>
|
|
{% for work in results %}
|
|
{% if not work.last_campaign %}
|
|
<div class="{% cycle 'row1' 'row2' %} book">
|
|
{% with work.googlebooks_id as googlebooks_id %}
|
|
{% with 'yes' as on_search_page %}
|
|
{% include "book_panel.html" %}
|
|
{% endwith %}{% endwith %}
|
|
</div>
|
|
{% endif %}
|
|
{% endfor %}
|
|
</div></div>
|
|
<div id="results-bottom"></div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
{% endblock %}
|