mixin link(href, name)
  a(class!=attributes.class, href=href)= name

doctype html
html(lang="en")
  head
    title Itinerary
    meta(http-equiv="X-UA-Compatible", content="IE=edge")
    meta(name="viewport", content="width=device-width, initial-scale=1")

    - var assets = locals.itinerary.get('config.assets') || {};

    each item in assets.css || []
      - var url = item.href || item;
      link(href='#{url}', rel='stylesheet')

    each item in assets.js || []
      - var url = item.src || item;
      script(src='#{url}')

  body

    .container

      .page-header
        h1 Itinerary
        h2 #{locals.path}

      .row

        p Itinerary will discover the correct CSS & JavaScript based on a given path. This is determined based upon the CSS & JavaScript defined within a manifest.( json | yaml ) file.

        ul
            li: +link('/', '/')
            li: +link('/green', '/green')
            li: +link('/green/background', '/green/background')
            li: +link('/some/path/that/does/not/exist', '/some/path/that/does/not/exist')


      .row

        .panel.panel-default
          .panel-heading Asset Summary
          .panel-body

            each asset in Object.keys(assets)
              if assets[asset]
                .list-group
                    +link('#', asset).list-group-item.disabled
                    each resource in assets[asset]
                        +link(resource, resource)(target="_blank").list-group-item.glyphicon.glyphicon-file
