diff options
Diffstat (limited to 'design/templates/details')
-rw-r--r-- | design/templates/details/bird.html | 47 | ||||
-rw-r--r-- | design/templates/details/book.html | 85 | ||||
-rw-r--r-- | design/templates/details/entry.html | 18 | ||||
-rw-r--r-- | design/templates/details/figments.html | 12 | ||||
-rw-r--r-- | design/templates/details/page.html | 10 | ||||
-rw-r--r-- | design/templates/details/sighting.html | 4 |
6 files changed, 64 insertions, 112 deletions
diff --git a/design/templates/details/bird.html b/design/templates/details/bird.html deleted file mode 100644 index 43877fe..0000000 --- a/design/templates/details/bird.html +++ /dev/null @@ -1,47 +0,0 @@ -{% extends 'base.html' %} -{% load get_image_by_size %} -{% block extrahead %} -<style> -#detail-map-canvas { height: 100%;} -</style> -{% endblock %} -{% block bodyid %}class="birds"{%endblock%} -{% block primary %} -<main> -<article> -<h1>{{object.common_name}}</h1> -<h2 class="sci">{{object.scientific_name}}</h2> -<h3 class="sci">Family {{object.bird_class.scientific_name}} ({{object.bird_class}})</h3> -{% load get_image_by_size %} -{% load get_image_width %} -<div class="post--image"> -<figure> -<img class="picfull" sizes="(max-width: 680px) 100vw, (min-width: 681) 680px" srcset="{% for size in sighting.image.sizes.all%}{% get_image_by_size sighting.image size.name %} {{size.width}}w{% if forloop.last%}"{%else%}, {%endif%}{%endfor%} - {% for size in sighting.image.sizes.all%}{%if forloop.first %} src="{% get_image_by_size sighting.image size.name %}"{%endif%}{%endfor%} alt="{{sighting.image.alt}} photographed by {% if sighting.image.photo_credit_source %}{{sighting.image.photo_credit_source}}{%else%}luxagraf{%endif%}" > -{% if sighting.image.photo_credit_source %}<figcaption>photo by <a href="{{sighting.image.photo_credit_url}}">{{sighting.image.photo_credit_source}}</a></figcaption>{%endif%} -</figure> -</div> -{%if recording %} -<div class="audio-figure"> -<audio autoplay="autoplay" controls="controls"> - <source src="/media/{{recording.audio}}" /> -</audio> -<small>Audio recorded by {{recording.recorder}} on {{recording.pub_date|date:"F j, Y"}} in {{recording.location}}. <a href="{{recording.link}}">© {{recording.copyright}}</a></small> -</div> -{%endif%} -<p id="endnode">Seen at {{sighting.location}}, {{sighting.location.comma_name}} in {{sighting.date|date:"M Y"}} by {% for person in sighting.seen_by.all %}<a href="/birds/{{person}}/">{% if person.username == "luxagraf"%}Scott{%else%}{{person.username|capfirst}}{%endif%}</a>{%if forloop.last %}{%else%}{% if forloop.revcounter == 2 %}, and {%else%}, {%endif%}{%endif%}{%endfor%}</p> -{% if recording.audio %} -{%endif%} -</article> -</main> -{% endblock %} - -{% block js %} -<script src="/media/js/leaflet-master/leaflet-mod.js"></script> -<script src="/media/js/detail.min.js"></script> -<script type="text/javascript"> -window.onload = function() { - createBirdMap({{sighting.latitude}},{{sighting.longitude}}, 12, { type:'point', lat:'{{sighting.latitude}}', lon:'{{sighting.longitude}}'}); return false; -} -</script> -{% endblock %} diff --git a/design/templates/details/book.html b/design/templates/details/book.html index c9e9089..dd57d0a 100644 --- a/design/templates/details/book.html +++ b/design/templates/details/book.html @@ -1,50 +1,51 @@ {% extends 'base.html' %} {% load typogrify_tags %} -{%block bodyid%}id="book-page"{%endblock%} +{%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> → </li> <li><a href="/books/" title="books" itemprop="url"><span itemprop="title">books</span></a> → </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="book-cover-wrapper"><img src="{{object.get_image_url}}" alt="{{object.title}} cover" /></div> - <div class="meta-cover"> - <dl class="book-metadata"> - <dt>Author</dt> - <dd>{{object.author_name}}</dd> - {% if object.publish_date %}<dt>Published</dt> - <dd>{%if object.publish_place%}{{object.publish_place}}, {%endif%}{{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.isbn %}<dt>Borrow</dt> - <dd><a href="http://worldcat.org/isbn/{{object.isbn}}" title="find {{object.title}} in your local library">WorldCat</a></dd>{%endif%} - {% if object.rating %}<dt>Rating</dt><dd class="book-stars" itemprop="reviewRating"> {% for i in object.ratings_range %}{% if i <= object.get_rating%}★{%else%}☆{%endif%}{%endfor%}</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"> - <a class="highlink" name="h{{forloop.counter}}-page-{{object.page}}" href="#h{{forloop.counter}}-page-{{object.page}}">¶</a> - {{object.body_html|safe|amp|smartypants}} - <p class="foot">page: {{object.page}} {% if object.location %}<small>kindle location: {{object.location|cut:"["|cut:"]"}}</small>{%endif%}</p> - </article> - {% endfor %} - </div> - {%endif%} -</main> + <main itemprop="mainEntity" itemscope itemtype="http://schema.org/Book"> + <h1 class="post-title book-title" itemprop="name">{{object.title|smartypants|widont|safe}}</h1> + <div class="book-cover-wrapper"> + <img src="{{object.get_image_url}}" alt="{{object.title}} cover" /> + </div> + <div class="meta-cover"> + <dl class="book-metadata"> + <dt>Author</dt> + <dd>{{object.author_name}}</dd> + {% if object.publish_date %}<dt>Published</dt> + <dd>{%if object.publish_place%}{{object.publish_place}}, {%endif%}{{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.isbn %}<dt>Borrow</dt> + <dd><a href="http://worldcat.org/isbn/{{object.isbn}}" title="find {{object.title}} in your local library">WorldCat</a></dd>{%endif%} + {% if object.rating %}<dt>Rating</dt><dd class="book-stars" itemprop="reviewRating"> {% for i in object.ratings_range %}{% if i <= object.get_rating%}★{%else%}☆{%endif%}{%endfor%}</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"> + <a class="highlink" name="h{{forloop.counter}}-page-{{object.page}}" href="#h{{forloop.counter}}-page-{{object.page}}">¶</a> + {{object.body_html|safe|amp|smartypants}} + <p class="foot">page: {{object.page}} {% if object.location %}<small>kindle location: {{object.location|cut:"["|cut:"]"}}</small>{%endif%}</p> + </article> + {% endfor %} + </div> + {%endif%} + </main> {% endblock %} diff --git a/design/templates/details/entry.html b/design/templates/details/entry.html index aef590d..cea73ef 100644 --- a/design/templates/details/entry.html +++ b/design/templates/details/entry.html @@ -31,22 +31,18 @@ {%endblock%} {%block htmlclass%}{% with object.template_name as t %} -class="{%if t == 1 or t == 3 or t == 5 %}double{%else%}single{%endif%}{%if t == 2 or t == 3 %} dark{%endif%}{%if t == 4 or t == 5 %} black{%endif%}"{%endwith%}{%endblock%} +class="detail {%if t == 1 or t == 3 or t == 5 %}double{%else%}single{%endif%}{%if t == 2 or t == 3 %} dark{%endif%}{%if t == 4 or t == 5 %} black{%endif%}"{%endwith%}{%endblock%} {% block primary %} - <main role="main" id="main"> - <article class="h-entry hentry post--article{% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %} post--article--double{%endif%}{%endwith%}" itemscope itemType="http://schema.org/Article"> - <header id="header" class="post--header {% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %}post--header--double{%endif%}{%endwith%}"> - <h1 class="p-name entry-title post--title" itemprop="headline">{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|widont|safe}}{%endif%}</h1> - <time class="dt-published published dt-updated post--date" datetime="{{object.pub_date|date:'c'}}" itemprop="datePublished">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time> + <main> + <article class="h-entry hentry {% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %} post--article--double{%endif%}{%endwith%}" itemscope itemType="http://schema.org/Article"> + <header id="header" class="post-header {% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %}post--header--double{%endif%}{%endwith%}"> + <h1 class="p-name entry-title post-title" itemprop="headline">{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|widont|safe}}{%endif%}</h1> + <time class="dt-published published dt-updated post-date" datetime="{{object.pub_date|date:'c'}}" itemprop="datePublished">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time> <p class="p-author author hide" itemprop="author"><span class="byline-author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Scott Gilbertson</span></span></p> - <aside class="p-location h-adr adr post--location" itemprop="contentLocation" itemscope itemtype="http://schema.org/Place"> + <aside class="p-location h-adr adr post-location" itemprop="contentLocation" itemscope itemtype="http://schema.org/Place"> {% if object.country.name == "United States" %}<span class="p-locality locality">{{object.location.name|smartypants|safe}}</span>, <a class="p-region region" href="/jrnl/united-states/" title="travel writing from the United States">{{object.state.name|safe}}</a>, <span class="p-country-name">U.S.</span>{%else%}<span class="p-region">{{object.location.name|smartypants|safe}}</span>, <a class="p-country-name country-name" href="/jrnl/{{object.country.slug}}/" title="travel writing from {{object.country.name}}">{{object.country.name|safe}}</a>{%endif%} - <span style="display: none;" itemprop="geo" itemscope itemtype="http://schema.org/GeoCoordinates"> - <data itemprop="latitude" class="p-latitude" value="{{object.latitude}}">{{object.latitude}}</data> - <data itemprop="longitude" class="p-longitude" value="{{object.longitude}}">{{object.longitude}}</data> - </span> {% with object.get_template_name_display as t %}{%if t == "single" or t == "single-dark" %} – <a href="" onclick="showMap({{object.latitude}}, {{object.longitude}}, { type:'point', lat:'{{object.latitude}}', lon:'{{object.longitude}}'}); return false;" title="see a map">Map</a>{%endif%}{%endwith%} </aside> </header> diff --git a/design/templates/details/figments.html b/design/templates/details/figments.html index 6cd6a7c..ae8dd33 100644 --- a/design/templates/details/figments.html +++ b/design/templates/details/figments.html @@ -1,6 +1,6 @@ {% extends 'base.html' %} {% load typogrify_tags %} -{%block bodyid%}class="figments"{%endblock%} +{%block bodyid%}class="detail"{%endblock%} {%block extrahead%} @@ -24,18 +24,18 @@ <li><a href="/figments/" title="Figments" itemprop="url"><span itemprop="title">Figments</span></a> → </li> <li>{{object.title}}</li> </ul> - <main role="main"> - <article class="h-entry hentry post--article{% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %} post--article--double{%endif%}{%endwith%}" itemscope itemType="http://schema.org/Article"> + <main> + <article class="h-entry hentry post-article{% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %} post--article--double{%endif%}{%endwith%}" itemscope itemType="http://schema.org/Article"> <header id="header" class="post--header {% with object.get_template_name_display as t %}{%if t == "double" or t == "double-dark" %}post--header--double{%endif%}{%endwith%}"> - <h1 class="p-name entry-title post--title" itemprop="headline">{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|widont|safe}}{%endif%}</h1> + <h1 class="p-name entry-title post-title" itemprop="headline">{%if object.template_name == 1 or object.template_name == 3 %}{{object.title|smartypants|safe}}{%else%}{{object.title|smartypants|widont|safe}}{%endif%}</h1> <time class="hide dt-published published dt-updated post--date" datetime="{{object.pub_date|date:'c'}}" itemprop="datePublished">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time> - <ul> + <ul class="downloads"> <li class="kindle"><a href="javascript:(%0A%28function%28%29%7Bwindow.baseUrl%3D%27//www.readability.com%27%3Bwindow.readabilityToken%3D%27%27%3Bvar%20s%3Ddocument.createElement%28%27script%27%29%3Bs.setAttribute%28%27type%27%2C%27text/javascript%27%29%3Bs.setAttribute%28%27charset%27%2C%27UTF-8%27%29%3Bs.setAttribute%28%27src%27%2CbaseUrl%2B%27/bookmarklet/send-to-kindle.js%27%29%3Bdocument.documentElement.appendChild%28s%29%3B%7D%29%28%29)">Send to Kindle</a></li> <li class="epub"><a href="{{object.get_absolute_url}}.epub">Download for iBooks (epub)</a></li> </ul> <p class="p-author author hide" itemprop="author"><span class="byline-author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">Scott Gilbertson</span></span></p> </header> - <div id="article" class="e-content entry-content post--body post--body--{% with object.template_name as t %}{%if t == 0 or t == 2 %}single{%endif%}{%if t == 1 or t == 3 %}double{%endif%}{%endwith%}" itemprop="articleBody"> + <div id="article" class="e-content entry-content post-body post--body--{% with object.template_name as t %}{%if t == 0 or t == 2 %}single{%endif%}{%if t == 1 or t == 3 %}double{%endif%}{%endwith%}" itemprop="articleBody"> {{object.body_html|safe|smartypants|widont}} </div> </article> diff --git a/design/templates/details/page.html b/design/templates/details/page.html index e0e1d47..cf3a287 100644 --- a/design/templates/details/page.html +++ b/design/templates/details/page.html @@ -2,7 +2,7 @@ {% load typogrify_tags %} {% block pagetitle %}Luxagraf | {{object.title}}{% endblock %} {% block metadescription %}{{object.meta_description}}{% endblock %} -{%block htmlclass%}class="single"{%endblock%} +{%block htmlclass%}class="detail"{%endblock%} {%block bodyid%}id="{{object.title|lower}}"{%endblock%} {% block primary %}<ul class="bl" id="breadcrumbs" itemscope itemtype="http://data-vocabulary.org/Breadcrumb"> @@ -10,12 +10,14 @@ {% if object.path%}<li><a href="/{{object.path|slugify}}/">{{object.path}}</a> → </li>{%endif%} <li>{{object.title}}</li> </ul> - <article role="main"> - <h1 class="page--title">{{object.title}}</h1> - <div class="post--article"> + <main> + <article> + <h1 class="post-title">{{object.title}}</h1> + <div class="post-article"> {{object.body_html|safe|smartypants|widont}} </div> </article> + </main> {% endblock %} {% block js %} <script src="/media/js/lightbox.js" type="text/javascript"></script> diff --git a/design/templates/details/sighting.html b/design/templates/details/sighting.html index 5a46e14..1af2433 100644 --- a/design/templates/details/sighting.html +++ b/design/templates/details/sighting.html @@ -5,7 +5,7 @@ #detail-map-canvas { height: 100%;} </style> {% endblock %} -{% block bodyid %}class="birds"{%endblock%} +{% 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> → </li> @@ -26,7 +26,7 @@ <small>Audio recorded by {{recording.recorder}} on {{recording.pub_date|date:"F j, Y"}} in {{recording.location}}. <a href="{{recording.link}}">© {{recording.copyright}}</a></small> </div> {%endif%} -<div id="endnode"> +<div class="entry-footer" id="endnode"> <aside id="locations"> <h5>Seen at</h5> <ul>{%for sight in sighting %} |