jmdobry/reheat

View on GitHub
guide/index.html

Summary

Maintainability
Test Coverage
<!doctype html>
<!--[if lt IE 7]> <html class="no-js lt-ie9 lt-ie8 lt-ie7 ng-app: docsApp;" lang="en" ng-controller="DocsController"> <![endif]-->
<!--[if IE 7]>    <html class="no-js lt-ie9 lt-ie8 ng-app: docsApp;" lang="en" ng-controller="DocsController"> <![endif]-->
<!--[if IE 8]>    <html class="no-js lt-ie9 ng-app: docsApp;" lang="en" ng-controller="DocsController"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js 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="A red hot Node.js ORM for RethinkDB.">
    <meta name="Keywords"
        content="orm, odm, model, schema, rethink, rethinkdb, nosql, database, adapter, reql">
    <meta name="fragment" content="!">
    <title ng-bind-template="Reheat: {{partialTitle}}">Reheat</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() {

            /*============ INITIALIZATION =============*/

            var baseURL = '/'

            var path = function(name) {
                if (production) {
                    return name.replace(/\.js$/, '.min.js');
                } else {
                    return name;
                }
            };

            window.addTag = function (name, attributes, sync) {
                var el = document.createElement(name),
                    headEl = document.getElementsByTagName('head')[0],
                    attrName;

                for (attrName in attributes) {
                  el.setAttribute(attrName, attributes[attrName]);
                }
                sync ? document.write(outerHTML(el)) : headEl.appendChild(el);
            };

            var outerHTML = function (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);
            };

            var indexFile = (location.pathname.match(/\/(index[^\.]*\.html)/) || ['', ''])[1],
                rUrl = /(#!\/|api|guide|misc|tutorial|cookbook|index[^\.]*\.html).*$/,
                baseUrl = location.href.replace(location.pathname, ''),
                jQuery = true,
                debug = /index[^\.]*-debug\.html$/.test(baseUrl) && 3==7,
                production = (location.hostname === 'docs.angularjs.org' && 3==9),
                sync = true,
                angularVersion = {
                    current: '"NG_VERSION_FULL"', // rewrite during build
                    stable: '"NG_VERSION_STABLE"'
                };


            /*============ HERE WE LOAD THE CONFIGURABLE BASEURL ============*/

            addTag('script', {src: '/documentation/docular-configuration.js'}, sync);

            addTag('link', {rel: 'stylesheet', href: '/resources/css/styles.css', type: 'text/css'});
            addTag('script', {src: '/resources/js/libs.min.js'}, sync);
            addTag('script', {src: '/resources/js/scripts.js'}, sync);
        })();

        //google analytics array
        var _gaq = _gaq || [];

        // force page reload when new update is available
        window.applicationCache && window.applicationCache.addEventListener('updateready', function(e) {
            if (window.applicationCache.status == window.applicationCache.UPDATEREADY) {
                window.applicationCache.swapCache();
                window.location.reload();
            }
        }, false);

    </script>

</head>

<body>

    <header class="header" ng-include src="'resources/docular-partials/docular_partial_navigation.html'"></header>

    <div role="main" class="container body">

        <div class="row clear-navbar"></div>

        <div class="row hide-source-container" ng-show="mode == 'show-source'" class="hide-source-container">
            <div class="span12">
                <hide-source></hide-source>
                <div ng-bind-html-unsafe="currentSourceContent"></div>
            </div>
        </div>

        <div class="row">
            <div class="span12">
                <!--[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> or
                  <a href="http://www.google.com/chromeframe/?redirect=true">install Google Chrome Frame</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>


        <!-- HERE WE LOAD THE PARTIAL THAT IS CONFIGURABLE. THIS IS A SORT OF SPLASH PAGE THAT IS CUSTOMIZEABLE -->
        <div class="row partial-home" ng-show="mode == 'home'" ng-include src="'resources/docular-partials/docular_partial_home.html'"></div>

        <!-- HERE WE LOAD THE PARTIAL FOR THE BLANK PAGE AT THE ROOT OF A GROUP (GROUP INDEX) THIS IS CUSTOMIZEABLE -->
        <div class="row partial-group-index" ng-show="mode == 'groupindex'" ng-include src="'resources/docular-partials/docular_partial_group_index.html'"></div>

        <!-- HERE IS THE BASE MARKUP FOR WHEN DOCUMENTATION IS BEING SHOWN -->
        <div class="row" ng-show="mode == 'documentation'" ng-class="loadingClass()">
            <div class="span3">

                <form class="well form-search" ng-submit="submitForm()">

                    <div class="dropdown search" ng-class="{open: focused && bestMatch.rank > 0 && bestMatch.page != currentPage}">
                        <input type="text" ng-model="search" placeholder="search the docs" tabindex="1" accesskey="s" class="input-medium search-query" focused="focused">
                        <ul class="dropdown-menu">
                            <li>
                                <a href="{{bestMatch.page.url}}">{{bestMatch.page.shortName}}</a>
                            </li>
                        </ul>
                    </div>

                    <div class="spacer"></div>
                    <div ng-show="search">Filtered results:</div>

                    <!-- here we just render regular pages -->
                    <div class="overview-items" ng-show="pages.length">
                        <ul class="nav nav-list" ng-hide="page">
                            <li ng-repeat="page in pages" ng-class="navClass(page)">
                                <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a>
                            </li>
                        </ul>
                    </div>

                    <!-- here we just render modules -->
                    <ul class="nav nav-list well" ng-repeat="module in modules">

                        <li class="nav-header module">
                            <button type="button" class="module-visibility btn" ng-class="visibilityClass(module)" ng-click="toggleVisible()">
                                <i ng-class="iconClass(module)"></i>
                            </button>
                            <a class="guide" href="{{module.guideURL}}">module</a>
                            <a class="code module-name" href="{{module.codeURL}}">{{module.name}}</a>
                        </li>

                        <!-- TODO: make this semantic (root level scope is the issue) -->
                        <span ng-repeat="section in module.sections | orderBy:'order'" class="module-section {{module.visible}}">
                            <li class="nav-header section">
                                <span class="section-count">{{section.pages.length}}</span>
                                <a href="{{section.link}}" class="guide">{{section.name}}</a>
                            </li>
                            <li ng-repeat="page in section.pages" ng-class="navClass(page)" class="doc-listing">
                                <a href="{{page.url}}" tabindex="2">{{page.shortName}}</a>
                            </li>
                        </span>

                    </ul>

                </form>
            </div>

            <div class="span9">

                <ul class="breadcrumb">
                    <li ng-repeat="crumb in breadcrumb">
                        <span ng-hide="crumb.url">{{crumb.name}}</span>
                        <a ng-show="crumb.url" href="{{crumb.url}}">{{crumb.name}}</a>
                        <span ng-show="crumb.url || crumb.divider" class="divider">/</span>
                    </li>
                </ul>

                <view-source></view-source>

                <div ng-include src="currentPage.partialUrl" onload="afterPartialLoaded()" autoscroll class="content"></div>

                <div id="disqus" class="disqus" ng-show="discussionsEnabled">
                    <h2>Discussion</h2>
                    <div id="disqus_thread" class="content-panel-content"></div>
                </div>
            </div>

        </div>

    </div>

    <footer class="footer" ng-include src="'resources/docular-partials/docular_partial_footer.html'"></footer>
</body>
</html>