{% 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 %}
Feeds

MAIN FEEDS

Home Popular All

REDDIT FEEDS

{% for sub in prefs.subscriptions %} {{ sub }} {% endfor %}
{% endif %} {%- endmacro %} {% macro render_hls_notification(redirect_url) -%} {% if post.post_type == "video" && !post.media.alt_url.is_empty() && prefs.hide_hls_notification != "on" %}

Enable HSL to view with audio, or disable this notification

{% endif %} {%- endmacro %} {% macro post_in_list(post) -%}

{% let community -%} {% if post.community.starts_with("u_") -%} {% let community = format!("u/{}", &post.community[2..]) -%} {% else -%} {% let community = format!("r/{}", post.community) -%} {% endif -%} {{ community }} {{ 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" %} Post 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"), post.id)) %} {% endif %} {% else if post.post_type != "self" %} {% if post.thumbnail.url.is_empty() %} Thumbnail {% else %} Thumbnail {% endif %} {% if post.post_type == "link" %}{{ post.domain }}{% else %}{{ post.post_type }}{% endif %} {% endif %}
{{ post.score.0 }} Upvotes
{{ post.comments.0 }} comments
{%- endmacro %}