Mercurial > libervia-templates
comparison default/blog/articles.html @ 113:e96a3e09d4e9
blog/articles: use short dates when severals items are shown because the page is cached, and relative for single view.
author | Goffi <goffi@goffi.org> |
---|---|
date | Fri, 26 Jan 2018 07:51:58 +0100 |
parents | e1a0d5678837 |
children | 1d0ddeb79903 |
comparison
equal
deleted
inserted
replaced
112:988a1c0e8419 | 113:e96a3e09d4e9 |
---|---|
1 {% if not embedded %}{% extends 'base/base.html' %}{% endif %} | 1 {% if not embedded %}{% extends 'base/base.html' %}{% endif %} |
2 {% set dates_format='relative' %} | 2 {% set dates_format='relative' if single else 'short' %} |
3 {% import 'blog/macros.html' as blog with context %} | 3 {% import 'blog/macros.html' as blog with context %} |
4 | 4 |
5 {% block title scoped -%} | 5 {% block title scoped -%} |
6 {%- if items|length == 1 -%} | 6 {%- if items|length == 1 -%} |
7 {{- items[0].title|default(items[0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}} | 7 {{- items[0].title|default(items[0].content, true)|truncate(60, True, '…') + ' - ' + C.APP_NAME -}} |