{% macro options(current, values, default) -%} {% for value in values %} {% endfor %} {%- endmacro %} {% macro sort(root, methods, selected) -%} {% for method in methods %} {{ format!("{}{}", method.get(0..1).unwrap_or_default().to_uppercase(), method.get(1..).unwrap_or_default()) }} {% endfor %} {%- endmacro %} {% macro search(root, search) -%}
{%- endmacro %} {% macro render_flair(flair_parts) -%} {% for flair_part in flair_parts %}{% if flair_part.flair_part_type == "emoji" %}{% else if flair_part.flair_part_type == "text" && !flair_part.value.is_empty() %}{{ flair_part.value }}{% endif %}{% endfor %} {%- endmacro %} {% macro sub_list(current) -%} {% if prefs.subscriptions.len() > 0 %}Enable HLS to view with audio, or disable this notification
{% let community -%} {% if post.community.starts_with("u_") -%} {% let community = format!("u/{}", &post.community[2..]) -%} {% else -%} {% let community = format!("r/{}", post.community) -%} {% endif -%} {{ community }} • u/{{ post.author.name }} • {{ post.rel_time }}
{% if post.flair.flair_parts.len() > 0 %} {% call render_flair(post.flair.flair_parts) %} {% endif %} {{ post.title }}{% if post.flags.nsfw %} NSFW{% endif %}
{% if (prefs.layout.is_empty() || prefs.layout == "card") && post.post_type == "image" %} {% else if (prefs.layout.is_empty() || prefs.layout == "card") && post.post_type == "gif" %} {% else if (prefs.layout.is_empty() || prefs.layout == "card") && post.post_type == "video" %} {% if prefs.use_hls == "on" && !post.media.alt_url.is_empty() %} {% else %} {% call render_hls_notification(format!("{}%23{}", &self.url[1..].replace("&", "%26").replace("+", "%2B"), post.id)) %} {% endif %} {% else if post.post_type != "self" %} {% if post.thumbnail.url.is_empty() %} {% else %} {% endif %} {% if post.post_type == "link" %}{{ post.domain }}{% else %}{{ post.post_type }}{% endif %} {% endif %}