mirror of
https://github.com/redlib-org/redlib.git
synced 2025-05-14 05:52:53 +00:00
Vertical list subscriptions.
This commit is contained in:
parent
ef5a1cd66e
commit
dc2030e6f3
9 changed files with 58 additions and 27 deletions
|
@ -23,10 +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 subscriptions %}{% endblock %}
|
||||
|
||||
<!-- MAIN CONTENT -->
|
||||
{% block body %}
|
||||
|
|
|
@ -14,7 +14,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block subscriptions %}
|
||||
{% call utils::sub_list(post.community.as_str()) %}
|
||||
{% call utils::sub_list(post.community.as_str(), "narrow") %}
|
||||
{% endblock %}
|
||||
|
||||
<!-- OPEN COMMENT MACRO -->
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
{% block title %}Libreddit: search results - {{ params.q }}{% endblock %}
|
||||
|
||||
{% block subscriptions %}
|
||||
{% call utils::sub_list("") %}
|
||||
{% call utils::sub_list("", "narrow") %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block subscriptions %}
|
||||
{% call utils::sub_list("") %}
|
||||
{% call utils::sub_list("", "narrow") %}
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block subscriptions %}
|
||||
{% call utils::sub_list(sub.name.as_str()) %}
|
||||
{% call utils::sub_list(sub.name.as_str(), "wide") %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
{% block title %}{{ user.name.replace("u/", "") }} (u/{{ user.name }}) - Libreddit{% endblock %}
|
||||
|
||||
{% block subscriptions %}
|
||||
{% call utils::sub_list("") %}
|
||||
{% call utils::sub_list("", "wide") %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
|
|
@ -40,15 +40,17 @@
|
|||
{% endfor %}
|
||||
{%- endmacro %}
|
||||
|
||||
{% macro sub_list(current) -%}
|
||||
{% macro sub_list(current, width) -%}
|
||||
{% if prefs.subs.len() > 0 %}
|
||||
<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>
|
||||
</details>
|
||||
<div id="subscriptions_container" class="{{ width }}">
|
||||
<details id="subscriptions">
|
||||
<summary>Subscriptions</summary>
|
||||
<div id="sub_list">
|
||||
{% for sub in prefs.subs %}
|
||||
<a href="/r/{{ sub }}" {% if sub == current %}class="selected"{% endif %}>{{ sub }}</a>
|
||||
{% endfor %}
|
||||
</div>
|
||||
</details>
|
||||
</div>
|
||||
{% endif %}
|
||||
{%- endmacro %}
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
{% endblock %}
|
||||
|
||||
{% block subscriptions %}
|
||||
{% call utils::sub_list(sub.as_str()) %}
|
||||
{% call utils::sub_list(sub.as_str(), "narrow") %}
|
||||
{% endblock %}
|
||||
|
||||
{% block body %}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue