Mercurial > libervia-templates
comparison sat_templates/templates/default/blog/articles.html @ 164:e9f0a4215e46
multi-sites handling (moved templates to "templates" sub-directory) + noscript styles handling.
author | Goffi <goffi@goffi.org> |
---|---|
date | Mon, 10 Sep 2018 08:53:33 +0200 |
parents | sat_templates/default/blog/articles.html@da2c0dc7c1ff |
children | 178f55b825b7 |
comparison
equal
deleted
inserted
replaced
163:33f67228686a | 164:e9f0a4215e46 |
---|---|
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 not embedded -%} | |
9 {%- if single -%} | |
10 {{- items[0].title|default(items[0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}} | |
11 {%- else -%} | |
12 {{C.APP_NAME}} | |
13 {# {{- super() -}} | |
14 FIXME: super() is failing if blog is embedded (i.e. base/base.html is not its direct parent) | |
15 not sure what's the best way to avoid that, so just using C.APP_NAME for now #} | |
16 {%- endif -%} | |
17 {%- endif -%} | |
18 {%- endblock title -%} | |
19 | |
20 {% block body %} | |
21 {% if items %} | |
22 <div id="blog_items"> | |
23 {{ blog.show_items(items, expanded=single) }} | |
24 </div> | |
25 {% else %} | |
26 <p class="message--info">{% trans %}No articles found in this blog!{% endtrans %}</p> | |
27 {% endif %} | |
28 | |
29 {{ navigation.prev_next(_("newer articles"), _("older articles")) }} | |
30 {% endblock body %} |