Mercurial > libervia-templates
comparison sat_templates/default/blog/articles.html @ 152:da2c0dc7c1ff
blog/articles: work around for titles
author | Goffi <goffi@goffi.org> |
---|---|
date | Thu, 21 Jun 2018 01:02:33 +0200 |
parents | 33c7ce833d3f |
children |
comparison
equal
deleted
inserted
replaced
151:0ec76c1f53d3 | 152:da2c0dc7c1ff |
---|---|
2 {% set single = items|length == 1 %} | 2 {% set single = items|length == 1 %} |
3 {% set dates_format='relative' if single else 'short' %} | 3 {% set dates_format='relative' if single else 'short' %} |
4 {% import 'blog/macros.html' as blog with context %} | 4 {% import 'blog/macros.html' as blog with context %} |
5 {% import 'input/navigation.html' as navigation with context %} | 5 {% import 'input/navigation.html' as navigation with context %} |
6 | 6 |
7 {% block title scoped -%} | 7 {%- block title scoped -%} |
8 {%- if single -%} | 8 {%- if not embedded -%} |
9 {{- items[0].title|default(items[0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}} | 9 {%- if single -%} |
10 {%- else -%} | 10 {{- items[0].title|default(items[0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}} |
11 {{C.APP_NAME}} | 11 {%- else -%} |
12 {# {{- super() -}} | 12 {{C.APP_NAME}} |
13 FIXME: super() is failing if blog is embedded (i.e. base/base.html is not its direct parent) | 13 {# {{- super() -}} |
14 not sure what's the best way to avoid that, so just using C.APP_NAME for now #} | 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 -%} | |
15 {%- endif -%} | 17 {%- endif -%} |
16 {%- endblock title -%} | 18 {%- endblock title -%} |
17 | 19 |
18 {% block body %} | 20 {% block body %} |
19 {% if items %} | 21 {% if items %} |