summaryrefslogtreecommitdiff
path: root/views/index.jade
blob: 36d11e2529a19671e392598b0488c02453ddc50a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
extends layout

block navbar
  div(class='navbar navbar-fixed-top')
    div(class='navbar-inner')
      div(class='container')
        a(class='btn btn-navbar', data-toggle='collapse', data-target='.nav-collapse')
          span(class='icon-bar')
        a(class='brand', href='/') Collection+JSON Explorer
        div(class='nav-collapse')
          ul(class='nav')

block content
  div(class='hero-unit')
    h1= title

    // spacers
    div(class='row')  
    div(class='row')  

    div(class='row')
      div(class='offset3 span6')
        form(action='/render', class='form-search')
          input(type='text', name='url', placeholder='Resource to explore', class='span5')
          button(type='submit', class='btn') Explore

    //
      p
        form(action='/render', class='form-search')
          input(type='text', name='url', placeholder='Enter URL to explore...', class='span6')
          button(type='submit', class='btn') Explore

  div(class='row')
    div(class='span4')
      h2 About
      p This is an interactive explorer for the Collection+JSON
        |hypermedia. Give it an URL and it will render is as good as it
        |can.

      h3 REST/Collection+JSON Resources

      p There's a growing C+J community that's discussing on the 
        a(href='https://groups.google.com/forum/#!forum/collectionjson') Google Group
        | .

      p The 
        a(href='http://amundsen.com/media-types/collection/') formal specification 
        | with a tutorial and examples.

    div(class='span4')
      h2 Using

      p Feel to use this service! However, note that it's running on a free 
        a(href='http://heroku.com') Heroku
        |  instance so it might fail, be slow or otherwise useless.

      p If you want to run it against your own local servers you can
        | either run it yourself, or use apps like 
        a(href='http://localtunnel.com') localtunnel.com 
        | to make your application publicly available.

      h3 The Source Code

      p The source code is available 
        a(href='trygvis.dyndns.org/~trygvis/git/2012/06/collection+json-explorer.git') here
        | .

    div(class='span4')
      h2 Examples

      p The 
        a(href='http://employee.herokuapp.com') Employee 
        |application is a set of resources with employees and
        |departments. The application was made specifically for this
        |explorer. 
        a(href='http://' + host + '/render?url=http%3A%2F%2Femployee.herokuapp.com') Explore now!

      p The specification contains a few example collections too which you can explore: 
        - var examples = [ "minimal", "collection", "item", "queries", "template", "error" ]
          each example, i in examples
            - var u='http://' + host + '/render?url=' + encodeURIComponent('http://' + host + '/examples/from-spec/' + example + '.collection+json')
              if i > 0
                | , 
              a(href='#{u}') #{example}
              if i == examples.length - 1
                |.