extends layout block href if typeof href != 'string' | <no href> else span a(href=href) #{href} | a(href=urlgenerator.render(href)) Explore block link - var name = typeof link.name == 'string' ? link.name : '' - var prompt = typeof link.prompt == 'string' ? link.prompt : '' - var href = link.href table tr td href td block href tr td rel td if isUrl(link.rel) a(href=link.rel) #{link.rel} else | #{link.rel} tr td name td #{name} tr td prompt td #{prompt} if link.render == 'image' tr td td: img(src=link.href, alt=link.name, title=name) block err p Error rendering #{url} p= err block data p Viewing #{url} form(action="/render") p label URL: input(name="url", size=100, value=url) input(type="submit", value="Render") form(action="http://redbot.org/?") p input(name="uri", value=url, type="hidden") input(type="submit", value="Check with redbot.org") ul li a(href="#meta") Meta li a(href="#items") Items li a(href="#headers") Headers li a(href="#formatted-body") Formatted body li a(href="#body") Raw body a(id="meta"): h1: a(href="#meta") Meta - var href=doc.href table tr td version td #{doc.version} tr td href td: block href h2 Collection Links if doc.links.length == 0 p Collection has no links. else each link, i in doc.links - var title = link.prompt || link.name - title = title ? ": " + title : "" h3 Collection Link ##{i}#{title} block link a(id="items"): h1: a(href="#items") Items if doc.items.length == 0 p Collection has to items. else p The feed has #{doc.items.length} items. each item, i in doc.items a(id="item-#{i+1}"): h2: a(href="#item-#{i+1}") Item ##{i+1} - var href=item.href p href: block href h3 Item Links if item.links.length == 0 p Item has no links. else each link, i in item.links h4 Item Link ##{i} block link h3 Data table each data in item.data tr td #{data.name} td #{data.value} a(id="headers"): h1: a(href="#headers") Headers pre table each value, key in headers tr td #{key}: td #{value} a(id="formatted-body"): h1: a(href="#formatted-body") Formatted body pre= formattedRaw a(id="body"): h1: a(href="#body") Raw body pre= raw block content h1 Collection+JSON Explorer if typeof err == 'undefined' block data else block err