extends ./layout // Merchandise page : when adding a merchandise make sure to add following resources + 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 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', logo: true, name: 'Teespring', link: 'https://teespring.com/habitica-gryphon-t-shirt'}) - merchants.push({key: 'teespring-eu', logo: true, name: 'Teespring (EU)', link: 'https://teespring.com/habitica-gryphon-t-shirt_eu'}) - 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') block content .row .col-md-12 .page-header h3=env.t('merch') // Merchandise block - START each merchant, index in merchants if (index+1) % 2 !== 0 .row .col-lg-6.col-md-6.col-sm-12 .merch-block if 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.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