| <!DOCTYPE html> |
| <html> |
| <head> |
| <title>Docs</title> |
| <meta charset="utf-8"> |
| <meta name="theme-color" content="#526E9C"> |
| <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> |
| <meta name="google-site-verification" content="pIHubYTE28EzwOWGWmHyNmxRNA6yclJyxSymw6uX8b8" /> |
| <script src="/res/js/core.js"></script> |
| <link href="/res/css/docs.css" rel="stylesheet" /> |
| </head> |
| <body> |
| <div id=page> |
| <div id=drawer drawer vertical layout> |
| <img src="/res/img/logo.png" width=204 height=91> |
| |
| <script> |
| (function() { |
| var cx = '009791159600898516779:8-nlv0iznho'; |
| var gcse = document.createElement('script'); |
| gcse.type = 'text/javascript'; |
| gcse.async = true; |
| gcse.src = (document.location.protocol == 'https:' ? 'https:' : 'http:') + |
| '//www.google.com/cse/cse.js?cx=' + cx; |
| var s = document.getElementsByTagName('script')[0]; |
| s.parentNode.insertBefore(gcse, s); |
| })(); |
| </script> |
| <gcse:search></gcse:search> |
| |
| {{.Nav}} |
| </div> |
| |
| <div id=body main> |
| <button id=menu title="Menu"> |
| <svg viewBox="0 0 24 24" height="24px" width="24px"> |
| <g> |
| <path d="M3 18h18v-2h-18v2zm0-5h18v-2h-18v2zm0-7v2h18v-2h-18z"></path> |
| </g> |
| </svg> |
| </button> |
| <div id=content> |
| {{.Body}} |
| </div> |
| </div> |
| </div> |
| |
| <script> |
| sk.DomReady.then(function() { |
| prettyPrint(); |
| |
| // Open the side drawer with the navigation menu. |
| $$$('button').addEventListener('click', function(e) { |
| $$$('#drawer').classList.add('opened'); |
| e.stopPropagation(); |
| }); |
| |
| // Close the side drawer. |
| $$$('body').addEventListener('click', function() { |
| $$$('#drawer').classList.remove('opened'); |
| }); |
| |
| // highlightNav highlights where we are in the navigation. |
| var highlightNav = function() { |
| $$('#drawer li a').forEach(function(e) { |
| if (e.dataset.path == window.location.pathname) { |
| e.classList.add('selected'); |
| $$$('title').innerText = e.innerText; |
| } else { |
| e.classList.remove('selected'); |
| } |
| }); |
| } |
| |
| // Shortcut the links and handle them via XHR, that way we only |
| // pay the loading time once, yet still retain full URLs. |
| $$('#drawer li a').forEach(function(e) { |
| e.addEventListener('click', function(e) { |
| // Preserve query parameters as we navigate. |
| var q = window.location.search; |
| var url = e.target.dataset.path; |
| if (q != "") { |
| url += q; |
| } |
| sk.get('/_'+url).then(function(content) { |
| window.history.pushState(null, null, url); |
| highlightNav(); |
| $$$('html #content').innerHTML = content; |
| $$$('html #page').scrollIntoView(); |
| prettyPrint(); |
| }); |
| e.preventDefault(); |
| }); |
| }); |
| |
| highlightNav(); |
| }); |
| </script> |
| </body> |
| </html> |