Mercurial > libervia-templates
comparison sat_templates/default/blog/articles.html @ 147:33c7ce833d3f
install: setup.py fix + moved "default" dir in a "sat_templates" dir:
the merge request at https://bugs.goffi.org/mr/view/3 was a good basis, but not fully working ("default" dir was removed), this patch fixes it, and do some improvments:
- moved "default" in "sat_templates" dir, which correspond to the python module, so it can be found easily from python
- added VERSION, and mercurial hash detection, in the same way as for Cagou and backend
- slight modification of classifiers
- replaces tabs coming from MR by spaces
author | Goffi <goffi@goffi.org> |
---|---|
date | Sat, 02 Jun 2018 17:25:43 +0200 |
parents | default/blog/articles.html@c70f405f9b86 |
children | da2c0dc7c1ff |
comparison
equal
deleted
inserted
replaced
146:7dc00829c32f | 147:33c7ce833d3f |
---|---|
1 {% if not embedded %}{% extends 'base/base.html' %}{% endif %} | |
2 {% set single = items|length == 1 %} | |
3 {% set dates_format='relative' if single else 'short' %} | |
4 {% import 'blog/macros.html' as blog with context %} | |
5 {% import 'input/navigation.html' as navigation with context %} | |
6 | |
7 {% block title scoped -%} | |
8 {%- if single -%} | |
9 {{- items[0].title|default(items[0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}} | |
10 {%- else -%} | |
11 {{C.APP_NAME}} | |
12 {# {{- super() -}} | |
13 FIXME: super() is failing if blog is embedded (i.e. base/base.html is not its direct parent) | |
14 not sure what's the best way to avoid that, so just using C.APP_NAME for now #} | |
15 {%- endif -%} | |
16 {%- endblock title -%} | |
17 | |
18 {% block body %} | |
19 {% if items %} | |
20 <div id="blog_items"> | |
21 {{ blog.show_items(items, expanded=single) }} | |
22 </div> | |
23 {% else %} | |
24 <p class="message--info">{% trans %}No articles found in this blog!{% endtrans %}</p> | |
25 {% endif %} | |
26 | |
27 {{ navigation.prev_next(_("newer articles"), _("older articles")) }} | |
28 {% endblock body %} |