aboutsummaryrefslogtreecommitdiff
path: root/theme/bulma/templates/index.html
blob: 36cb150f61b13db09e71062de778f7c20774ac42 (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
{% extends "base.html" %}

{% block content %}

{% for article in articles_page.object_list %}
<article>
  <header>
    <h2><a href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">{{ article.title }}</a></h2>
    <p>
      {{ _('Posted on %(when)s in %(category)s',
           when=article.locale_date,
           category='<a href="%s/%s">%s</a>'|format(SITEURL, article.category.url, article.category)|safe) }}

      {% if article.tags and not HOME_HIDE_TAGS %}
          &#8226; {{ _('Tagged with') }}
          {% for tag in article.tags %}
              <a class="tag" href="{{ SITEURL }}/{{ tag.url }}">{{ tag }}</a>{% if not loop.last %},{% endif %}
          {% endfor %}
      {% endif %}

      {% if PLUGINS and 'post_stats' in PLUGINS %}
        &#8226; {{ _('%(minutes)s min read', minutes=article.stats['read_mins']) }}
      {% endif %}
    </p>
  </header>
  <div class="content">
    {% if summarise or article.metadata['summary'] or SUMMARY_MAX_LENGTH %}
      {% if  article.featured_image %}
        <img src="{{ article.featured_image }}">
      {% endif %}
      <div>{{ article.summary }}</div>
      {% if article.content != article.summary %}
        <br>
        <a class="button"
           href="{{ SITEURL }}/{{ article.url }}{% if not DISABLE_URL_HASH %}#{{ article.slug }}{% endif %}">
          {{ _('Continue reading') }}
        </a>
      {% endif %}
    {% else %}
      {{ article.content }}
    {% endif %}
  </div>
  {% if not loop.last %}
  <hr />
  {% endif %}
</article>
{% endfor %}

{% include "partial/pagination.html" %}
{% endblock %}