FunnelEnvy/optimizely-cli

View on GitHub
templates/index.ejs

Summary

Maintainability
Test Coverage
<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>Optimizely-CLI</title>

    <!-- Bootstrap -->
    <link href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css" rel="stylesheet">
    <style>
      html {
        position: relative;
        min-height: 100%;
      }
      body {
        /* Margin bottom by footer height */
        margin-bottom: 60px;
      }
      .footer {
        position: absolute;
        bottom: 0;
        width: 100%;
        /* Set the fixed height of the footer here */
        height: 60px;
        background-color: #f5f5f5;
      }
      .footer > .container {
        padding-top: 20px;
      }
      ol li, ul li {
        margin-bottom: 10px;
      }
    </style>
    <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script>
      <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <nav class="navbar navbar-default navbar-fixed-top">
      <div class="container">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <a class="navbar-brand" target="_blank" href="http://www.funnelenvy.com/optimizely-cli">Optimizely-CLI</a>
        </div>
        <div id="navbar" class="collapse navbar-collapse">
          <ul class="nav navbar-nav">
            <li><a target="_blank" href="http://www.funnelenvy.com/optimizely-cli">Documentation</a></li>
            <li><a target="_blank" href="https://github.com/funnelenvy/optimizely-cli">Source</a></li>
          </ul>
        </div><!--/.nav-collapse -->
      </div>
    </nav>

    <div style="padding-top: 60px;" class="container">
      <h1>Optimizely-CLI Local Server</h1>
      <strong>Requires the Tampermonkey (Google Chrome) or Greasemonkey (Firefox) extension.</strong>

      <div class="row" style="margin-top: 30px;">
        <div class="col-md-5">
          <div class="panel panel-info">
            <div class="panel-heading">
              <h3 class="panel-title">One Time Setup</h3>
            </div>
            <div class="panel-body">
              <p>Follow the steps below once to host a variation locally with Optimizely-CLI.</p>
              <ol>
                <li>
                Install the <a target="_blank" href="https://chrome.google.com/webstore/detail/tampermonkey/dhdgffkkebhmkfjojejmpbldmpobfkfo?hl=en">TamperMonkey Chrome Extension</a> or <a href="https://addons.mozilla.org/en-US/firefox/addon/greasemonkey/" target="_blank">Greasemonkey Firefox Add On</a>.
                </li>
                <li>
                  Install the Optimizely-cli Injection Script.
                  <a target="_blank" class="btn btn-danger" href="/install.user.js">
                    Install Optimizely-CLI User Script
                  </a>
                </li>
                <li>
                  Refresh the browser. You can now navigate to the local variation using the links to the right. Happy testing!
                </li>
              </ol>
            </div>
          </div>
        </div>
        <div class="col-md-7">
          <h2 style="margin-top: 0;">Currently Hosting</h2>
            <ul class="list-inline">
              <li><strong>Experiment:</strong>&nbsp;<%= experiment_desc %><li>
              <li><strong>Variation:</strong>&nbsp;<%= variation_desc %><li>
              <li style="font-size: 1.2em;"><strong>View Variation:</strong>&nbsp;<a target="_blank" href="<%= edit_url %>"><%= edit_url %></a></li>
              <li>
                <strong>Compiled Javascript:</strong>&nbsp;<a target="_blank" href="//localhost:<%= _port %>/variation.js">localhost:<%= _port %>/variation.js</a>
              </li>
              <li>
                <strong>Global CSS:</strong>&nbsp;<a target="_blank" href="//localhost:<%= _port %>/variation.css">localhost:<%= _port %>/variation.css</a>
              </li>
                
            </ul>

        </div>
      </div>


    </div>

    <footer class="footer">
      <div class="container">
        <p class="text-muted">Brought to you by your friends at <a target="_blank" href="http://www.funnelenvy.com">FunnelEnvy</a>.</p>
      </div>
    </footer>

  </body>
</html>