-
Notifications
You must be signed in to change notification settings - Fork 1.6k
/
filter_panel.html
101 lines (95 loc) · 3.06 KB
/
filter_panel.html
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
{% load blog_tags keyword_tags mezzanine_tags i18n %}
{% block blog_recent_posts %}
{% blog_recent_posts 5 as recent_posts %}
{% if recent_posts %}
<h3>{% trans "Recent Posts" %}</h3>
<ul class="list-unstyled recent-posts">
{% for recent_post in recent_posts %}
<li>
{% spaceless %}
<a href="{{ recent_post.get_absolute_url }}">
{% if settings.BLOG_USE_FEATURED_IMAGE and recent_post.featured_image %}
<img src="{{ MEDIA_URL }}{% thumbnail recent_post.featured_image 24 24 %}">
{% endif %}
{{ recent_post.title }}
</a>
{% endspaceless %}
</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
{% block blog_months %}
{% blog_months as months %}
{% if months %}
<h3>{% trans "Archive" %}</h3>
{% for month in months %}
{% ifchanged month.date.year %}
{% if not forloop.first %}</ul>{% endif %}
<h6>{{ month.date.year }}</h6><ul class="list-unstyled">
{% endifchanged %}
<li><a href="{% url "blog_post_list_month" year=month.date.year month=month.date.month %}"
>{{ month.date|date:"F" }}</a> ({{ month.post_count }})</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
{% block blog_categories %}
{% blog_categories as categories %}
{% if categories %}
<h3>{% trans "Categories" %}</h3>
<ul class="list-unstyled">
{% for category in categories %}
<li><a href="{% url "blog_post_list_category" category.slug %}"
>{{ category }}</a> ({{ category.post_count }})</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
{% block blog_keywords %}
{% keywords_for blog.blogpost as tags %}
{% if tags %}
<h3>{% trans "Tags" %}</h3>
<ul class="list-inline tag-cloud">
{% for tag in tags %}
<li>
<a href="{% url "blog_post_list_tag" tag.slug %}"
class="tag-weight-{{ tag.weight }}">{{ tag }}</a>
({{ tag.item_count }})
</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
{% block blog_authors %}
{% blog_authors as authors %}
{% if authors %}
<h3>{% trans "Authors" %}</h3>
<ul class="list-unstyled">
{% for author in authors %}
<li><a href="{% url "blog_post_list_author" author.username %}"
>{{ author.get_full_name|default:author.username }}</a>
({{ author.post_count }})</li>
{% endfor %}
</ul>
{% endif %}
{% endblock %}
{% block blog_feeds %}
<h3>{% trans "Feeds" %}</h3>
{% if tag %}
<a href="{% url "blog_post_feed_tag" tag.slug "rss" %}">{% trans "RSS" %}</a> /
<a href="{% url "blog_post_feed_tag" tag.slug "atom" %}">{% trans "Atom" %}</a>
{% endif %}
{% if category %}
<a href="{% url "blog_post_feed_category" category.slug "rss" %}">{% trans "RSS" %}</a> /
<a href="{% url "blog_post_feed_category" category.slug "atom" %}">{% trans "Atom" %}</a>
{% endif %}
{% if author %}
<a href="{% url "blog_post_feed_author" author.username "rss" %}">{% trans "RSS" %}</a> /
<a href="{% url "blog_post_feed_author" author.username "atom" %}">{% trans "Atom" %}</a>
{% endif %}
{% if not tag and not category and not author %}
<a href="{% url "blog_post_feed" "rss" %}">{% trans "RSS" %}</a> /
<a href="{% url "blog_post_feed" "atom" %}">{% trans "Atom" %}</a>
{% endif %}
{% endblock %}