extends layout

mixin displayFeature(feature)
  .panel.panel-default
    .panel-heading: h2.panel-title= feature.name
    ul.list-group: each key in Object.keys(feature.examples)
      +displayExample(key, feature.examples[key])

mixin displayExample(technology, snippets)
  li.list-group-item: .row
    .col-md-2.technology= technology
    ul.col-md-10.list-inline
      each snippet in toArray(snippets)
        li: code= snippet

block content
  .well: .container.search-bar
    // search form
    form.input-group.input-group-lg(role='search')
      input.form-control(type='search', name='query', placeholder='Search for code snippets', value=query, autofocus)
      .input-group-btn
        button.btn.btn-primary(type='submit')
          span.glyphicon.glyphicon-search

  .container
    // results
    .search-results
      h1 Results
      if features.length > 0
        ol: each feature in features
          li: +displayFeature(feature)
      else
        h2.text-muted No results

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

extends layout

mixin displayFeature(feature)
  .panel.panel-default
    .panel-heading: h2.panel-title= feature.name
    ul.list-group: each example in feature.examples
      +displayExample(example.technology, example.snippets)

mixin displayExample(technology, snippets)
  li.list-group-item: .row
    .col-md-2.technology= technology
    ul.col-md-10.list-inline
      each snippet in toArray(snippets)
        li: code= snippet

block content
  .well: .container.search-bar
    // search form
    form.input-group.input-group-lg(role='search')
      input.form-control(type='search', name='query', placeholder='Search for code snippets', value=query, autofocus)
      .input-group-btn
        button.btn.btn-primary(type='submit')
          span.glyphicon.glyphicon-search

  .container
    // results
    .search-results
      h1 Results
      if features.length > 0
        ol: each feature in features
          li: +displayFeature(feature)
      else
        h2.text-muted No results

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

Update the HTML view to support the new schema
Update the HTML view to support the new schema
