From 283a5b04794a93dfeba987135fdb1ae66c5507aa Mon Sep 17 00:00:00 2001 From: Emi Matchu Date: Mon, 20 May 2024 16:15:46 -0700 Subject: [PATCH] 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! --- app/assets/stylesheets/items/sources.sass | 17 +++++++---------- app/views/items/sources.html.haml | 8 ++++---- 2 files changed, 11 insertions(+), 14 deletions(-) diff --git a/app/assets/stylesheets/items/sources.sass b/app/assets/stylesheets/items/sources.sass index cea0ce6b..b4b1d5a1 100644 --- a/app/assets/stylesheets/items/sources.sass +++ b/app/assets/stylesheets/items/sources.sass @@ -17,15 +17,15 @@ &:last-child padding-right: .5em - .thumbnail-cell - img - display: block - width: 2.5em - height: 2.5em + .thumbnail-cell img + display: block + width: 2.5em + height: 2.5em - .add-to-cart-cell + .actions-cell text-align: right padding-left: 1em + font-size: 85% thead background: $module-bg-color @@ -33,9 +33,6 @@ th text-align: left - .add-to-cart + .actions-cell button /* Bootstrap's Purple 600 */ +awesome-button-color(#59359a) - - .add-to-cart - font-size: 85% diff --git a/app/views/items/sources.html.haml b/app/views/items/sources.html.haml index 3aef3a58..df15f62f 100644 --- a/app/views/items/sources.html.haml +++ b/app/views/items/sources.html.haml @@ -18,16 +18,16 @@ Total: #{@nc_mall_items.map(&:current_nc_price).sum} NC (#{pluralize @nc_mall_items.size, "item"}) - %td.add-to-cart-cell - %button.add-to-cart{onclick: "alert('Todo!')"} + %td.actions-cell + %button{onclick: "alert('Todo!')"} Buy all in NC Mall %tbody - @nc_mall_items.each do |item| %tr %td.thumbnail-cell= item_thumbnail_for(item) %td= item.name - %td.add-to-cart-cell - %button.add-to-cart{onclick: "alert('Todo!')"} + %td.actions-cell + %button{onclick: "alert('Todo!')"} Buy (#{item.current_nc_price} NC) - if @np_items.present?