File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,12 +4,15 @@ <h2>Recent Posts</h2>
44 < ul >
55 {% for post in posts %}
66 < li >
7- {% if post.content_type == "Post" %}
8- {% include "partial/post.html" %}
9- {% elif post.content_type == "Link" %}
10- {% include "partial/link.html" %}
7+ {% if post.content_type == "Link" %}
8+ {% include "partial/link.html" %}
9+ < p > < a href ="/post/{{ post.id }} "> Permalink</ a > </ p >
10+ {% elif post.content_type == "Post" %}
11+ {% set is_index = true %}
12+ {% include "partial/post.html" %}
1113 {% elif post.content_type == "Quote" %}
12- {% include "partial/quote.html" %}
14+ {% include "partial/quote.html" %}
15+ < p > < a href ="/post/{{ post.id }} "> Permalink</ a > </ p >
1316 {% endif %}
1417 </ li >
1518 {% endfor %}
Original file line number Diff line number Diff line change 11< article >
2+ {% if is_index %}
3+ < h1 > < a href ="/post/{{ post.id }} "> {{ post.title }}</ a > </ h1 >
4+ {% else %}
25 < h1 > {{ post.title }}</ h1 >
6+ {% endif %}
37 < p > < small > Published on {{ post.date }}</ small > </ p >
48 < div > {{ post.content|safe }}</ div >
59</ article >
Original file line number Diff line number Diff line change 11{% extends "base.html" %} {% block content %}
2- < main > {% include "partial/post.html" %}</ main >
2+ < main >
3+ {% if post.content_type == "Post" %}
4+ {% include "partial/post.html" %}
5+ {% elif post.content_type == "Link" %}
6+ {% include "partial/link.html" %}
7+ {% elif post.content_type == "Quote" %}
8+ {% include "partial/quote.html" %}
9+ {% endif %}
10+ </ main >
311{% include "partial/commits.html" %} {% endblock %}
You can’t perform that action at this time.
0 commit comments