all repos — nasg @ 0b1d7cef6818487a111d00ef92b3f62b9fce282d

templates/Singular.j2.html (view raw)

 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
 93
 94
 95
 96
 97
 98
 99
 100
 101
 102
 103
 104
 105
 106
 107
 108
 109
 110
 111
 112
 113
 114
 115
 116
 117
 118
 119
 120
 121
 122
 123
 124
 125
 126
 127
 128
 129
 130
 131
 132
 133
 134
 135
 136
 137
 138
 139
 140
 141
 142
 143
 144
 145
 146
 147
 148
 149
 150
 151
 152
 153
 154
 155
 156
 157
 158
 159
 160
 161
 162
 163
 164
 165
 166
 167
 168
 169
 170
 171
 172
 173
 174
 175
 176
 177
 178
 179
 180
 181
 182
 183
 184
 185
 186
 187
 188
 189
 190
 191
 192
 193
 194
 195
 196
 197
 198
 199
 200
 201
 202
 203
 204
 205
 206
 207
 208
 209
 210
 211
 212
 213
 214
 215
 216
 217
 218
 219
 220
 221
 222
 223
 224
 225
 226
 227
 228
 229
 230
 231
 232
 233
 234
 235
 236
 237
{% extends "base.j2.html" %}

{% block lang %} lang="{{ post.inLanguage }}" {% endblock %}

{% block title %}{{ post.headline }} - {{ site.name }}{% endblock %}

{% block meta %}
    <meta name="description" content="{{ post.description|striptags|e }}" />
    <link rel="canonical" href="{{ post.url }}" />
    <link rel="alternate" type="application/ld+json" href="{{ post.url }}{{ fnames.json }}" />
    <link rel="alternate" type="text/plain" href="{{ post.url }}{{ fnames.txt }}" />
    <meta property="og:title" content="{{ post.headline }}" />
    <meta property="og:type" content="article" />
    <meta property="og:url" content="{{ post.url }}" />
    <meta property="og:description" content="{{ post.description|striptags|e }}" />
    <meta property="article:published_time" content="{{ post.datePublished }}" />
    <meta property="article:modified_time" content="{{ post.dateModified }}" />
    <meta property="article:author" content="{{ post.author.name }} ({{ post.author.email}})" />
    {% if post.image is iterable %}
    <meta property="og:image" content="{{ post.image[0].url }}" />
    <meta property="og:image:type" content="{{ post.image[0].encodingFormat }}" />
    <meta property="og:image:width" content="{{ post.image[0].width }}" />
    <meta property="og:image:height" content="{{ post.image[0].height }}" />
    {% else %}
    <meta property="og:image" content="{{ post.image }}" />
    {% endif %}
    <link rel="schema.DC" href="http://purl.org/dc/elements/1.1/">
    <meta name="DC.Format" content="text/html" />
    <meta name="DC.Language" content="{{ post.inLanguage }}" />
    <meta name="DC.Publisher" content="{{ post.Publisher.name }}" />
    <meta name="DC.Title" content="{{ post.headline }}" />
    <meta name="DC.Rights" content="{{ post.licence }}" />
    <meta NAME="DC.Creator" content="{{ post.author.name }}" />
    <meta NAME="DC.Date" content="{{ post.datePublished }}" />
    <meta NAME="DC.Description" content="{{ post.description|striptags|e }}" />

    {% if post['@type'] == 'TechArticle' %}
    <style media="all">
        {% include('prism.css') %}
    </style>
    {% endif %}
{% endblock %}

{% block prism %}
    {% if post['@type'] == 'TechArticle' %}
    <script>
        {% include('prism.js') %}
    </script>
    {% endif %}
{% endblock %}

{% block cc %}
                <li>
                    <a href="{{ post.license }}">
                        <svg width="80" height="15">
                            <use xlink:href="#button-cc"/>
                        </svg>
                    </a>
                </li>
{% endblock %}

