default.twig 3.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <title>{{ title }}</title>
  7. <link rel="stylesheet" href="{{ baseUrl }}/css/bootstrap.min.css">
  8. <link rel="stylesheet" href="{{ baseUrl }}/css/font-awesome.min.css">
  9. <link rel="stylesheet" href="{{ baseUrl }}/css/highlight.tomorrow-night.css">
  10. <link rel="stylesheet" href="{{ baseUrl }}/css/main.css">
  11. </head>
  12. <body>
  13. <header class="navbar navbar-default navbar-fixed-top">
  14. <a class="navbar-brand" href="{{ baseUrl }}/">
  15. {{ title|default('The title') }}
  16. <small class="hidden-xs hidden-sm">
  17. {{ subTitle|default('This is the default subtitle!')|raw }}
  18. </small>
  19. </a>
  20. {% if github is defined %}
  21. <a href="https://github.com/{{ github.user }}/{{ github.repo }}">
  22. <img style="position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/38ef81f8aca64bb9a64448d0d70f1308ef5341ab/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f6461726b626c75655f3132313632312e706e67" alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png">
  23. </a>
  24. {% endif %}
  25. </header>
  26. <main class="{{ menu ? 'container-fluid' : 'container' }}">
  27. <div class="row">
  28. {% if menu is defined %}
  29. <nav id="sidebar" class="col-sm-3 col-lg-2" role="navigation">
  30. {% for section in menu.sections %}
  31. <p class="text-muted">
  32. {{ section.name }}
  33. </p>
  34. <ul class="nav nav-pills nav-stacked">
  35. {% for itemId, item in section.items %}
  36. <li class="{{ itemId == currentMenu ? 'active' }}">
  37. <a href="{{ item.absoluteUrl|default(baseUrl ~ '/' ~ item.relativeUrl) }}">
  38. {{ item.text|raw }}
  39. </a>
  40. </li>
  41. {% endfor %}
  42. </ul>
  43. {% endfor %}
  44. </nav>
  45. {% endif %}
  46. <section class="{{ menu ? 'col-sm-offset-3 col-lg-offset-2 col-sm-9 col-lg-10' : 'col-sm-12' }}">
  47. {{ content|raw }}
  48. </section>
  49. </div>
  50. </main>
  51. <script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
  52. <script src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
  53. <script src="//yandex.st/highlightjs/7.5/highlight.min.js"></script>
  54. <script>
  55. $(function() {
  56. $("section>h1").wrap('<div class="page-header" />');
  57. // Syntax highlighting
  58. hljs.initHighlightingOnLoad();
  59. });
  60. </script>
  61. </body>
  62. </html>