extends layout

mixin displayFeature(feature)
  = feature.name
  dl: each key in Object.keys(feature.examples)
    +displayExample({ technology: key, code: feature.examples[key]})

mixin displayExample(example)
  dt #{example.technology}: 
  dd
    if typeof example.code === 'string'
      code= example.code
    else
      each str in example.code
        code= str

block content
  .container

    // navbar
    nav.navbar.navbar-default(role='navigation')
      .navbar-header
        a.navbar-brand(href='#') Rose
      .collapse.navbar-collapse
        ul.nav.navbar-nav.navbar-right
          li: a(href='https://github.com/thenickperson/rose' target='_blank').
            GitHub Repository

    // search form
    form.input-group.input-group-lg(role='search')
      input.form-control(type='text', name='query', placeholder='Search for a method, function, or command', autofocus='')
      .input-group-btn
        button.btn.btn-primary(type='submit')
          span.glyphicon.glyphicon-search
    // results
    h2 Results
    ol: each feature in features
      li
        +displayFeature(feature)

    // footer
    hr
    footer
      | &copy; 2014 
      a(href='http://thenickperson.com') Nicolas McCurdy

extends layout

mixin displayFeature(feature)
  = feature.name
  dl: each key in Object.keys(feature.examples)
    +displayExample({ technology: key, code: feature.examples[key]})

mixin displayExample(example)
  dt #{example.technology}: 
  dd
    if typeof example.code === 'string'
      code= example.code
    else
      each str in example.code
        code= str
        br

block content
  .container

    // navbar
    nav.navbar.navbar-default(role='navigation')
      .navbar-header
        a.navbar-brand(href='#') Rose
      .collapse.navbar-collapse
        ul.nav.navbar-nav.navbar-right
          li: a(href='https://github.com/thenickperson/rose' target='_blank').
            GitHub Repository

    // search form
    form.input-group.input-group-lg(role='search')
      input.form-control(type='text', name='query', placeholder='Search for a method, function, or command', autofocus='')
      .input-group-btn
        button.btn.btn-primary(type='submit')
          span.glyphicon.glyphicon-search
    // results
    h2 Results
    ol: each feature in features
      li
        +displayFeature(feature)

    // footer
    hr
    footer
      | &copy; 2014 
      a(href='http://thenickperson.com') Nicolas McCurdy

Add line breaks when there are multiple code blocks for one example
Add line breaks when there are multiple code blocks for one example
