Refactor and simplify Item Getting Guide item list CSS a bit

Notably, we're renaming `.add-to-cart-cell` to `.actions-cell`, in
preparation for other potential actions in other categories!
This commit is contained in:
Emi Matchu 2024-05-20 16:15:46 -07:00
parent 19470f74d4
commit 283a5b0479
2 changed files with 11 additions and 14 deletions

View file

@ -17,15 +17,15 @@
&:last-child &:last-child
padding-right: .5em padding-right: .5em
.thumbnail-cell .thumbnail-cell img
img
display: block display: block
width: 2.5em width: 2.5em
height: 2.5em height: 2.5em
.add-to-cart-cell .actions-cell
text-align: right text-align: right
padding-left: 1em padding-left: 1em
font-size: 85%
thead thead
background: $module-bg-color background: $module-bg-color
@ -33,9 +33,6 @@
th th
text-align: left text-align: left
.add-to-cart .actions-cell button
/* Bootstrap's Purple 600 */ /* Bootstrap's Purple 600 */
+awesome-button-color(#59359a) +awesome-button-color(#59359a)
.add-to-cart
font-size: 85%

View file

@ -18,16 +18,16 @@
Total: #{@nc_mall_items.map(&:current_nc_price).sum} NC Total: #{@nc_mall_items.map(&:current_nc_price).sum} NC
(#{pluralize @nc_mall_items.size, "item"}) (#{pluralize @nc_mall_items.size, "item"})
%td.add-to-cart-cell %td.actions-cell
%button.add-to-cart{onclick: "alert('Todo!')"} %button{onclick: "alert('Todo!')"}
Buy all in NC Mall Buy all in NC Mall
%tbody %tbody
- @nc_mall_items.each do |item| - @nc_mall_items.each do |item|
%tr %tr
%td.thumbnail-cell= item_thumbnail_for(item) %td.thumbnail-cell= item_thumbnail_for(item)
%td= item.name %td= item.name
%td.add-to-cart-cell %td.actions-cell
%button.add-to-cart{onclick: "alert('Todo!')"} %button{onclick: "alert('Todo!')"}
Buy (#{item.current_nc_price} NC) Buy (#{item.current_nc_price} NC)
- if @np_items.present? - if @np_items.present?