Adjust spacing, bring back "All Collections" option
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
|
||||
inline-size: auto;
|
||||
inset: 0 auto auto 50%;
|
||||
min-inline-size: min(20ch, 90vw);
|
||||
min-inline-size: min(25ch, 90vw);
|
||||
max-inline-size: min(50ch, 90vw);
|
||||
position: absolute;
|
||||
transform: translateX(-50%);
|
||||
|
||||
@@ -1,9 +1,24 @@
|
||||
<%= form_with url: cards_path, method: :get, class: "flex flex-column max-width popup__list",
|
||||
<%= form_with url: cards_path, method: :get, class: "flex flex-column max-width popup__list full-width",
|
||||
data: { controller: "form" } do |form| %>
|
||||
<% filter.as_params.except(:collection_ids).each do |key, value| %>
|
||||
<%= filter_hidden_field_tag key, value %>
|
||||
<% end %>
|
||||
|
||||
<%= link_to cards_path(filter.as_params.except(:collection_ids)), class: "popup__group flex align-center", style: "--hover-size: 0" do %>
|
||||
<div class="btn txt-xx-small flex-item-no-shrink">
|
||||
<input type="checkbox" <%= "checked" if filter.collection_ids.empty? %>>
|
||||
|
||||
<span class="for-screen-reader">
|
||||
See everything in all collections
|
||||
</span>
|
||||
<%= icon_tag "check", size: 18, class: "checked" %>
|
||||
</div>
|
||||
<%= tag.div class: "btn popup__item min-width flex-item-grow" do %>
|
||||
<span class="overflow-ellipsis">All collections</span>
|
||||
<% end %>
|
||||
<span class="translucent flex-item-no-shrink"> ›</span>
|
||||
<% end %>
|
||||
|
||||
<% Current.user.collections.order(:name).each do |collection| %>
|
||||
<div class="popup__group flex align-center">
|
||||
<div class="btn txt-xx-small flex-item-no-shrink">
|
||||
@@ -19,7 +34,7 @@
|
||||
<%= icon_tag "check", size: 18, class: "checked" %>
|
||||
</div>
|
||||
|
||||
<%= link_to cards_path(collection_ids: [ collection ]), class: "btn popup__item min-width" do %>
|
||||
<%= link_to cards_path(collection_ids: [ collection ]), class: "btn popup__item min-width flex-item-grow" do %>
|
||||
<span class="overflow-ellipsis"><%= collection.name %></span>
|
||||
<% end %>
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
|
||||
<dialog class="popup popup--animated panel flex-column align-start gap-half fill-white shadow" data-dialog-target="dialog" data-action="keydown.esc->dialog#close:stop turbo:before-cache@document->dialog#close">
|
||||
<div class="flex align-center full-width gap-half">
|
||||
<span class="btn borderless" style="pointer-events: none; --icon-size: 1.3em; --btn-padding: 0 0.6em 0 0.3em;">
|
||||
<span class="btn borderless" style="pointer-events: none; --icon-size: 1.3em; --btn-padding: 0 0.4em 0 0.6em;">
|
||||
<%= icon_tag "filter" %>
|
||||
</span>
|
||||
<strong class="popup__title txt-medium">Collections</strong>
|
||||
|
||||
Reference in New Issue
Block a user