default.html 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <meta name="generator" content="Jekyll v{{ jekyll.version }}">
  7. <link rel="stylesheet" href="//fonts.googleapis.com/css?family=Merriweather:400,400italic,700,700italic|Open+Sans:400,400italic,600,600italic,700,700italic|Inconsolata:400,700">
  8. <link rel="stylesheet" href="{{ site.baseurl }}/css/main.css">
  9. <link rel="apple-touch-icon" href="{{ site.baseurl }}/apple-touch-icon.png">
  10. <link rel="icon" type="image/png" href="{{ site.baseurl }}/touch-icon.png" sizes="192x192">
  11. <link rel="icon" type="image/png" href="{{ site.baseurl }}/images/favicon.png">
  12. {% feed_meta %}
  13. {% seo %}
  14. {% if jekyll.environment == 'production' and site.google_analytics_key != '' %}
  15. <script>
  16. (function(i,s,o,g,r,a,m){i["GoogleAnalyticsObject"]=r;i[r]=i[r]||function(){
  17. (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
  18. m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
  19. })(window,document,"script","//www.google-analytics.com/analytics.js","ga");
  20. ga("create", "{{ site.google_analytics_key }}", "auto");
  21. ga("send", "pageview");
  22. </script>
  23. {% endif %}
  24. </head>
  25. <body>
  26. <header>
  27. <h1>
  28. <a href="{{ site.baseurl }}/"><img src="{{ site.baseurl }}/images/emblem.svg" width="40" height="40" alt="{{ site.title }} logo"></a>
  29. {{ site.title }}
  30. <button type="button" class="open-nav" id="open-nav"></button>
  31. </h1>
  32. <form action="{{ site.baseurl }}/search/" method="get">
  33. <input type="text" name="q" id="search-input" placeholder="Search" autofocus>
  34. <input type="submit" value="Search" style="display: none;">
  35. </form>
  36. <nav {% if site.show_full_navigation %}class="full-navigation"{% endif %}>
  37. <ul>
  38. <li class="nav-item top-level {% if page.url == '/' %}current{% endif %}">
  39. {% assign home = site.html_pages | where: 'url', '/' | first %}
  40. <a href="{{ site.baseurl }}/">{{ home.title }}</a>
  41. </li>
  42. </ul>
  43. <ul>
  44. <li class="nav-item top-level {% if page.url == '/examples' %}current{% endif %}">
  45. <a href="{{ site.baseurl }}/examples">Examples</a>
  46. </li>
  47. </ul>
  48. <ul>
  49. {% assign grouped = site.docs | group_by: 'category' %}
  50. {% for group in grouped %}
  51. <li class="nav-item top-level {% if group.name == page.category %}current{% endif %}">
  52. {% assign items = group.items | sort: 'order' %}
  53. <a href="{{ site.baseurl }}{{ items.first.url }}">{{ group.name }}</a>
  54. <ul>
  55. {% for item in items %}
  56. <li class="nav-item {% if item.url == page.url %}current{% endif %}"><a href="{{ site.baseurl }}{{ item.url }}">{{ item.title }}</a></li>
  57. {% endfor %}
  58. </ul>
  59. </li>
  60. {% endfor %}
  61. </ul>
  62. <ul>
  63. <li class="nav-item top-level {% if page.url == '/changelog/' %}current{% endif %}">
  64. {% assign changelog = site.html_pages | where: 'url', '/changelog/' | first %}
  65. <a href="{{ site.baseurl }}/changelog/">{{ changelog.title }}</a>
  66. </li>
  67. </ul>
  68. </nav>
  69. </header>
  70. <section class="main">
  71. <div class="page-header">
  72. <h2>{% if page.category %}{{ page.category }}{% else %}{{ site.title }}{% endif %}</h2>
  73. <h3>{{ page.title }}</h3>
  74. </div>
  75. <article class="content">
  76. {{ content }}
  77. </article>
  78. </section>
  79. <script>
  80. document.getElementById("open-nav").addEventListener("click", function () {
  81. document.body.classList.toggle("nav-open");
  82. });
  83. </script>
  84. </body>
  85. </html>