summaryrefslogtreecommitdiff
path: root/design/templates/details/location.html
blob: 8f906e5c8dd627ad267f9ce33ef29081c1691eaa (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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
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> &ndash;
                        <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> &ndash;
                    <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 %}