{% block content %}
<main>
    <article class="h-entry hentry" lang="{{ post.inLanguage }}" id="article">
        <header>
            <h1 class="p-name entry-title">
                {% if post.mentions %}
                <span>
                    <svg width="16" height="16">
                        <use xlink:href="#icon-reply" />
                    </svg>
                    <a href="{{ post.url|relurl(baseurl) }}">
                        RE:
                    </a>
                    <a href="{{ post.mentions.url }}" class="u-in-reply-to">
                        {{ post.mentions.url }}
                    </a>
                </span>
                {% else %}
                <a href="{{ post.url|relurl(baseurl) }}">
                    {{ post.headline }}
                </a>
                {% endif %}
            </h1>

            <p>
                <a rel="license" href="{{ post.license }}" class="u-license">
                    {{ post.license | extractlicense }}
                </a>
                by
                <span class="p-author h-card vcard">
                    <img class="u-photo photo" src="{{ post.author.image|relurl(baseurl) }}" alt="" />
                    <a class="p-name u-url fn url" href="{{ post.author.url }}">{{ post.author.name }}</a>
                    (<a class="u-email email" href="mailto:{{ post.author.email }}">{{ post.author.email }}</a>)
                </span>
                at
                <time datetime="{{ post.datePublished }}" class="dt-published published">{{ post.datePublished|printdate }}</time>
                <time datetime="{{ post.dateModified }}" class="dt-updated updated"></time>
                <br />
                <a class="u-url u-uuid bookmark" href="{{ post.url }}">{{ post.url }}</a>
                {% if post.keywords|length > 0 %}
                    <br />
                    {% for keyword in post.keywords %}
                    #<span class="p-category">{{ keyword }}</span>{% if not loop.last %} {% endif %}
                    {% endfor %}
                {% endif %}
                {% if post['@type'] == 'Photograph' %}
                    {% if post.image[0].locationCreated %}
                    <br />
                    Location:
                    <a class="h-geo" href="https://www.openstreetmap.org/#map=14/{{ post.image[0].locationCreated.geo.longitude }}/{{ post.image[0].locationCreated.geo.latitude }}">
                        <span class="p-longitude">{{ post.image[0].locationCreated.geo.longitude }}</span>,
                        <span class="p-latitude">{{ post.image[0].locationCreated.geo.latitude }}</span>
                    </a>
                    {% endif %}
                {% endif %}
                {% if post.sameAs|length %}
                <br />
                    Syndicated to:
                    {% for url in post.sameAs %}
                        <a class="u-syndication" href="{{ url }}">{{ url }}</a>{% if not loop.last and post.sameAs|length >1 %}, {% endif %}
                    {% endfor %}
                {% endif %}
            </p>

{% if post.subjectOf %}
            <p class="h-event vevent">
                <span class="summary">
                    Journey from
                        <time class="dt-start dtstart" datetime="{{ post.subjectOf.startDate }}">
                            {{ post.subjectOf.startDate|printdate }}
                        </time>
                        to
                        <time class="dt-end dtend" datetime="{{ post.subjectOf.endDate }}">
                            {{ post.subjectOf.endDate|printdate }}
                        </time>, in
                        <span class="p-location location">
                            {{ post.subjectOf.location.name }}
                        </span>
                    </span>
                    <a class="u-url url" href="{{ post.url }}"></a>
                </p>
{% endif %}

        </header>

        {% if post.review %}
        <div class="h-review hreview">
            <strong>Review summary of: <a href="{{ post.review.url }}" class="p-name u-url p-item h-product item fn url">{{ post.review.name }}</a></strong>
            <p>
                By
                <span class="p-author h-card reviewer vcard">
                 <a class="p-name u-url fn" href="{{ post.author.url }}">
                    <span>{{ post.author.name }}</span>
                </a></span> in <time class="dt-published dtreviewed" datetime="{{ post.datePublished }}" title="{{ post.datePublished }}">{{ post.datePublished|printdate }}</time>
            </p>
            <p>
                <span class="rating">
                    <span class="value p-rating">{{ post.review.reviewRating.ratingValue }}</span>
                    out of
                    <span class="best">{{ post.review.reviewRating.bestRating }}</span>
                </span>
            </p>
            <p class="p-summary summary">{{ post.review.text }}</p>
        </div>
        {% endif %}

        {% if post.description|length %}
        <div class="e-summary entry-summary">
            {{ post.description|relurl(baseurl) }}
        </div>
        {% endif %}

        <div class="e-content entry-content">
            {{ post.text|relurl(baseurl) }}
        </div>

    {% if 'WebPage' != post['@type'] %}
        <section class="syndication">
        {% for action in post.potentialAction %}
            {% if  'InteractAction' == action['@type'] %}
                <a href="{{ action.url }}"></a>
            {% endif %}
        {% endfor %}
        </section>

        {% if post.comment|length %}
        <section class="comments">
            <h2><a id="comments"></a>Responses</h2>
            <ol>
                {% for comment in post.comment %}
                <li class="h-entry p-comment hentry">
                    <i>
                        {% if 'like-of' == comment.disambiguatingDescription %}
                        {% set icon = 'star' %}
                        {% elif 'bookmark-of' == comment.disambiguatingDescription %}
                        {% set icon = 'bookmark' %}
                        {% elif 'reply' == comment.disambiguatingDescription %}
                        {% set icon = 'reply' %}
                        {% else %}
                        {% set icon = 'link' %}
                        {% endif %}
                        <svg width="16" height="16">
                            <use xlink:href="#icon-{{ icon }}"></use>
                        </svg>
                    </i>
                    from
                    <span class="p-author h-card vcard">
                        {% if comment.author.url %}
                        <a class="u-url p-name fn url org" href="{{ comment.author.url }}">
                            {{ comment.author.name }}
                        </a>
                        {% else %}
                        <span class="p-name fn">
                            {{ comment.author.name }}
                        </span>
                        {% endif %}
                    </span>
                    at
                    <time class="dt-published published" datetime="{{ comment.datePublished }}">
                        {{ comment.datePublished|printdate }}
                    </time>
                    <br />
                    <a class="u-url" href="{{ comment.url }}">
                        {{ comment.url }}
                    </a>
                    <a href="{{ post.url }}" class="u-in-reply-to"></a>
                </li>
                {% endfor %}
            </ol>
        </section>
        {% endif %}

    {% endif %}
    </article>
</main>
{% endblock %}