{% macro feed_link(feed) -%} {%- if feed.link %}{%- endif -%} {{ feed_title(feed) }} {%- if feed.link %}{% endif -%} {%- endmacro %} {% macro feed_title(feed) %} {%- if feed.user_title and feed.user_title.strip() -%} {{ feed.user_title }} {%- elif feed.title and feed.title.strip() -%} {{ feed.title }} {%- else -%} {{ feed.url }} {%- endif -%} {% endmacro %} {% macro feed_title_secondary(feed) %} {%- if feed.user_title and feed.user_title.strip() and feed.title and feed.title.strip() -%} {{ feed.title }} {%- endif -%} {% endmacro %} {% macro entry_enclosures(entry) %} {% if entry.enclosures %}
{%- for avg in counts.averages -%}
{{- blocks.get((avg | log_scale(2) * 8) | int, blocks[7]) -}}
{%- endfor -%}
{% endmacro %}
{% macro abbr_truncate(s, length=255, end='...') %}
{% set s = s | striptags | trim %}
{% set truncated = s | truncate(length, end='') %}
{% set have_tail = truncated | length < s | length %}
{%- if have_tail -%}
{%- endif -%}
{{ truncated }}
{%- if have_tail %}{{ end }}{% endif -%}
{% endmacro %}