{% 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().to_uppercase(), method.get(1..).unwrap()) }} {% endfor %} {%- endmacro %} {% macro search(root, search) -%} {%- endmacro %} {% macro render_flair(flair) -%} {% for flair_part in flair %} {% 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 post_in_list(post) -%}

r/{{ post.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" %} {% 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 }} Upvotes
{{ post.comments }} comments
{%- endmacro %}