diff options
Diffstat (limited to 'design/templates/archives/books.html')
-rw-r--r-- | design/templates/archives/books.html | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/design/templates/archives/books.html b/design/templates/archives/books.html new file mode 100644 index 0000000..f462a3a --- /dev/null +++ b/design/templates/archives/books.html @@ -0,0 +1,55 @@ +{% extends 'base.html' %} +{% load typogrify_tags %} +{% load html5_datetime %} +{% load pagination_tags %} +{% block pagetitle %} Books | luxagraf {% endblock %} +{% block metadescription %}Books and thoughts on them. {% endblock %} +{%block bodyid%}class="books" id="books-archive"{%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> → </li> + <li>Books</li> + </ul> + <main role="main"> + <h1>Books</h1> + <p>I wear glasses because as a child I would stay up late, covers pulled over my head, reading by the dim light of a dying flashlight. At least that's what an eye doctor told me when I was younger. Probably a load of crap, but I still love reading and I still often do it by poor light far later in the night than is reasonable.</p> + <p>A few years ago, I realized I was forgetting the things I'd read. Forgetting the things they had made me think of, things I'd learned, bits I wanted to remember. So I started taking notes while reading, usually with a pen and paper, but sometimes just photographing a page and using OCR to save it to a text file. I wanted to remember, to recall.</p> + <p>And of course since I have all this stuff in text files I thought might as well put it online. Thanks to some APIs out there it isn't hard to get all the info you need about a book. And well, here you have it, books I've read and things I've thought about them.</p> + {% autopaginate object_list 24 %}{% for object in object_list %} + <article itemscope itemtype="http://schema.org/Book"> + {% if object.image %}<img itemprop="image" src="{{object.get_image_url}}" alt="cover art: red horse, city in background"/>{%endif%} + <h2 itemprop="name"><a href="{{object.get_absolute_url}}">{{object.title|safe|amp|smartypants}}</a></h2> + <h4 itemprop="author">{{object.author_name}}</h4> + <span itemprop="isbn">{{object.isbn}}</span> + <div itemprop="review" itemscope itemtype="http://schema.org/Review"> + {% if object.rating %}<span itemprop="reviewRating">{{object.rating}}</span>stars{%endif%} + <span class="hide" itemprop="author">Scott Gilbertson</span> + <meta itemprop="datePublished" content="{{object.read_date|date:'F Y'}}"><span>Read in: {{object.read_date|date:"F Y"}}</span> + <div itemprop="reviewBody">{{object.body_html|safe|amp|smartypants|urlizetrunc:45 }}</div> + </article> +{% endfor %} + </main> +{% endblock %} + + + title = models.CharField(max_length=200) + author_name = models.CharField(max_length=200) + slug = models.CharField(max_length=50) + year_pub = models.CharField(max_length=4, blank=True, null=True) + read_date = models.DateTimeField() + isbn = models.CharField(max_length=100, blank=True, null=True) + body_html = models.TextField(null=True, blank=True) + url = models.CharField(max_length=200, blank=True, null=True) + tags = TaggableManager() + RATINGS = ( + ('1', "1 Star"), + ('2', "2 Stars"), + ('3', "3 Stars"), + ('4', "4 Stars"), + ('5', "5 Stars"), + ) + rating = models.CharField(max_length=1, choices=RATINGS, null=True) + enable_comments = models.BooleanField(default=False) + image = models.FileField(upload_to='book-covers/', null=True, blank=True) + |