extends layout

mixin displayFeature(feature)
  .panel.panel-default
    .panel-heading: h2.panel-title!= helpers.highlightQuery(feature.name, query)
    dl.dl-horizontal.panel-body: each example in feature.examples
      dt!= helpers.highlightQuery(example.technology, query)
      each snippet in example.snippets
        dd: code!= helpers.highlightQuery(snippet, query)

block content
  // header
  .page-header
    h1
      a(href='/') Rose 
      small An interactive, technical, and openly editable Rosetta Stone for developers.

  // search form
  form.search-form.input-group(role='search')
    input.form-control(type='search', name='query', placeholder='Search for features, technologies, or code snippets', value=query, autofocus)
    .input-group-btn
      button.btn.btn-primary(type='submit')
        span.glyphicon.glyphicon-search

  // results
  .search-results
    if features.length > 0
      each feature in features
        +displayFeature(feature)
    else
      h2.text-muted No results

  // footer
  hr
  footer
    | &copy; 2014 
    a(href='http://thenickperson.com') Nicolas McCurdy
    a.pull-right(href='https://github.com/nicolasmccurdy/rose' target='_blank').
      GitHub Repository

extends layout

mixin displayFeature(feature)
  .panel.panel-default
    .panel-heading: h2.panel-title!= helpers.highlightQuery(feature.name, query)
    dl.dl-horizontal.panel-body: each example in feature.examples
      dt!= helpers.highlightQuery(example.technology, query)
      each snippet in example.snippets
        dd: code!= helpers.highlightQuery(snippet, query)

block content
  // header
  .page-header
    h1
      a(href='/') Rose 
      small An interactive, technical, and openly editable Rosetta Stone for developers.

  // search form
  form.search-form.input-group(role='search')
    input.form-control(type='search', name='query', placeholder='Search for features, technologies, or code snippets', value=query, autofocus)
    .input-group-btn
      button.btn.btn-primary(type='submit')
        span.glyphicon.glyphicon-search

  // results
  .search-results
    if features.length > 0
      each feature in features
        +displayFeature(feature)
    else
      h2.text-muted No results

  // footer
  hr
  footer
    | &copy; 2014 
    a(href='http://nicolasmccurdy.com/') Nicolas McCurdy
    a.pull-right(href='https://github.com/nicolasmccurdy/rose' target='_blank').
      GitHub Repository

Fix the link to my site
Fix the link to my site
