summaryrefslogtreecommitdiff
path: root/design/templates/details/book.html
blob: 808d253e0f787770ee9346fa52f7c8f7c41630ac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
{% extends 'base.html' %}
{% load typogrify_tags %}
{%block bodyid%}class="detail"{%endblock%}								
{% block primary %}<ul class="bl" id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb">
        <li><a href="/" title="luxagraf homepage" itemprop="url"><span itemprop="title">Home</span></a> &rarr; </li>
        <li><a href="/book-notes/" title="books" itemprop="url"><span itemprop="title">books</span></a> &rarr; </li>
        <li>{{object.title|smartypants|safe}}</li>
    </ul>
    <main itemprop="mainEntity" itemscope itemtype="http://schema.org/Book">
        <header class="tight">
        <h1 class="post-title book-title" itemprop="name">{{object.title|smartypants|widont|safe}}</h1>
        <h2 class="post-subtitle" itemprop="author" itemscope itemtype="http://schema.org/Person">
        <meta itemprop="name" content="{{object.author_name}}"/>by {{object.author_name}}</h2>


        </header>
        <div class="book-cover-wrapper">
            <img src="{{object.get_image_url}}" alt="{{object.title}} cover"  />
        </div>
        <div class="meta-cover">
            <dl class="book-metadata">

                {% if object.rating %}<dt>Rating</dt><dd class="book-stars">
          {% for i in object.ratings_range %}{% if i <= object.get_rating%}&#9733;{%else%}&#9734;{%endif%}{%endfor%}</span></dd>{%endif%}
                {% if object.read_in %}<dt>Read</dt>
                <dd>{{object.read_in}}</dd>{%endif%}
                {% if object.pages %}<dt>Pages</dt>
                <dd itemprop="numberOfPages">{{object.pages}}</dd>{%endif%}
                {% if object.publish_date %}<dt>Published</dt>
                <dd>{%if object.publish_place%}{{object.publish_place}}, {%endif%}{{object.publish_date}}</dd>{%endif%}
                {% if object.isbn %}<dt>ISBN</dt>
                <dd>{{object.isbn}}</dd>{%endif%}
            </dl>
            <div class="buy-btn-wrapper">
                {% if object.isbn %}<a class="buy-btn" href="http://worldcat.org/isbn/{{object.isbn}}" title="find {{object.title}} in your local library">Borrow</a>{%endif%}
                {% if object.afflink %}<a class="buy-btn" href="{{object.afflink}}" title="buy {{object.title}} at Amazon">Buy</a>{%endif%}
            </div>
        </div>{%if object.body_html%}
        <div class="thoughts" itemprop="review" itemscope itemtype="http://schema.org/Review">
            <h5>Notes</h5>
            <span class="hide" itemprop="reviewRating">{{object.rating}}</span>
            <meta itemprop="author" content="Scott Gilbertson" />
            <meta itemprop="datePublished" content="{{object.read_date|date:"c"}}">
            <div itemprop="reviewBody">{{object.body_html|safe|smartypants|widont}}</div>
        </div>{%endif%}
        {% if object.bookhighlight_set.all %}
        <div class="highlights">
            <h4>Highlights:</h4>
            {% for object in object.bookhighlight_set.all reversed %}
            <div class="h-entry hentry post--article book">
                <a class="highlink" id="h{{forloop.counter}}-page-{{object.page}}" href="#h{{forloop.counter}}-page-{{object.page}}">&para;</a>
                <div class="book-highlight">
                    {{object.body_html|safe|amp|smartypants}}
                </div>
                <p class="foot">&ndash; Page: {{object.page}} {% if object.location %}(Kindle location: {{object.location|cut:"["|cut:"]"}}){%endif%}</p>
            </div>
            {% endfor %}
        </div>
        {%endif%}
    </main>
{% endblock %}