all repos — nasg @ e730f53da80c6ca83a3a6ab6e24932648a7dc6e0

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
 238
 239
 240
 241
 242
 243
 244
 245
 246
 247
 248
 249
 250
 251
 252
 253
 254
 255
 256
 257
 258
 259
 260
 261
 262
 263
 264
 265
 266
 267
 268
 269
 270
 271
 272
 273
 274
 275
 276
 277
 278
 279
 280
 281
 282
 283
 284
 285
 286
 287
 288
 289
 290
 291
 292
 293
 294
 295
 296
 297
 298
 299
 300
 301
 302
 303
 304
 305
 306
 307
 308
 309
 310
{% extends "base.j2.html" %}

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

{% block title %}{{ post.title }} - {{ site.domain }}{% endblock %}

{% block meta %}
    <meta name="author" content="{{ author.name }} <{{ author.email }}>" />
    <meta name="description" content="{{ post.summary|e }}" />
    <link rel="canonical" href="{{ post.url }}" />
    {% if post.has_code %}
    <style media="all">
        {% include 'prism.css' %}
    </style>
    {% endif %}
{% endblock %}

{% block prism %}
    {% if post.has_code %}
    <script>
        {% include 'prism.js' %}
    </script>
    {% endif %}
{% endblock %}

{% block licence %}
    <link rel="license" href="https://spdx.org/licenses/{{ post.licence }}.html" type="{{ post.licence }}" />
{% endblock %}

