1
0
Fork 0
forked from OpenNeo/impress
impress/app/views/items/sources.html.haml
Matchu d8b577aab1 Add more info to NC Mall section of Item Getting Guide
NC prices, some CSS, and also a new application-level helper that adds
a feature I've long wanted and been working around for Turbo: the
ability to specific that a stylesheet is specific to the current page,
and should be unloaded when removed!

I use this to write `sources.sass` without the usual
`body.items-sources` scoping that we've historically used to control
what pages a stylesheet applies to. (In the long past, this was because
a lot of stylesheets were—and still are–routed through the
`application.sass` stylesheet! But even for more recent standalone page
stylesheets, I've done the scoping, to avoid issues with styles leaking
beyond the page they're meant for when Turbo does a navigation.)
2024-05-14 16:04:40 -07:00

30 lines
794 B
Text

- title "Item Getting Guide"
%h1#title Item Getting Guide
- if @nc_mall_items.present?
%h2 NC Mall items
%p
These items are available in the NC Mall right now! You can buy them
with #{link_to "Neocash", "https://secure.nc.neopets.com/get-neocash"},
a special currency you can purchase directly from Neopets or redeem via gift cards.
%ul.nc-mall-items
- @nc_mall_items.each do |item|
%li
= render item
%button.add-to-cart{onclick: "alert('Todo!')"}
Buy (#{item.current_nc_price} NC)
- if @np_items.present?
%h2 Neopoint items
= render @np_items
- if @pb_items.present?
%h2 Paintbrush items
= render @pb_items
- if @other_nc_items.present?
%h2 Other NC items
= render @other_nc_items
- content_for :stylesheets do
= page_stylesheet_link_tag "items/sources"