diff options
author | lxf <sng@luxagraf.net> | 2021-11-06 09:42:47 -0400 |
---|---|---|
committer | lxf <sng@luxagraf.net> | 2021-11-06 09:42:47 -0400 |
commit | d9f51299809bfb6b3ac589b7c42016d0ef240299 (patch) | |
tree | aa5f945e82fdbf1b66aca82fe5122f6ff5a12eb9 /templates/details/location.html | |
parent | dde9914dbbc6cda18ba59024065727c8dc6bcdf4 (diff) |
moved templates to top level directory
Diffstat (limited to 'templates/details/location.html')
-rw-r--r-- | templates/details/location.html | 92 |
1 files changed, 92 insertions, 0 deletions
diff --git a/templates/details/location.html b/templates/details/location.html new file mode 100644 index 0000000..8f906e5 --- /dev/null +++ b/templates/details/location.html @@ -0,0 +1,92 @@ +{% extends 'base.html' %} +{% load typogrify_tags %} +{% load get_image_by_size %} +{% load get_image_width %} + +{% block pagetitle %}{{object.name|title|smartypants|safe}} | Luxagraf, a travelogue | {% if object.country_name == "United States" %}{{object.location_name|smartypants|safe}}, {{object.state_name}}{%else%}{{object.location_name|smartypants|safe}}, {{object.country_name}}{%endif%}){% endblock %} + +{% block metadescription %}{{object.meta_description|striptags|safe}}{% endblock %} +{%block extrahead%} + <link rel="canonical" href="http://luxagraf.net{{object.get_absolute_url}}" /> +{%endblock%} +{%block htmlclass%}{% with object.template_name as t %} +class="{%if t == 0 or t == 2 %}single{%endif%}{%if t == 1 or t == 3 %}double{%endif%}{%if t == 2 or t == 3 %} dark{%endif%}"{%endwith%}{%endblock%} +{% block primary %} + <article role="main"> + <header> + <h1>{{object.name}}</h1> + </header> + <div class="post-body"> + {% for object in entry_list %} + {% if forloop.first %}<div class="featured-entry"> + <article class="h-entry hentry" itemscope itemType="http://schema.org/Article"> + <div class="post--image"> + <a href="{{object.get_absolute_url}}" title="{{object.title}}">{% if object.featured_image %} + <img src="{% for size in object.featured_image.sizes.all%}{% if size.name == 'featured_jrnl'%}{% get_image_by_size object.featured_image size.name %}{%endif%}{%endfor%}" alt="{{image.alt}} photographed by {% if image.photo_credit_source %}{{image.photo_credit_source}}{%else%}luxagraf{%endif%}" /> + </a>{%else%} + <img src="{{object.get_image_url}}" alt="{{ object.title }}" class="u-photo post-image" itemprop="image" /> + </a>{%endif%} + </div> + <h2 class="p-name entry-title post--title" itemprop="headline"><a href="{{object.get_absolute_url}}" class="u-url" title="{%if object.title_keywords%}{{object.title_keywords}}{%else%}{{object.title}}{%endif%}">{{object.title|safe|smartypants|widont}}</a></h2> + <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> + <time class="dt-published published dt-updated post--date" datetime="{{object.pub_date|date:'c'}}">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time> + <p> + <span 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}}</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}}</a>{%endif%} + </span> – + <span class="p-summary entry-summary hyphenate" itemprop="description"> + {{object.dek|safe}} + </span> + </p> + </article> + </div> {% else %} + <article class="h-entry hentry {% cycle 'odd' 'even' %} {% cycle 'first' 'second' 'third' %}" itemscope itemType="http://schema.org/Article"> + <div class="post--image"> + <a href="{{object.get_absolute_url}}" title="{{object.title}}"><img src="{{object.get_image_url}}" alt="{{ object.title }}" class="u-photo post-image" itemprop="image" /></a> + </div> + <h2 class="p-name entry-title post--title" itemprop="headline"><a href="{{object.get_absolute_url}}" class="u-url" title="{%if object.title_keywords%}{{object.title_keywords}}{%else%}{{object.title}}{%endif%}">{{object.title|safe|smartypants|widont}}</a></h2> + <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> + <time class="dt-published published dt-updated post--date" datetime="{{object.pub_date|date:'c'}}">{{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time> + <p> + <span 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}}</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}}</a>{%endif%} + </span> – + <span class="p-summary entry-summary hyphenate" itemprop="description"> + {{object.dek|safe}} + </span> + </p> + </article> {% endif %}{% endfor %} + </div> + {% if entry.field_notes %}<div id="field-notes" class="" > + <h3>Field Notes</h3> + <ul>{% for entry in entry_list %} + {% for obj in entry.field_notes.all %} + <li><a href="{% url 'sketches:detail' year=obj.pub_date.year month=obj.pub_date|date:"m" slug=obj.slug %}">{{obj}}</a></li> + {% endfor %} {% endfor %}</ul> + </div>{% endif %} + {% if sighting_list %} + <div class="sightings"> + <h2 class="hed">Birds and Mammals seen {{object}}</h2> {% for object in sighting_list %} + <article class="{% cycle 'odd' 'even' %} {% cycle 'first' 'second' 'third' %}"> + {% if object.ap.image %}<div class="post--image"> + <a href="{{object.ap.get_absolute_url}}" title="{{object.ap}}"> + <img src="{% get_image_by_size object.ap.image 'pic5' %}" /> + </a> + </div>{%endif%} + <h3 class="post--title"><a href="{{object.ap.get_absolute_url}}" title="{%if object.title_keywords%}{{object.title_keywords}}{%else%}{{object.ap}}{%endif%}">{{object.ap|safe|smartypants|widont}}</a> (<span class="sci">{{object.ap.scientific_name}}</span>)</h3> + <time class="post--date" datetime="{{object.pub_date|date:'c'}}">Seen: {{object.pub_date|date:"F"}} <span>{{object.pub_date|date:"j, Y"}}</span></time> + <p> + <span class="hide sighting location place post--location" itemscope itemtype="http://schema.org/Place">Loc: + {% if object.country.name == "United States" %}<span class="p-locality locality">{{object.location.name|smartypants|safe}}</span>, {{object.state.name}}, <span class="p-country-name">U.S.</span>{%else%}<span class="p-region">{{object.location.name|smartypants|safe}}</span>, {{object.country.name}}</a>{%endif%} + </span> + </p> + </article> {% endfor %} + </div>{%endif%} + {% for entry in entry_list %}{% if forloop.first %} + <div id="recommended-reading" > + <h3 class="hed">Recommended Reading</h3> + <ul>{% endif %}{% for obj in entry.books.all %} + <li><a href="{% url 'books:detail' slug=obj.slug %}"><img src="{{obj.get_small_image_url}}" /></a></li>{% endfor %} + {% if forloop.last%}</ul> + </div>{%endif%}{% endfor %} +{% endblock %} |