File: article-card.html

package info (click to toggle)
python-hypothesis 6.150.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 15,760 kB
  • sloc: python: 64,665; ruby: 1,107; sh: 270; makefile: 43; javascript: 6
file content (45 lines) | stat: -rw-r--r-- 1,672 bytes parent folder | download | duplicates (2)
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
<div class="article-card" data-url="{{ SITEURL }}/{{ article.url }}"
     title="Read {{ article.title|striptags }}">

  <div class="article-card__header">
    <div class="article-card__title">
      {{ article.title }}
    </div>
  </div>

  <div class="article-card-meta">
    <div class="article-card-meta__item">
      <span class="article-card-meta__value" title="{{ article.date.isoformat() }}">
        {{ article.date.strftime('%B %d, %Y') }}
      </span>
    </div>

    {% if article.authors or article.author %}
    <span class="article-card-meta__separator">•</span>
    <div class="article-card-meta__item">
      <span class="article-card-meta__value">
        {% if article.authors %}
          {% for author in article.authors %}
            {% set author_name = AUTHOR_NAMES.get(author|string|trim, author|string|trim) %}
            {% set author_url = AUTHOR_URLS.get(author|string|trim) %}
            {% if author_url %}<a href="{{ author_url }}">{{ author_name }}</a>{% else %}{{ author_name }}{% endif %}{% if not loop.last %}{% if loop.revindex == 2 %}{% if loop.length > 2 %}, and {% else %} and {% endif %}{% else %}, {% endif %}{% endif %}
          {% endfor %}
        {% else %}
          {% set author_name = AUTHOR_NAMES.get(article.author, article.author) %}
          {% set author_url = AUTHOR_URLS.get(article.author) %}
          {% if author_url %}
          <a href="{{ author_url }}">{{ author_name }}</a>
          {% else %}
          {{ author_name }}
          {% endif %}
        {% endif %}
      </span>
    </div>
    {% endif %}
  </div>

  <div class="article-card__content">
    {{ article.summary }}
  </div>

</div>