patternfly/angular-patternfly

View on GitHub
grunt-uidocs-index.tmpl

Summary

Maintainability
Test Coverage

<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7" <% if(!deferLoad) { %>ng-app="docsApp" <% } %> lang="en" ng-controller="DocsController"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8" <% if(!deferLoad) { %>ng-app="docsApp" <% } %> lang="en" ng-controller="DocsController"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9" <% if(!deferLoad) { %>ng-app="docsApp" <% } %> lang="en" ng-controller="DocsController"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js" <% if(!deferLoad) { %>ng-app="docsApp" <% } %> lang="en" ng-controller="DocsController"> <!--<![endif]-->
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="Description"
        content="AngularJS is what HTML would have been, had it been designed for building web-apps.
                 Declarative templates with data-binding, MVC, dependency injection and great
                 testability story all implemented with pure client-side JavaScript!">
  <meta name="fragment" content="!">
  <title ng-bind-template="<%= title || 'Doc' %>: {{partialTitle}}">Docs</title>
  <script type="text/javascript">
    // dynamically add base tag as well as css and javascript files.
    // we can't add css/js the usual way, because some browsers (FF) eagerly prefetch resources
    // before the base attribute is added, causing 404 and terribly slow loading of the docs app.
    (function() {
      var indexFile = (location.pathname.match(/\/(index[^\.]*\.html)/) || ['', ''])[1],
          origin, baseUrl, rUrl = /(\/?#!\/.*|\/(examples|api)\/?(\?.*)*|\/index[^\.]*\.html.*)$/,
          headEl = document.getElementsByTagName('head')[0],
          sync = true;

      if (location.href.slice(0, 7) == 'file://') {
        baseUrl = location.href.replace(rUrl, '/' + indexFile);
      } else {
        origin = location.origin || (window.location.protocol + "//" + window.location.hostname +
                                    (window.location.port ? ':' + window.location.port: ''));
        baseUrl = origin + location.href.substr(origin.length).replace(rUrl, '/' + indexFile);
      }

      addTag('base', {href: baseUrl});
      // Comment out the use of prettify.css as it changes some sizing which disrupts patternfly styling
      // addTag('link', {rel: 'stylesheet', href: 'css/prettify.css', type: 'text/css'});
      // Comment out the use of grunt-ngdoc's docs.css as it disrupts patternfly styling
      // customized version in misc/pf-docs.css
      // addTag('link', {rel: 'stylesheet', href: 'css/docs.css', type: 'text/css'});
      addTag('link', {rel: 'stylesheet', href: 'css/animations.css', type: 'text/css'});

      <% _.forEach(styles, function(url) { %>
        addTag('link', {rel: 'stylesheet', href: '<%= url %>', type: 'text/css'}, sync);
      <% }); %>

      addTag('script', {src: 'js/google-code-prettify.js'}, sync);
      addTag('script', {src: 'js/marked.min.js'}, sync);

      <% _.forEach(scripts, function(url) { %>
        addTag('script', {src: '<%= url %>'}, sync);
      <% }); %>
      <% if(!deferLoad) { %>
        addTag('script', {src: 'js/angular-bootstrap.js'}, sync);
        addTag('script', {src: 'js/docs-setup.js'}, sync);
        addTag('script', {src: 'js/docs.js'}, sync);
      <% } %>
      function addTag(name, attributes, sync) {
        var el = document.createElement(name),
            attrName;

        for (attrName in attributes) {
          el.setAttribute(attrName, attributes[attrName]);
        }

        sync ? document.write(outerHTML(el)) : headEl.appendChild(el);
      }

      function outerHTML(node){
        // if IE, Chrome take the internal method otherwise build one
        return node.outerHTML || (
            function(n){
                var div = document.createElement('div'), h;
                div.appendChild(n);
                h = div.innerHTML;
                div = null;
                return h;
            })(node);
      }
    })();
<% if (analytics) { %>
    // GA asynchronous tracker
    (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
    (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
    m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
    })(window,document,'script','//www.google-analytics.com/analytics.js','ga');

    ga('create', '<%= analytics.account %>', 'auto');
    ga('send', 'pageview');
<% } %>
  </script>
</head>

<body class="showcase">
  <header>
    <nav class="navbar navbar-default navbar-fixed-top">
      <div class="container-fluid">
        <div class="navbar-header">
          <button type="button" class="navbar-toggle" ng-click="isOpen = !isOpen">
            <span class="sr-only">Toggle navigation</span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
            <span class="icon-bar"></span>
          </button>
          <div class="navbar-brand">
            <a id="logo" ng-bind-template="<%= title %>" href="#"></a>
          </div>
        </div>
        <div class="navbar-collapse navbar-collapse-pf-site collapse">
          <ul id="menu-primary" class="nav navbar-nav navbar-right navbar-utility">
            <li class="active">
              <a href="#">Components</a>
            </li>
            <li>
              <a href="https://github.com/patternfly/angular-patternfly">Github</a>
            </li>
            <li class="applauncher-pf  dropdown dropdown-kebab-pf">
              <a class="dropdown-toggle nav-item-iconic" data-toggle="dropdown" href="#" aria-expanded="true">
                <i class="fa fa-th applauncher-pf-icon" aria-hidden="true">
                  <span class="sr-only">PatternFly Showcases</span>
                </i>
              </a>
              <ul class="dropdown-menu dropdown-menu-right" role="menu">
                <li class="applauncher-pf-item" role="menuitem">
                  <a class="applauncher-pf-link" href="https://rawgit.com/patternfly/patternfly-ng/master-dist/dist-demo/#/">
                    <span class="applauncher-pf-link-title">PatternFly NG</span>
                  </a>
                </li>
                <li class="applauncher-pf-item" role="menuitem">
                  <a class="applauncher-pf-link" href="https://patternfly-webcomponents.github.io/components.html">
                    <span class="applauncher-pf-link-title">PatternFly Web Components</span>
                  </a>
                </li>
                <li class="applauncher-pf-item" role="menuitem">
                  <a class="applauncher-pf-link" href="https://rawgit.com/patternfly/patternfly-react/gh-pages/index.html">
                    <span class="applauncher-pf-link-title">PatternFly React</span>
                  </a>
                </li>
              </ul>
            </li>
          </ul>
        </div>
      </div>
    </nav>
    <nav class="navbar navbar-sidebar navbar-primary" ng-class="{'open': isOpen}">
      <ul>
        <li class="primary-menu">
          <a href="">Menu</a>
          <ul>
            <li class="active">
              <a href="#">Components</a>
            </li>
            <li>
              <a href="https://github.com/patternfly/angular-patternfly">Github</a>
            </li>
            <li>
              <a class="showcase-collapsed" ng-class="{'collapsed': !isCollapsed}" ng-click="isCollapsed = !isCollapsed">PatternFly Showcases</a>
              <ul class="collapse" ng-class="{'in': isCollapsed}">
                <li>
                  <a href="https://rawgit.com/patternfly/patternfly-ng/master-dist/dist-demo/#/">PatternFly NG</a>
                </li>
                <li>
                  <a href="https://patternfly-webcomponents.github.io/components.html">PatternFly Web Components</a>
                </li>
                <li>
                  <a href="https://rawgit.com/patternfly/patternfly-react/gh-pages/index.html">PatternFly React</a>
                </li>
              </ul>
            </li>
          </ul>
        </li>
      </ul>
    </nav>
  </header>

  <div role="main" class="container-fluid">
    <div class="row clear-navbar"></div>

    <div class="row">
      <div class="col-md-12">
        <!--[if lt IE 7]>
        <p class="alert alert-error">Your browser is <em>ancient!</em>
          <a href="http://browsehappy.com/">Upgrade to a different browser</a> to experience this site.
        </p>
        <![endif]-->

        <!--[if lt IE 9]>
        <div class="alert">
          You are using an old version of Internet Explorer.
          For better and safer browsing experience please <a href="http://www.microsoft.com/IE9">upgrade IE</a>
          or install <a href="http://google.com/chrome">Google Chrome browser</a>.
        </div>
        <![endif]-->
      </div>

    </div>

    <div class="row">
      <div class="col-md-3">
        <form class="form-search" ng-submit="submitForm()">
          <% if (bestMatch) { %>
          <div class="dropdown search docs-search"
               ng-class="{open: focused && bestMatch.rank > 0 && bestMatch.page != currentPage}">
            <span class="fa fa-search search-icon"></span>
            <input type="text" ng-model="search" placeholder="search the docs"
                   tabindex="1" accesskey="s" class="search-query" focused="focused">
            <ul class="dropdown-menu">
              <li>
                <a href="{{bestMatch.page.url}}">{{bestMatch.page.shortName}}</a>
              </li>
            </ul>
          </div>
          <% } else { %>
          <div class="docs-search">
            <span class="fa fa-search search-icon"></span>
            <input type="text" ng-model="search" placeholder="search the docs"
                 tabindex="1" accesskey="s" class="search-query">
          </div>
          <% } %>
          <div class="spacer"></div>

          <ul class="nav nav-list well" ng-show="pages.length">
            <li ng-repeat="page in pages track by page.url" ng-class="navClass(page)" class="api-list-item expand">
              <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a>
            </li>
          </ul>

          <ul class="nav nav-list well" ng-repeat="module in modules track by module.url" class="api-list-item">
            <li class="nav-header module">
              <a class="guide">module</a>
              <a class="code" href="{{module.url}}" title="{{module.name}}">{{module.name}}</a>
            </li>

            <li ng-repeat="page in module.others track by page.url" ng-class="navClass(page)" class="api-list-item expand">
              <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a>
            </li>

            <li class="nav-header section" ng-show="module.directives.length">
              <a class="guide">directive</a>
            </li>
            <li ng-repeat="page in module.directives track by page.url" ng-class="navClass(page)" class="api-list-item expand">
              <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a>
            </li>

            <li class="nav-header section" ng-show="module.controllers.length">
              <a class="guide">controller</a>
            </li>
            <li ng-repeat="page in module.controllers track by page.url" ng-class="navClass(page)" class="api-list-item expand">
              <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a>
            </li>

            <li class="nav-header section" ng-show="module.filters.length">
              <a class="guide">filter</a>
            </li>
            <li ng-repeat="page in module.filters track by page.url" ng-class="navClass(page)" class="api-list-item expand">
              <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a>
            </li>

            <li class="nav-header section" ng-show="module.services.length">
              <a class="guide">service</a>
            </li>
            <li ng-repeat="service in module.services track by  (service.instance.url || service.provider.url)" ng-class="navClass(service.instance, service.provider)" class="api-list-item expand">
              <a ng-show="service.provider" class="pull-right" href="{{service.provider.url}}" tabindex="2"><i class="icon-cog"></i></a>
              <a href="{{service.instance ? service.instance.url : service.provider.url}}" tabindex="2">{{service.name}}</a>
            </li>

            <li class="nav-header section" ng-show="module.types.length">
              <a class="guide">Types</a>
            </li>
            <li ng-repeat="page in module.types track by page.url" ng-class="navClass(page)" class="api-list-item expand">
              <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a>
            </li>

            <li class="nav-header section" ng-show="module.globals.length">
              <a class="global guide">global APIs</a>
              &nbsp;
            </li>
            <li ng-repeat="page in module.globals track by page.url" ng-class="navClass(page)" class="api-list-item expand">
              <a href="{{page.url}}" tabindex="2">{{page.id}}</a>
            </li>

          </ul>

        </form>
      </div>
      <div class="col-md-9">

        <ol class="breadcrumb">
          <li ng-repeat="crumb in breadcrumb" ng-class="{'active': !crumb.url}">
            <span ng-hide="crumb.url">{{crumb.name}}</span>
            <a ng-show="crumb.url" href="{{crumb.url}}">{{crumb.name}}</a>
          </li>
        </ol>

        <div id="loading" ng-show="loading">Loading...</div>

        <div class="home" ng-show="(breadcrumb[breadcrumb.length-1].name === 'API Documentation') || (partialTitle.indexOf('Page Not Found') !== -1)">
          <h1>Welcome to Angular PatternFly!<h1>
          <img src="img/patternfly-orb.svg" alt="PatternFly logo" />
          <h3>Angular PatternFly contains custom AngularJS directives which utilize the PatternFly Refererence Implementation.<br/>PatternFly is a community of designers and developers collaborating to build a UI framework for enterprise web applications.</h3>
          <ul>
            <li><a href="https://www.patternfly.org/">More About PatternFly</a></li>
            <li><a href="https://github.com/patternfly/angular-patternfly/issues/">Report an issue on Github</a></li>
            <li><a href="https://patternfly.atlassian.net/secure/RapidBoard.jspa?rapidView=4&projectKey=PTNFLY&view=planning.nodetail">View the Implementation Roadmap</a></li>
          </ul>
        </div>

        <div ng-hide="loading" ng-include src="currentPage.partialUrl" onload="afterPartialLoaded()" autoscroll class="content slide-reveal"></div>
<% if (discussions) { %>
        <div id="disqus" class="disqus">
          <h2>Discussion</h2>
          <div id="disqus_thread" class="content-panel-content"></div>
        </div>
<% } %>
      </div>
    </div>
  </div>

</body>
</html>