|
6 | 6 | <main class="container"> |
7 | 7 | <div style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem;"> |
8 | 8 | <h1 class="page-title" style="margin: 0;">Shop</h1> |
9 | | - <a href="/purchases" class="btn btn--secondary">Recent Purchases</a> |
| 9 | + <a href="/purchases" class="btn btn--accent btn--accent-gradient btn--xl btn--pill btn--glow" style="display:inline-flex;align-items:center;gap:10px;"> |
| 10 | + <span>Recent Purchases</span> |
| 11 | + </a> |
10 | 12 | </div> |
11 | 13 |
|
12 | 14 | <div class="shop-layout"> |
13 | 15 | <aside class="shop-categories card"> |
14 | 16 | <h3 class="shop-heading">Category</h3> |
15 | 17 | <ul class="shop-category-list"> |
16 | | - <% categories = [ "Keyboard", "Mouse", "Monitor", "Headphones", "Webcam" ] %> |
17 | | - <% categories.each_with_index do |cat, idx| %> |
| 18 | + <% categories_active = [ "Keyboard", "Mouse", "Monitor", "Headphones", "Webcam" ] %> |
| 19 | + <% categories_soon = [ "Chair", "PC Components", "Desktop Accessories", "Suggest Something!" ] %> |
| 20 | + <% categories_active.each_with_index do |cat, idx| %> |
18 | 21 | <li> |
19 | 22 | <button class="shop-category-item <%= 'is-active' if idx == 0 %>" data-target="cat-<%= cat.downcase %>"> |
20 | 23 | <%= cat %> |
21 | 24 | </button> |
22 | 25 | </li> |
23 | 26 | <% end %> |
| 27 | + <% categories_soon.each do |cat| %> |
| 28 | + <li> |
| 29 | + <button class="shop-category-item" disabled> |
| 30 | + <span class="shop-category-item__label"><%= cat %></span> |
| 31 | + <img |
| 32 | + src="https://files.slack.com/files-pri/T09V59WQY1E-F0A73PBKWEN/1000_f_108839823_c2hrfq0hbz7wkf6ngjesajlakz74zm7b.jpg?pub_secret=76883edfeb" |
| 33 | + alt="Coming Soon" |
| 34 | + class="shop-category-item__badge"> |
| 35 | + </button> |
| 36 | + </li> |
| 37 | + <% end %> |
24 | 38 | </ul> |
25 | 39 | </aside> |
26 | 40 |
|
|
32 | 46 | </div> |
33 | 47 | </div> |
34 | 48 |
|
35 | | - <% categories.each_with_index do |cat, idx| %> |
| 49 | + <% categories_active.each_with_index do |cat, idx| %> |
36 | 50 | <% item = @shop_items.find { |i| i.name.to_s.downcase.strip == cat.downcase } %> |
37 | 51 | <% base_cost = (item&.cost || 0).to_i %> |
38 | 52 | <div id="cat-<%= cat.downcase %>" class="shop-item-detail <%= 'is-active' if idx == 0 %>"> |
|
121 | 135 |
|
122 | 136 | </section> |
123 | 137 | </div> |
124 | | - <div class="card" style="margin-top: 12px; background: #fff3cd; border: 1px solid #ffeeba; color: #856404; padding: 10px; text-align: center;"> |
125 | | - Working progress! We're building the shop page, more items will be added soon! |
126 | | - </div> |
127 | 138 | </main> |
128 | 139 |
|
129 | 140 | <!-- Item Modal --> |
|
150 | 161 | </div> |
151 | 162 | <%= form_with url: purchase_path, method: :post, local: true, id: "shop-modal-form" do %> |
152 | 163 | <input type="hidden" name="item_id" id="shop-modal-item-id" value=""> |
153 | | - <input type="hidden" name="category" id="shop-modal-category" value=""> |
154 | 164 | <input type="hidden" name="variant" id="shop-modal-variant" value=""> |
155 | | - <input type="hidden" name="quantity" id="shop-modal-quantity" value="1"> |
156 | 165 | <button id="shop-modal-buy" type="submit" class="btn btn--primary btn--block">Purchase</button> |
157 | 166 | <% end %> |
158 | 167 | </div> |
|
0 commit comments