Very, very rudimentary support for making h-entries: they don't look so good and don't appear on the homepage yet but it's a good start
This commit is contained in:
parent
430f8d9a1d
commit
950459cd5f
14 changed files with 161 additions and 2 deletions
24
entries/templates/entries/entry.html
Normal file
24
entries/templates/entries/entry.html
Normal file
|
@ -0,0 +1,24 @@
|
|||
{% load humanize %}<article class="card h-entry">
|
||||
<div class="card-body">
|
||||
{% if entry.name %}<h4 class="card-title p-name">{{ entry.name }}</h4>{% endif %}
|
||||
<div class="e-content{% if not entry.name %} p-name{% endif %}">{{ entry.content }}</div>
|
||||
</div>
|
||||
<div class="card-footer">
|
||||
<a class="p-author h-card" href="{{ entry.author.url }}">
|
||||
<img class="u-photo" src="{{ entry.author.avatar.url }}" />
|
||||
{{ entry.author.first_name }} {{ entry.author.last_name }}
|
||||
</a>
|
||||
<a class="u-url" href="{{ entry.url }}">
|
||||
<time class="dt-published" datetime="{{ entry.published.isoformat }}">
|
||||
<i class="fa fa-calendar"></i>
|
||||
{{ entry.published | naturaltime }}
|
||||
</time>
|
||||
</a>
|
||||
{% if entry.updated != entry.published %}
|
||||
<time class="dt-updated" datetime="{{ entry.updated.isoformat }}">
|
||||
<i class="fa fa-pencil"></i>
|
||||
{{ entry.updated | naturaltime }}
|
||||
</time>
|
||||
{% endif %}
|
||||
</div>
|
||||
</article>
|
11
entries/templates/entries/index.html
Normal file
11
entries/templates/entries/index.html
Normal file
|
@ -0,0 +1,11 @@
|
|||
{% extends 'lemoncurry/layout.html' %}
|
||||
{% block html_class %}h-feed{% endblock %}
|
||||
{% block main %}
|
||||
<ol class="list-unstyled">
|
||||
{% for entry in entries %}
|
||||
<li>
|
||||
{% include 'entries/entry.html' %}
|
||||
</li>
|
||||
{% endfor %}
|
||||
</ol>
|
||||
{% endblock %}
|
Loading…
Add table
Add a link
Reference in a new issue