Show 3 cols in public view

This commit is contained in:
Jason Zimdars
2025-08-20 17:30:21 -05:00
parent 00c975fbe7
commit 00933570b9
5 changed files with 20 additions and 5 deletions
@@ -7,6 +7,7 @@ class Public::CollectionsController < ApplicationController
def show
@considering = current_page_from @collection.cards.considering.latest, per_page: CardsController::PAGE_SIZE
@on_deck = current_page_from @collection.cards.on_deck.latest, per_page: CardsController::PAGE_SIZE
@doing = current_page_from @collection.cards.doing.latest, per_page: CardsController::PAGE_SIZE
@closed = current_page_from @collection.cards.closed.recently_closed_first, per_page: CardsController::PAGE_SIZE
@@ -27,6 +27,7 @@
<% end %>
<div class="card-columns">
<%= render "public/collections/show/on_deck", collection: @collection, page: @on_deck %>
<%= render "public/collections/show/considering", collection: @collection, page: @considering %>
<%= render "public/collections/show/doing", collection: @collection, page: @doing %>
</div>
@@ -1,8 +1,4 @@
<section id="considering-cards" class="cards cards--considering">
<h2 class="cards__heading">
Considering
</h2>
<% if page.used? %>
<%= render partial: "cards/display/public_preview", collection: page.records, as: :card, cached: true %>
@@ -1,6 +1,6 @@
<section id="doing-cards" class="cards cards--doing" style="view-transition-name: cards-container;">
<h2 class="cards__heading">
Doing
Yes!
</h2>
<% if page.used? %>
@@ -0,0 +1,17 @@
<section id="considering-cards" class="cards cards--on-deck">
<h2 class="cards__heading">
Maybe?
</h2>
<% if page.used? %>
<%= render partial: "cards/display/public_preview", collection: page.records, as: :card, cached: true %>
<% unless page.last? %>
<div class="full-width">
<%= public_collection_cards_next_page_link collection, "on-deck-cards", page: page %>
</div>
<% end %>
<% else %>
<p class="txt-medium translucent">Nothing here</p>
<% end %>
</section>