Add NC prices to item pages

This commit is contained in:
Emi Matchu 2024-06-18 13:25:29 -07:00
parent bbd1849e19
commit 1acb00e35a
3 changed files with 13 additions and 3 deletions

View file

@ -37,10 +37,12 @@
align-items: center align-items: center
gap: 1em gap: 1em
abbr
cursor: help
.item-kind, .first-seen-at .item-kind, .first-seen-at
padding: .25em .5em padding: .25em .5em
border-radius: .25em border-radius: .25em
cursor: help
text-decoration: none text-decoration: none
font-weight: bold font-weight: bold
@ -48,6 +50,9 @@
background: #E2E8F0 background: #E2E8F0
color: #1A202C color: #1A202C
.icon
vertical-align: middle
.item-kind .item-kind
// These colors are copied from DTI 2020, for initial consistency! // These colors are copied from DTI 2020, for initial consistency!

View file

@ -9,7 +9,12 @@
= image_tag item.thumbnail_url, class: 'item-thumbnail' = image_tag item.thumbnail_url, class: 'item-thumbnail'
%h2.item-name= item.name %h2.item-name= item.name
%nav.item-links %nav.item-links
- if item.nc? - if item.currently_in_mall?
= link_to "https://ncmall.neopets.com/", class: "item-kind", data: {type: "nc"},
title: "Currently in NC Mall!", target: "_blank" do
= cart_icon alt: "Buy"
#{item.current_nc_price} NC
- elsif item.nc?
%abbr.item-kind{'data-type' => 'nc', title: t('items.show.item_kinds.nc.description')} %abbr.item-kind{'data-type' => 'nc', title: t('items.show.item_kinds.nc.description')}
= t('items.show.item_kinds.nc.label') = t('items.show.item_kinds.nc.label')
- elsif item.pb? - elsif item.pb?

View file

@ -299,7 +299,7 @@ en:
item_kinds: item_kinds:
nc: nc:
label: NC label: NC
description: Purchaseable with Neocash description: Neocash (but not currently in NC Mall)
np: np:
label: NP label: NP
description: Purchaseable with Neopoints description: Purchaseable with Neopoints