diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2012-06-29 00:21:11 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2012-06-29 00:21:11 +0200 |
commit | e81f24cc6e2de2ed314a1c912c4cb4853b4c13fe (patch) | |
tree | a55638cb602902a8dc95ff703f8ef3371784a5a5 | |
parent | ffc96483ac114306643e2681ed37f3374433ebea (diff) | |
download | collection-json-explorer-e81f24cc6e2de2ed314a1c912c4cb4853b4c13fe.tar.gz collection-json-explorer-e81f24cc6e2de2ed314a1c912c4cb4853b4c13fe.tar.bz2 collection-json-explorer-e81f24cc6e2de2ed314a1c912c4cb4853b4c13fe.tar.xz collection-json-explorer-e81f24cc6e2de2ed314a1c912c4cb4853b4c13fe.zip |
o Adding links on each item.
-rw-r--r-- | Procfile | 2 | ||||
-rw-r--r-- | routes/index.js | 2 | ||||
-rw-r--r-- | views/data.jade | 8 | ||||
-rw-r--r-- | views/index.jade | 3 | ||||
-rw-r--r-- | views/layout.jade | 4 |
5 files changed, 10 insertions, 9 deletions
@@ -1 +1 @@ -web: node app.js +web: node app diff --git a/routes/index.js b/routes/index.js index 9bd03cb..6910dfa 100644 --- a/routes/index.js +++ b/routes/index.js @@ -23,7 +23,7 @@ exports.render = function(req, res){ clientRes.on('end', function (chunk) { var doc = collection_json.fromObject(JSON.parse(body)); res.render('data', { - title: 'Rendering ' + req.query.url, + url: req.query.url, doc: doc, headers: clientRes.headers, raw: body, diff --git a/views/data.jade b/views/data.jade index 3051d63..cb181f3 100644 --- a/views/data.jade +++ b/views/data.jade @@ -1,8 +1,8 @@ extends layout block content - h1= title - p Welcome to #{title} + h1 Collection+JSON Explorer + p Viewing #{url} form(action="/render") p @@ -24,7 +24,9 @@ block content h1 a(href="#items") Items each item, i in doc.items - h2 Item ##{i+1} + a(id="item-#{i+1}") + h2 + a(href="#item-#{i+1}") Item ##{i+1} h3 Data ul each data in item.data diff --git a/views/index.jade b/views/index.jade index 55ed3d4..af774d4 100644 --- a/views/index.jade +++ b/views/index.jade @@ -1,8 +1,7 @@ extends layout block content - h1= title - p Welcome to #{title} + h1 Collection+JSON Explorer form(action="/render") p diff --git a/views/layout.jade b/views/layout.jade index 1b7b305..8fe7f51 100644 --- a/views/layout.jade +++ b/views/layout.jade @@ -1,7 +1,7 @@ doctype 5 html head - title= title + title Collection+JSON Explorer link(rel='stylesheet', href='/stylesheets/style.css') body - block content
\ No newline at end of file + block content |