summaryrefslogtreecommitdiff
path: root/views/data.jade
blob: 8fbd05ed37eb52dd04c4c5227b1d89ee7eaf55c5 (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
extends layout

block content
  h1 Collection+JSON Explorer
  p Viewing #{url}

  form(action="/render")
    p
      label URL:
        input(name="url", 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="#body") Raw body
    li
      a(href="#formatted-body") Formatted body

  a(id="meta")
    h1
      a(href="#meta") Meta

    table
      tr
        td Version
        td #{doc.version}
      tr
        td URI
        td
          if typeof doc.uri == 'string'
            a(href="#{doc.uri}") #{doc.uri}
          else
            span No URI

  a(id="items")
    h1
      a(href="#items") Items
  each item, i in doc.items
    a(id="item-#{i+1}")
      h2
        a(href="#item-#{i+1}") Item ##{i+1}
    h3 Data
      ul
      each data in item.data
        li #{data.name}: #{data.value}

  a(id="headers")
    h1
      a(href="#headers") Headers
  pre
    table
      each value, key in headers
        tr
          td #{key}:
          td #{value}

  a(id="body")
    h1
      a(href="#body") Raw body
  pre= raw

  a(id="formatted-body")
    h1
      a(href="#formatted-body") Formatted body
  pre= formattedRaw