Rename block sub_list > subscriptions

This commit is contained in:
Matthew Crossman 2021-01-30 19:47:30 +11:00
parent 11e4ff42ed
commit ef5a1cd66e
No known key found for this signature in database
GPG Key ID: C6B942B019794CC2
8 changed files with 10 additions and 11 deletions

View File

@ -23,13 +23,11 @@
<span id="version">v{{ env!("CARGO_PKG_VERSION") }}</span>
<a id="settings_link" href="/settings">settings</a>
</p>
{% block subscriptions %}{% endblock %}
{% block search %}{% endblock %}
<a id="code" href="https://github.com/spikecodes/libreddit">code</a>
</nav>
{% block sub_list %}
{% endblock %}
<!-- MAIN CONTENT -->
{% block body %}
<main>

View File

@ -13,7 +13,7 @@
<meta name="author" content="u/{{ post.author.name }}">
{% endblock %}
{% block sub_list %}
{% block subscriptions %}
{% call utils::sub_list(post.community.as_str()) %}
{% endblock %}

View File

@ -3,7 +3,7 @@
{% block title %}Libreddit: search results - {{ params.q }}{% endblock %}
{% block sub_list %}
{% block subscriptions %}
{% call utils::sub_list("") %}
{% endblock %}

View File

@ -7,7 +7,7 @@
{% call utils::search("".to_owned(), "", "") %}
{% endblock %}
{% block sub_list %}
{% block subscriptions %}
{% call utils::sub_list("") %}
{% endblock %}

View File

@ -11,7 +11,7 @@
{% call utils::search(["/r/", sub.name.as_str()].concat(), "") %}
{% endblock %}
{% block sub_list %}
{% block subscriptions %}
{% call utils::sub_list(sub.name.as_str()) %}
{% endblock %}

View File

@ -7,7 +7,7 @@
{% block title %}{{ user.name.replace("u/", "") }} (u/{{ user.name }}) - Libreddit{% endblock %}
{% block sub_list %}
{% block subscriptions %}
{% call utils::sub_list("") %}
{% endblock %}

View File

@ -42,12 +42,13 @@
{% macro sub_list(current) -%}
{% if prefs.subs.len() > 0 %}
<div id="subscriptions">
<details id="subscriptions">
<summary>subscribed</summary>
<div id="sub_list">
{% for sub in prefs.subs %}
<a href="/r/{{ sub }}" {% if sub == current %}class="selected"{% endif %}>{{ sub }}</a>
{% endfor %}
</div>
</div>
</details>
{% endif %}
{%- endmacro %}

View File

@ -10,7 +10,7 @@
{% call utils::search(["/r/", sub.as_str()].concat(), "") %}
{% endblock %}
{% block sub_list %}
{% block subscriptions %}
{% call utils::sub_list(sub.as_str()) %}
{% endblock %}