Skip to content

Commit

Permalink
v2: use classes for collapsed filters. #318
Browse files Browse the repository at this point in the history
  • Loading branch information
lemon24 committed Jan 19, 2025
1 parent fae6b8c commit cd2cb4e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 8 deletions.
10 changes: 4 additions & 6 deletions src/reader/_app/v2/templates/v2/entries.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</li>
{%- endfor %}
<li class="nav-item">
<a class="nav-link dropdown-toggle" href="#nav-more" data-bs-toggle="collapse"
<a class="nav-link dropdown-toggle" href=".nav-more" data-bs-toggle="collapse"
role="button" aria-expanded="false" aria-controls="nav-more">
more
</a>
Expand All @@ -63,11 +63,9 @@


<form>
{% if form.search.data %}{{ macros.input(form.search, 'search') }}{% endif %}
{% if form.feed_tags.data %}{{ macros.input(form.feed_tags, 'tag') }}{% endif %}
<div class="collapse mb-3" id="nav-more">
{% if not form.search.data %}{{ macros.input(form.search, 'search') }}{% endif %}
{% if not form.feed_tags.data %}{{ macros.input(form.feed_tags, 'tag') }}{% endif %}
{{ macros.input(form.search, 'search', none if form.search.data else 'collapse nav-more') }}
{{ macros.input(form.feed_tags, 'tag', none if form.feed_tags.data else 'collapse nav-more') }}
<div class="collapse mb-3 nav-more">
<div class="mb-3">
{{ macros.radio(form.read) }}
{{ macros.radio(form.important) }}
Expand Down
4 changes: 2 additions & 2 deletions src/reader/_app/v2/templates/v2/macros.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@


{%- macro input(field, icon=none) %}
<div class="row mb-3">
{%- macro input(field, icon=none, class=none) %}
<div class="row mb-3{% if class %} {{ class }}{% endif %}">
<div class="col-md-12 input-group{% if field.errors %} has-validation{% endif %}">
{% if icon -%}
<span class="input-group-text"><i class="bi bi-{{icon}}"></i></span>
Expand Down

0 comments on commit cd2cb4e

Please sign in to comment.