layout.html 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. {% extends "!layout.html" %}
  2. {% block rootrellink %}
  3. <li>
  4. <label class="sidebar-toggle" for="sidebar-check"></label>
  5. </li>
  6. <li class="rootlink">
  7. <img src="{{ pathto('_static/cmake-logo-16.png', 1) }}" width="16" height="16" alt=""/>
  8. {%- if versionswitch is defined %}
  9. <a href="https://cmake.org/">CMake</a> <span class="version_switch">{{ release }}</span>
  10. {%- else %}
  11. <a href="https://cmake.org/">CMake {{ release }}</a>
  12. {%- endif %}
  13. <span class="reldelim1">{{ reldelim1 }}</span>
  14. </li>
  15. <li>
  16. <a href="{{ pathto(master_doc) }}">{% trans %}Documentation{% endtrans %}</a>{{ reldelim1 }}
  17. </li>
  18. {% endblock %}
  19. {%- block relbar1 %}
  20. {{ super()|replace('class="related"', 'class="related relbar1"') }}
  21. {%- if outdated is defined %}
  22. <div class="outdated">
  23. This documents an old version of CMake.
  24. <a href="https://cmake.org/cmake/help/latest/{{ pagename }}.html">
  25. Click here to see the latest release.
  26. </a>
  27. <span class="version_switch_note"></span>
  28. </div>
  29. {%- endif %}
  30. {%- endblock %}
  31. {% block extrahead %}
  32. {%- if opensearch is defined %}
  33. <link rel="search" type="application/opensearchdescription+xml"
  34. title="Search within CMake Documentation of Latest Version"
  35. href="{{ pathto('../latest-opensearch.xml', 1) }}"/>
  36. {%- endif %}
  37. {%- if versionswitch is defined %}
  38. <script type="text/javascript" src="{{ pathto('../version_switch.js', 1) }}"></script>
  39. {%- endif %}
  40. {{ super() }}
  41. {% endblock %}
  42. {# Put some context in the html title element. Workaround for #}
  43. {# https://bitbucket.org/birkenfeld/sphinx/issue/1492/qthelp-generate-html-title-element-should #}
  44. {% block htmltitle %}
  45. <title>{{ title|striptags|e }} {{ "&mdash;"|safe }} {{ docstitle|e }}</title>
  46. {% endblock %}
  47. {%- block header %}
  48. {%- if render_sidebar %}
  49. <input id="sidebar-check" type="checkbox" />
  50. <label id="sidebar-overlay" for="sidebar-check"></label>
  51. {%- endif %}
  52. {{ super() }}
  53. {% endblock %}
  54. {%- block footer %}
  55. {{ super() }}
  56. {%- if googleanalytics is defined %}
  57. <script type="text/javascript">
  58. var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  59. document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
  60. </script>
  61. <script type="text/javascript">
  62. try {
  63. var pageTracker = _gat._getTracker("UA-6042509-4");
  64. pageTracker._trackPageview();
  65. } catch(err) {}
  66. </script>
  67. {%- endif %}
  68. {%- if render_sidebar %}
  69. <script type="text/javascript">
  70. (function() {
  71. "use strict";
  72. const hide = () => document.getElementById("sidebar-check").checked = false;
  73. addEventListener("keydown", e => (e.key === "Escape") && hide());
  74. addEventListener("click", e => (e.target.tagName === "A") && hide());
  75. addEventListener("hashchange", hide)
  76. })();
  77. </script>
  78. {%- endif %}
  79. {%- endblock %}