{% block content %}
{% if post.event %}
    {% set mftype = 'h-entry h-event' %}
{% else %}
    {% set mftype = 'h-entry' %}
{% endif %}
<main role="main" vocab="http://schema.org/" typeof="Blog WebPage">
    <article class="{{ mftype }} hentry singular" lang="{{ post.lang }}" property="blogPost" typeof="BlogPosting">
        <header>
            <h1 class="entry-title p-name" property="headline">
                {% if post.is_reply %}
                <span>
                    <svg width="16" height="16">
                        <use xlink:href="#icon-reply" />
                    </svg>
                    <a href="{{ post.url }}">
                        RE:
                    </a>
                    <a href="{{ post.is_reply }}" class="u-in-reply-to">
                        {{ post.is_reply }}
                    </a>
                </span>
                {% else %}
                <a href="{{ post.url }}">
                    <span>{{ post.title }}</span>
                </a>
                {% endif %}
            </h1>
        </header>

        {% if post.review %}
        <div class="h-review hreview" property="review" typeof="http://schema.org/Review">
            <strong>Review summary of: <a href="{{ post.review.url }}" class="item fn p-name u-url p-item h-product">{{ post.review.title }}</a></strong>
            <p>
                By
                <span class="p-author h-card vcard reviewer" property="author" typeof="Person">
                 <a class="fn p-name url u-url u-uid" href="{{ author.url }}" property="url">
                    <span property="name">{{ author.name }}</span>
                </a></span> at <time class="dt-published dtreviewed" datetime="{{ post.pubtime }}" property="datePublished">{{ post.pubdate }}</time>
            </p>
            <p>
                <span class="rating" property="reviewRating" itemscope typeof="Rating">
                    <meta property="worstRating" content = "1">
                    <span class="value" property="ratingValue">{{ post.review.rated }}</span>
                    out of
                    <span class="best" property="bestRating">{{ post.review.outof }}</span>
                </span>
            </p>
            <p class="p-summary summary" property="reviewBody">{{ post.review.summary }}</p>
        </div>
        {% endif %}

        {% if post.summary %}
        <div class="e-summary entry-summary" property="description">
            {{ post.html_summary }}
        </div>
        {% endif %}

        <div class="e-content entry-content" property="articleBody">
            {{ post.html_content }}
        </div>

        <footer>
        {% if not post.enclosure %}
            <img aria-hidden="true" hidden="hidden" class="u-featured hidden" property="image" src="{{ author.avatar }}" />
        {% else %}
            <img aria-hidden="true" hidden="hidden" class="u-featured hidden" property="image" src="{{ post.enclosure.url }}" />
        {% endif %}
            <dl>
                {% if post.event %}
                <dt>Trip details</dt>
                <dd>
                    From
                    <time class="dt-start dtstart" datetime="{{ post.event.starttime }}">
                        {{ post.event.startdate }}
                    </time>
                    to
                    <time class="dt-end dtend" datetime="{{ post.event.endtime }}">
                        {{ post.event.enddate }}
                    </time>, in
                    <span class="p-location location">
                        {{ post.event.location }}
                    </span>
                </dd>
                {% endif %}

                <dt>Author</dt>
                <dd>
                    <span class="p-author h-card vcard" property="author" typeof="Person">
                        <img class="photo avatar u-photo u-avatar"
                            src="{{ author.avatar }}"
                            alt="Photo of {{ author.name }}"
                            property="image" />
                        <a class="fn p-name url u-url u-uid org"
                            href="{{ author.url }}"
                            property="url">
                            <span property="name">{{ author.name }}</span>
                        </a>
                        <a class="u-email email" href="mailto:{{ author.email }}">
                            {{ author.email }}
                        </a>
                    </span>
                    <span aria-hidden="true" hidden="hidden" property="publisher" typeof="Organization">
                        <span property="name">{{ site.domain }}</span>
                        <a href="{{ site.url }}" property="url">{{ site.url }}</a>
                        <span property="logo" typeof="ImageObject">
                            <img src="{{ author.avatar }}" alt="" property="url" />
                        </span>
                    </span>
                </dd>

                <dt>Published</dt>
                <dd class="published updated">
                    <time class="dt-published dt-updated"
                        datetime="{{ post.pubtime }}"
                        property="dateModified datePublished"
                    >{{ post.pubdate }}</time>
                </dd>


                <dt>License</dt>
                <dd class="license">
                {% if post.licence == 'CC-BY-4.0' %}
                    <a rel="license" href="https://creativecommons.org/licenses/by/4.0/" class="u-license" property="license">
                        {{ post.licence }}
                    </a>
                    <ul>
                        <li>you can share it</li>
                        <li>you can republish it</li>
                        <li>you can modify it, but you need to indicate the modifications</li>
                        <li>you can use it for commercial purposes</li>
                        <li>you always need to make a link back here</li>
                    </ul>
                {% elif post.licence == 'CC-BY-NC-4.0' %}
                    <a rel="license" href="https://creativecommons.org/licenses/by-nc/4.0/" class="u-license" property="license">
                        {{ post.licence }}
                    </a>
                    <ul>
                        <li>you can share it</li>
                        <li>you can republish it</li>
                        <li>you can modify it, but you need to indicate the modifications</li>
                        <li>you can't use it for commercial purposes</li>
                        <li>you always need to make a link back here</li>
                    </ul>
                    For commercial use, please contact me.
                {% elif post.licence == 'CC-BY-NC-ND-4.0' %}
                    <a rel="license" href="https://creativecommons.org/licenses/by-nc-nd/4.0/" class="u-license" property="license">
                        {{ post.licence }}
                    </a>
                    <ul>
                        <li>you can share it</li>
                        <li>you can't modify it</li>
                        <li>you can't republish it</li>
                        <li>you can't use it for commercial purposes</li>
                        <li>you always need to make a link back here</li>
                    </ul>
                    For commercial use, please contact me.
                {% endif %}
                </dd>

                <dt>Entry URL</dt>
                <dd>
                    <a class="u-url u-uuid" href="{{ post.url }}" property="url">
                        {{ post.url }}
                    </a>
                </dd>

            </dl>
        </footer>

    {% if not post.is_page %}
        {% if post.syndicate|length %}
        <section class="syndication">
            {% for url in post.syndicate %}
                <a href="{{ url }}" class="u-syndication"></a>
            {% endfor %}
        </section>
        {% endif %}

        <section class="encourage">
            <h2>Encourage creation!</h2>
            <p>
                If this entry helped you, or you simply liked it, leave a tip via <br />
                {% for provider, info in author.tips.items() %}
                <span typeof="DonateAction" property="potentialAction">
                    {% if loop.last and not loop.first %} or {% endif %}
                    <a property="url" href="{{ info.url }}">
                    <svg width="16" height="16">
                        <use xlink:href="#icon-{{ provider }}"></use>
                    </svg> {{ info.text }}</a>
                    {% if not loop.last and not loop.first %}, {% endif %}
                <span aria-hidden="true" hidden="hidden" property="recipient" typeof="Person">
                    for
                    <span property="name">{{ author.name }}</span>
                    (<span property="email">{{ author.email }}</span>)
                </span>
                </span>
                {% endfor %}
            </p>
        </section>

        {% if post.replies|length %}
        <section class="replies">
            <h2><a id="replies"></a>Replies</h2>
            <ol>
                {% for mtime, comment in post.replies.items() %}
                <li class="h-entry p-comment">
                    <time class="dt-published" datetime="{{ comment.pubtime }}">
                        {{ comment.pubdate }}
                    </time> from
                    <span class="p-author h-card">
                        {% if comment.author.url %}
                        <a class="url u-url" href="{{ comment.author.url }}">
                            <span class="p-name fn">
                                {{ comment.author.name }}
                            </span>
                        </a>
                        {% else %}
                        <span class="p-name fn">
                            {{ comment.author.name }}
                        </span>
                        {% endif %}
                    </span><br />
                    <span class="source">
                        <svg width="16" height="16">
                            <use xlink:href="#icon-link"></use>
                        </svg>
                        <a class="u-url" href="{{ comment.source }}">
                            {{ comment.source }}
                        </a>
                    </span>
                </li>
                {% endfor %}
            </ol>
        </section>
        {% endif %}

        {% if post.reactions|length %}
        <section class="reactions">
            <h2><a id="reactions"></a>Reactions</h2>
            <dl>
                {% for character, comments in post.reactions.items() %}
                <dt>{{ character }}</dt>
                <dd>
                    <ul>
                        {% for mtime, comment in comments.items() %}
                        <li class="h-entry p-comment">
                            <span class="reaction">
                                <a class="u-url" href="{{ comment.source }}">
                                    {{ comment.type }}
                                </a>
                            </span>
                            <time class="dt-published" datetime="{{ comment.pubtime }}">
                                {{ comment.pubdate }}
                            </time> from
                            <span class="p-author h-card">
                                {% if comment.author.url %}
                                <a class="url u-url" href="{{ comment.author.url }}">
                                    <span class="p-name fn">
                                        {{ comment.author.name }}
                                    </span>
                                </a>
                                {% else %}
                                <span class="p-name fn">
                                    {{ comment.author.name }}
                                </span>
                                {% endif %}
                            </span>
                        </li>
                        {% endfor %}
                    </ul>
                </dd>
                {% endfor %}
            </dl>
        </section>
        {% endif %}

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