summaryrefslogtreecommitdiff
path: root/design
diff options
context:
space:
mode:
Diffstat (limited to 'design')
-rw-r--r--design/sass/_books.scss57
-rw-r--r--design/sass/_queries.scss4
-rw-r--r--design/templates/admin/buttons.html5
-rw-r--r--design/templates/archives/books.html55
-rw-r--r--design/templates/details/book.html47
5 files changed, 165 insertions, 3 deletions
diff --git a/design/sass/_books.scss b/design/sass/_books.scss
new file mode 100644
index 0000000..3ed8e2e
--- /dev/null
+++ b/design/sass/_books.scss
@@ -0,0 +1,57 @@
+.book {
+ margin-top: 2em;
+ @include breakpoint(gamma) {
+ margin-top: 3em;
+ }
+}
+.book:after {
+ @include constrain_narrow;
+ color: white;
+ @include faded_line_after;
+ margin-top: 2em;
+ @include breakpoint(gamma) {
+ margin-top: 3em;
+ }
+}
+.book-metadata {
+ @extend %clearfix;
+ text-align: left;
+ dd {
+ display: inline;
+ margin: 0;
+ }
+ dd:after{
+ display: block;
+ content: '';
+ }
+ dt{
+ display: inline-block;
+ }
+ dt:after {
+ content: ":";
+ }
+}
+.book-title {
+ @include constrain_narrow;
+ line-height: 1.3;
+}
+.book-cover {
+}
+.thoughts, .highlights, .meta-cover {
+ @include constrain_narrow;
+ text-align: left;
+ p {
+ max-width: 100%;
+ }
+}
+.thoughts h5, .highlights h4, .meta-cover h5 {
+ font-weight: 500;
+ letter-spacing: 1px;
+ margin: 3em 0 .5em 0;
+ @include generic_sans;
+ @include smcaps;
+ @include fontsize(14);
+}
+.highlights .foot {
+ @include fontsize(14);
+}
diff --git a/design/sass/_queries.scss b/design/sass/_queries.scss
index cbfc3c3..1d7f3ef 100644
--- a/design/sass/_queries.scss
+++ b/design/sass/_queries.scss
@@ -1,5 +1,6 @@
$breakpoint-alpha: 38em;
$breakpoint-beta: 49em;
+$breakpoint-book-beta: 620px;
$breakpoint-gamma: 56em;
$breakpoint-delta: 73.125em;
$breakpoint-epsilon: 79.625em;
@@ -11,6 +12,9 @@ $breakpoint-epsilon: 79.625em;
@else if $point == "beta" {
@media screen and (min-width: $breakpoint-beta) { @content; }
}
+ @else if $point == "book-beta" {
+ @media screen and (min-width: $breakpoint-book-beta) { @content; }
+ }
@else if $point == "gamma" {
@media screen and (min-width: $breakpoint-gamma) { @content; }
}
diff --git a/design/templates/admin/buttons.html b/design/templates/admin/buttons.html
index 5046695..9e36e03 100644
--- a/design/templates/admin/buttons.html
+++ b/design/templates/admin/buttons.html
@@ -32,7 +32,7 @@
<div class="module" id="recent-actions-module">
<div class="grp-module" id="grp-recent-actions-module">
- <h2>Publish Site</h2>
+ <h2>Publish Site</h2>, BuildBooks
{% if message %}
<ul class="messagelist">
<li style="font-weight: bold; color: red;">{{message}}...</li>
@@ -47,10 +47,9 @@
<li class="item"><a href="/admin/build/build?id=photo_galleries">Build Photo Galleries</a></li>
<li class="item"><a href="/admin/build/build?id=projects">Build Project Pages</a></li>
<li class="item"><a href="/admin/build/build?id=map">Build Map</a></li>
+ <li class="item"><a href="/admin/build/build?id=buildbooks">Build Books</a></li>
<li class="item"><a href="/admin/build/build?id=pages">Build All Pages</a></li>
- <li class="item"><a href="/admin/build/build?id=feed">Build RSS Feed</a></li>
<li class="item"><a href="/admin/build/build?id=sitemap">Build Sitemap</a></li>
- <li class="item"><a href="/admin/build/build?id=all">Build Entire Site</a></li>
<li class="item"><a href="/admin/build/build?id=scrapeflickr">Scrape Flickr</a></li>
</ul>
</div>
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> &rarr; </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)
+
diff --git a/design/templates/details/book.html b/design/templates/details/book.html
new file mode 100644
index 0000000..46ac10b
--- /dev/null
+++ b/design/templates/details/book.html
@@ -0,0 +1,47 @@
+{% extends 'base.html' %}
+{% load typogrify_tags %}
+{%block bodyid%}id="book-page"{%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>Readings</li>
+ </ul>
+ <main role="main" itemprop="mainEntity" itemscope itemtype="http://schema.org/Book">
+ <h1 class="book-title" itemprop="name">{{object.title|smartypants|widont|safe}}</h1>
+ <div class="meta-cover">
+ <img src="{{object.get_image_url}}" alt="{{object.title}} cover" class="book-cover" />
+ <h5>Meta</h5>
+ <dl class="book-metadata">
+ <dt>Author</dt>
+ <dd>{{object.author_name}}<dd>
+ {% if object.publish_place %}<dt>Published</dt>
+ <dd>{{object.publish_place}}{%endif%}{%if object.publish_date%}, {{object.publish_date}}</dd>{%endif%}
+ {% if object.pages %}<dt>Pages</dt>
+ <dd>{{object.pages}}</dd>{%endif%}
+ {% if object.isbn %}<dt>ISBN</dt>
+ <dd>{{object.isbn}}</dd>{%endif%}
+ {% if object.read_in %}<dt>Read</dt>
+ <dd>{{object.read_in}}</dd>{%endif%}
+ </dl>
+ </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" value="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 %}
+ <article class="h-entry hentry post--article book" itemscope itemType="http://schema.org/Article">
+ {{object.body_html|safe|amp|smartypants}}
+ <p class="foot">page: {{object.page}} <small>kindle location: {{object.location|cut:"["|cut:"]"}}</small></p>
+ </article>
+ {% endfor %}
+ </div>
+ {%endif%}
+</main>
+{% endblock %}
+