Show markdown description text on item detail page
* Update build process to *not* copy over prerendered pages during a regular build (only during a `dist` build) * Add dependency on npm "markdown" package and include it in the scripts loaded in the default layout * Update the Item model to be able to load from a *.cg file * Add an ItemParser to process the `item.cg` file * Update the general parser to be able to work with HereDoc-style text blocks * Add a markdown-specific stylesheet * Add a sample of the `item.cg` file format (Advanced Crafting Table)
This commit is contained in:
@@ -18,8 +18,8 @@ module.exports = class ItemController extends BaseController
|
||||
options.templateName = 'item'
|
||||
super options
|
||||
|
||||
@_imageLoader = options.imageLoader
|
||||
@_modPack = options.modPack
|
||||
@imageLoader = options.imageLoader
|
||||
@modPack = options.modPack
|
||||
|
||||
# BaseController Overrides #####################################################################
|
||||
|
||||
@@ -30,9 +30,9 @@ module.exports = class ItemController extends BaseController
|
||||
super
|
||||
|
||||
refresh: ->
|
||||
display = @_modPack.findItemDisplay @model.slug
|
||||
display = @modPack.findItemDisplay @model.slug
|
||||
|
||||
@_imageLoader.load display.iconUrl, @$icon
|
||||
@imageLoader.load display.iconUrl, @$icon
|
||||
@$name.html display.itemName
|
||||
@$nameLink.attr 'href', display.itemUrl
|
||||
|
||||
|
||||
Reference in New Issue
Block a user