From 45bcd9509cb4fe3b81b83bc739ec0fd74fb68b15 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 2 Jul 2012 23:49:34 +0200 Subject: o Experimenting with the links and buttons. --- views/data.jade | 96 +++++++++++++++++++++++++++++++-------------------------- 1 file changed, 52 insertions(+), 44 deletions(-) diff --git a/views/data.jade b/views/data.jade index 78d8b76..93054cc 100644 --- a/views/data.jade +++ b/views/data.jade @@ -2,56 +2,59 @@ extends layout block href if typeof href != 'string' - | <no href> + div <no href> else - span - a(href=href) #{href} - | - a(href=urlgenerator.render(href)) Explore + div #{href} 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) + div + a(class='btn btn-primary btn-mini', href=urlgenerator.render(href)) Explore + | + a(class='btn btn-primary btn-mini', href=href) Raw + + dl + dt href + dd + block href + dt rel + dd + if isUrl(link.rel) + a(href=link.rel) #{link.rel} + else + | #{link.rel} + dt name + dd #{name} + dt prompt + dd #{prompt} + if link.render == 'image' + dt + dd: img(src=link.href, alt=link.name, title=name) block meta - - var href=collection.href - table - tr - td version - td #{collection.version} - tr - td href - td: block href - - form(action='http://redbot.org/?') - p - input(type='text', name='uri', value=url, type='hidden') - input(type='text', name='req_hdr', value='Accept: application/vnd.collection+json', type='hidden') - input(type='text', type='submit', value='Check with redbot.org') - + div(class='row') + div(class='span12') + p + - var href=collection.href + dl + dt version + dd #{collection.version} + dt href + dd: block href + + div(class='row') + div(class='span12') + p + a(class='btn btn-primary', href=urlgenerator.render(href)) Explore + | + a(class='btn btn-primary', href=href) Raw + | + form(action='http://redbot.org') + input(type='text', name='uri', value=url, type='hidden') + input(type='text', name='req_hdr', value='Accept: application/vnd.collection+json', type='hidden') + button(class='btn btn-primary', type='submit') Check with redbot.org if collection.links.length > 0 h2 Collection Links @@ -72,10 +75,15 @@ block items each item, i in collection.items // a(id='item-#{i+1}'): h2: a(href='#item-#{i+1}') Item ##{i+1} h2 Item ##{i+1} + div + a(class='btn btn-primary btn-mini', href=urlgenerator.render(href)) Explore + | + a(class='btn btn-primary btn-mini', href=href) Raw - var href=item.href - p href: - block href + dl + dt href + dd: block href if item.links.length > 0 h3 Item Links -- cgit v1.2.3