regluit/frontend/templates/home.html

288 lines
18 KiB
HTML
Executable File
Raw Blame History

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

{% extends "base.html" %}
{% load url from future %}
{% load truncatechars %}
{% block title %}— Support Free eBooks{% endblock %}
{% block extra_css %}
<link type="text/css" rel="stylesheet" href="/static/css/landingpage4.css" />
<link type="text/css" rel="stylesheet" href="/static/css/searchandbrowse2.css" />
<link type="text/css" rel="stylesheet" href="/static/css/book_panel2.css" />
{% endblock %}
{% block extra_js %}
<script type="text/javascript" src="{{ jquery_ui_home }}"></script>
<!-- toggle to panelview state instead of listview default -->
<script type="text/javascript">
jQuery(document).ready(function($) {
$('.listview').addClass("panelview").removeClass("listview");
});
var $j = jQuery.noConflict();
function put_un_in_cookie2(){
$j.cookie('un', $j('#id_username_main').val(), {path: '/', expires: 90 });
return true;
}
</script>
<script type="text/javascript" src="/static/js/definitions.js"></script>
<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/highlight_signup.js"></script>
<script type="text/javascript" src="/static/js/expand.js"></script>
<meta name="google-site-verification" content="wFZncBw5tNpwRVyR08NZFNr7WXqv5X1BkEga2fpUNOo" />
{% endblock %}
{% block topsection %}
{% include "learn_more.html" %}
{% endblock %}
{% block content %}
<div id="main-container" class="main-container-fl">
<div class="js-main" id="content-block">
<div id="js-maincol-fl">
<div id="js-main-container">
<h3 class="featured_books">Today's Featured Free eBook</h3>
{% with featured as work %}
<div class="book-detail">
<div id="book-detail-img" style="float:left;padding-right:10px">
<a href="{% url 'work' featured.id %}">
{% if work.googlebooks_id %}
<img src="{{ work.cover_image_thumbnail }}" alt="Find {{ work.title }} at Google Books" title="Find {{ work.title }} at Google Books" width="131" height="192" />
{% else %}
<img src="{{ work.cover_image_thumbnail }}" alt="{{ work.title }}" title="{{ work.title }}" width="131" height="192" />
{% endif %}
</a>
<div class="quicktour" style=" padding-top: 10px;padding-left: 5px;">
<div class="panelview panelfront side1">
<a href="{% url 'download' work.id %}" title="Download featured ebook" class="qtbutton qtreadittext hijax"><div class="read_itbutton qtreadit"><span>Read it Now</span></div></a>
</div>
</div>
</div>
<div class="book-detail-info" style="float:left;">
<div style="width: 520px;float: left;">
<div class="book-name" style="font-size:larger; margin-bottom:10px"><a href="{% url 'work' featured.id %}">{{ work.title }}</a></div>
<div>
<div class="pubinfo">
<div class="book-author">
<span>{{ work.relators.0.name }}</span>{% ifequal work.relators.count 2 %}
and <span>{{ work.relators.1.name }}</span>
{% endifequal %}{% if work.relators.count > 2 %}{% for author in work.relators %}{% if not forloop.first %}, <span>{{ author.name }}</span>{% endif %}{% endfor %}
{% endif %}
</div>
<div class="book-year">
{% if work.last_campaign.publisher %}
<span><a href="{% url 'bypubname_list' work.last_campaign.publisher.name.id %}">{{ work.last_campaign.publisher }}</a></span>
{% endif %}
<span>{{ work.publication_date }}</span>
</div>
<div class="book-description" style="max-height:200px;overflow:scroll"> {{ work.description|safe }}</div>
</div>
</div>
</div>
</div>
{% endwith %}
</div>
{% if faves %}
<div class="spacer"></div>
<h3 class="featured_books">Your Recent Faves</h3>
<div>
{% for work in faves %}
{% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %}
{% endwith %}
{% endfor %}
<a class="more_featured_books" href="{% url 'supporter' request.user %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
{% endif %}
{% if top_pledge %}
<div class="spacer"></div>
<h3 class="featured_books">Pledge to Make These eBooks Free</h3>
<div>
{% for campaign in top_pledge %}
{% with campaign.work as work %}
{% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %}
{% endwith %}{% endwith %}
{% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 'pledge' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
{% endif %}
<div class="spacer"></div>
<h3 class="featured_books">Read These Free Licensed eBooks</h3>
<div>
{% for work in cc_books %}
{% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %}
{% endwith %}
{% endfor %}
<a class="more_featured_books" href="{% url 'cc_list' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
<div class="spacer"></div>
{% if top_b2u %}
<h3 class="featured_books">Buy and Read These eBooks to Make Them Free</h3>
<div>
{% for campaign in top_b2u %}
{% with campaign.work as work %}
{% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %}
{% endwith %}{% endwith %}
{% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 'b2u' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
{% endif %}
<div class="spacer"></div>
{% if top_t4u %}
<h3 class="featured_books">Read These Free eBooks and Thank the Creators</h3>
<div>
{% for campaign in top_t4u %}
{% with campaign.work as work %}
{% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %}
{% endwith %}{% endwith %}
{% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 't4u' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
{% endif %}
<div class="spacer"></div>
<h3 class="featured_books">Read These Unglued eBooks - You've Made Them Free</h3>
<div>
{% for work in unglued_books %}
{% with work.googlebooks_id as googlebooks_id %}
{% include "book_panel.html" %}
{% endwith %}
{% endfor %}
<a class="more_featured_books" href="{% url 'campaign_list' 'unglued' %}"><i class="fa fa-arrow-circle-o-right fa-3x"></i></a>
</div>
<div class="spacer"></div>
</div>
<div id="js-rightcol">
<div class="js-rightcol-padd">
{% if not request.user.is_authenticated %}
<div class="jsmodule" id="mainlogin">
<h3 class="module-title">Start Ungluing Now!</h3>
<div class="jsmod-content">
<form action='{% url 'registration_register' %}' method='post' onsubmit="return put_un_in_cookie2();">{% csrf_token %}
<div class="user-name">
<label>Username</label>
<input id="id_username_main" type="text" class="required" name="username" maxlength="30" size="30" />
</div>
<div class="email">
<label>Email</label>
<input id="id_email_main" type="text" class="required" name="email" maxlength="75" size="30" />
</div>
<div class="password">
<label>Password</label>
<input id="id_password1_main" type="password" class="required" name="password1" size="30" />
</div>
<div class="password">
<label>Password (again):</label>
<input id="id_password2_main" type="password" class="required" name="password2" size="30" />
</div>
<div class="button">
<input type="submit" class="signup" value="Sign Up Now" onclick="this.disabled=true,this.form.submit();" />
</div>
<div class="google_signup" style="padding-bottom: 10px;">
<a class="btn btn-social btn-google-plus" href="{% url 'social:begin' "google-oauth2" %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}/next/{% endif %}" ><i class="fa fa-google"></i>Sign Up with Google</a>
</div>
<div class="google_signup">
<a class="btn btn-social btn-yahoo" href="{% url 'social:begin' "yahoo" %}?next={% if request.GET.next %}{{ request.GET.next|urlencode }}{% else %}/next/{% endif %}" ><i class="fa fa-yahoo"></i>Sign Up with Yahoo!</a>
</div>
</form>
</div>
</div>
{% endif %}
<div class="jsmodule">
<h3 class="module-title">News</h3>
<div class="jsmod-content">
Unglue.it is now a program of <a href="http://ebookfoundation.org/"> the Free Ebook Foundation</a>
</div>
</div>
<div class="jsmodule">
<h3 class="module-title">Latest Ungluing</h3>
<div class="jsmod-content">
<ul class="ungluingwhat">
{% for event in events %}
{% comment %}
events are tuples of date, object, and string representing object type
{% endcomment %}
<li>
{% with event.1 as object %}
{% ifequal event.2 "pledge" %}
{% if object.user%}
<span class="user-avatar">
<a href="{% url 'supporter' object.user.username %}"><img src="{{ object.user.profile.avatar_url }}" width="43" height="43" title="{{ object.user.username }}" alt="Avatar for {{ object.user.username }}" /></a>
</span>
<span class="user-book-info">
<a href="{% url 'supporter' object.user.username %}">{{ object.user.username }}</a><br />
{% ifequal object.campaign.type 1 %}
pledged to unglue
{% endifequal %}
{% ifequal object.campaign.type 2 %}
bought a copy of
{% endifequal %}
{% ifequal object.campaign.type 3 %}
supported
{% endifequal %}<br />
<a class="user-book-name" href="{% url 'work' object.campaign.work.id %}">{{ object.campaign.work.title }}</a>
</span>
{% else %}
<span class="user-avatar">
<img src="/static/images/header/anonuser.png" width="43" height="43" title="Anonymous User" alt="Avatar for Anonymous User" />
</span>
<span class="user-book-info">
Anonymous User<br />
supported <br />
<a class="user-book-name" href="{% url 'work' object.campaign.work.id %}">{{ object.campaign.work.title }}</a>
</span>
{% endif %}
{% else %}{% ifequal event.2 "comment" %}
<span class="user-avatar">
<a href="{% url 'supporter' object.user.username %}"><img src="{{ object.user.profile.avatar_url }}" width="43" height="43" title="{{ object.user.username }}" alt="Avatar for {{ object.user.username }}" /></a>
</span>
<span class="user-book-info">
<a href="{% url 'supporter' object.user.username %}">{{ object.user.username }}</a><br />
commented on<br />
<a class="user-book-name" href="{% url 'work' object.content_object.id %}?tab=2">{{ object.content_object.title }}</a>
</span>
{% else %}{% ifequal event.2 "wish" %}
<span class="user-avatar">
<a href="{% url 'supporter' object.wishlist.user.username %}"><img src="{{ object.wishlist.user.profile.avatar_url }}" width="43" height="43" title="{{ object.wishlist.user.username }}" alt="Avatar for {{ object.wishlist.user.username }}" /></a>
</span>
<span class="user-book-info">
<a href="{% url 'supporter' object.wishlist.user.username %}">{{ object.wishlist.user.username }}</a><br />
faved<br />
<a class="user-book-name" href="{% url 'work' object.work.id %}">{{ object.work.title }}</a>
</span>
{% endifequal %}{% endifequal %}{% endifequal %}
{% endwith %}
</li>
{% endfor %}
</ul>
</div>
</div>
<div class="jsmodule">
<h3 class="module-title">Questions?</h3>
<div id="jsmod-content">
Read our <a href="/faq/">general FAQ</a> or <a href="/faq/rightsholders/">Author/Publisher FAQ</a>.
</div>
</div>
</div>
</div>
<h3 class="featured_books">As seen on</h3>
<ul id="as_seen_on">
<li><a href="http://boingboing.net/2012/06/28/release-a-deadly-monster-a-dr.html"><img src="{{ STATIC_URL }}images/press_logos/boingboing_logo.png"></a></li>
<li><a href="http://www.zeit.de/digital/internet/2012-07/unglue-ebook-creative-commons"><img src="{{ STATIC_URL }}images/press_logos/die_zeit_logo.png"></a></li>
<li><a href="http://www.huffingtonpost.com/2012/05/21/unglueit-free-ebooks-crowdfunding_n_1532644.html"><img src="{{ STATIC_URL }}images/press_logos/huffington_post_logo.png"></a></li>
<li><a href="http://techcrunch.com/2014/05/06/unglue-it-sets-books-free-after-authors-get-paid/"><img src="{{ STATIC_URL }}images/press_logos/techcrunch_logo.png"></a></li>
<li><a href="http://www.thedigitalshift.com/2014/02/ebooks/buy-unglue-ebook-crowdfunding-model-goes-beta/"><img src="{{ STATIC_URL }}images/press_logos/library_journal_logo.png"></a></li>
<li><a href="http://www.networkworld.com/community/node/85329"><img src="{{ STATIC_URL }}images/press_logos/networkworld_logo.png"></a></li>
</ul>
<div class="speech_bubble"><span>For readers its a gold mine of great books they can have a say in bringing to market.</span></div>
</div>
</div>
</div>
{% endblock %}