Mashape/mockbin

View on GitHub
src/views/bin/view.pug

Summary

Maintainability
Test Coverage
extends ../layout.pug

block content
  div(data-page="bin/view").container
    div.row
      div.col-sm-9
        h3 Bin Identifier: #[code= req.params.uuid + req.params[0]]

        div#preview
          pre: code= data.json

      div.col-sm-3
        h3 Next Steps

        a(href= '#apiembed').btn.btn-block.btn-primary #[span.badge 1]   Send Some Requests
        a(href= '/bin/' + req.params.uuid + req.params[0]).btn.btn-block.btn-primary #[span.badge 2]   Visit in Browser
        a(href= '/bin/log/' + req.params.uuid + req.params[0]).btn.btn-block.btn-primary #[span.badge 3]   View History

    br

    h4#apiembed Send Some Requests:

    p Send request to #[a(target="_blank", href=req.protocol + '://' + req.get('host') +  '/bin/'+ req.params.uuid + req.params[0] )= req.protocol + '://' + req.get('host') +   '/bin/' + req.params.uuid + req.params[0] ]



block scripts
  script(type='text/javascript').
    $(function() {
      // highlight the code
      $('pre code').each(function (i, block) {
        hljs.highlightBlock(block);
      });
    });