diff --git a/website/views/static/merch.jade b/website/views/static/merch.jade index 75657219ff..d65b91746a 100644 --- a/website/views/static/merch.jade +++ b/website/views/static/merch.jade @@ -1,25 +1,24 @@ extends ./layout // Merchandise page : when adding a merchandise make sure to add following resources - + image of merchandise -- eg. teespring.png - + logo of merchant -- eg. teespring-logo.png + + image of merchandise -- MERCHANT.KEY.png -- eg. teespring.png + + logo of merchant -- MERCHANT.KEY-logo.png -- eg. teespring-logo.png + update merch.json with extra info about merchandise - merch-MERCHANT.KEY-summary -- eg. merch-teespring-summary -> Teespring is and will always be... - merch-MERCHANT.KEY-goto -- eg. merch-teespring-goto -> Get myself a Habitica T-Shirts + update this page with an extra merchant (var merchants) - key (used in locale files) + - logo (do we have a logo for this merchant, true || false) - name (if no logo, this will be shown instead) - link - - image - - logo (if non provided, name will be shown) - eg. -> merchants.push({key: 'teespring', name: 'Teespring', link: 'https://teespring.com/habitica-gryphon-t-shirt', image: 'teespring.png', logo: 'teespring-logo.png'}) + eg. -> merchants.push({key: 'teespring', logo: true, name: 'Teespring', link: 'https://teespring.com/habitica-gryphon-t-shirt'}) block vars - var layoutEnv = env - var merchants = [] - - merchants.push({key: 'teespring', name: 'Teespring', link: 'https://teespring.com/habitica-gryphon-t-shirt', image: 'teespring.png', logo: 'teespring-logo.png'}) - - merchants.push({key: 'stickermule', name: 'Stickermule', link: 'https://www.stickermule.com/uk/marketplace/9317-habitica-gryphon-sticker', image: 'stickermule.png', logo: 'stickermule-logo.png'}) + - merchants.push({key: 'teespring', logo: true, name: 'Teespring', link: 'https://teespring.com/habitica-gryphon-t-shirt'}) + - merchants.push({key: 'stickermule', logo: true, name: 'Stickermule', link: 'https://www.stickermule.com/uk/marketplace/9317-habitica-gryphon-sticker'}) block title title=env.t('merch') @@ -38,10 +37,10 @@ block content .col-lg-6.col-md-6.col-sm-12 .merch-block if merchant.logo - img(src="/merch/" + "#{merchant.logo}") + img(src="/merch/" + "#{merchant.key}" + "-logo.png") else h3=merchant.name - div: a(href="#{merchant.link}" target='_blank'): img.img-rendering-auto(src="/merch/" + "#{merchant.image}") + div: a(href="#{merchant.link}" target='_blank'): img.img-rendering-auto(src="/merch/" + "#{merchant.key}" + ".png") p=env.t('merch-' + merchant.key + '-summary') a.btn(href="#{merchant.link}" target='_blank')=env.t('merch-' + merchant.key + '-goto') // Merchandise block - END