29 lines
921 B
Plaintext
Raw Normal View History

2017-10-04 06:12:12 +00:00
component Shop(user *arn.User, items []*arn.Item)
2017-10-05 08:26:07 +00:00
ShopTabs(user)
2017-10-03 13:26:29 +00:00
2017-10-05 11:48:16 +00:00
h1.page-title Shop
2017-11-03 11:02:13 +00:00
.shop-items
2017-10-04 06:12:12 +00:00
each item in items
ShopItem(item)
2017-10-05 08:26:07 +00:00
component ShopTabs(user *arn.User)
2017-10-04 06:12:12 +00:00
.tabs
2018-03-04 15:53:42 +00:00
Tab("Support", "heart", "/support")
2017-10-04 06:12:12 +00:00
Tab("Shop", "shopping-cart", "/shop")
Tab("Inventory", "briefcase", "/inventory")
2017-10-06 10:44:55 +00:00
Tab("History", "history", "/shop/history")
2017-10-05 08:26:07 +00:00
Tab(strconv.Itoa(user.Balance), "diamond", "/charge")
2017-10-03 13:26:29 +00:00
2017-10-04 06:12:12 +00:00
component ShopItem(item *arn.Item)
2017-11-05 06:29:13 +00:00
.shop-item.mountable(data-item-id=item.ID)
h3.shop-item-name
2017-10-06 10:44:55 +00:00
.item-icon
Icon(item.Icon)
2017-10-04 06:12:12 +00:00
span= item.Name
//- span.shop-item-duration= " " + duration
2017-10-07 19:04:32 +00:00
.shop-item-description!= markdown.Render(item.Description)
2017-10-03 13:26:29 +00:00
.buttons.shop-buttons
2017-10-05 11:48:16 +00:00
button.shop-button-buy.action(data-item-id=item.ID, data-item-name=item.Name, data-price=item.Price, data-trigger="click", data-action="buyItem")
2017-11-05 06:29:13 +00:00
span.shop-item-price= "Buy for " + toString(item.Price)
2017-10-03 13:26:29 +00:00
Icon("diamond")