layout.html 3.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. {% extends "!layout.html" -%}
  2. {# Refer to https://github.com/readthedocs/sphinx_rtd_theme/blob/master/sphinx_rtd_theme/layout.html #}
  3. {% block htmltitle -%}
  4. <title>{{ godot_title_prefix }}{{ title|striptags|e }}{{ titlesuffix }}</title>
  5. {% endblock -%}
  6. {% block extrahead -%}
  7. <meta name="doc_version" content="{{ version }}" />
  8. <meta name="doc_is_latest" content="{{ godot_is_latest }}" />
  9. {% endblock -%}
  10. {% block linktags -%}
  11. <meta name="theme-color" content="#3d8fcc" />
  12. {% if godot_inject_language_links -%}
  13. {% for alternate_lang in godot_docs_supported_languages -%}
  14. {# Convert to ISO 639-1 format, e.g. zh_CN -> zh-cn -#}
  15. {% set alternate_lang_href = alternate_lang.lower().replace("_", "-") -%}
  16. <link rel="alternate" hreflang="{{ alternate_lang_href }}" href="{{ godot_docs_basepath }}{{ alternate_lang }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
  17. {% endfor -%}
  18. <link rel="alternate" hreflang="x-default" href="{{ godot_docs_basepath }}{{ godot_default_lang }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
  19. <link rel="canonical" href="{{ godot_docs_basepath }}{{ lang_attr }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
  20. {% endif -%}
  21. {{ super() }}
  22. {% endblock -%}
  23. {%- block document %}
  24. <div itemprop="articleBody">
  25. {% if godot_is_latest or godot_show_article_status %}
  26. <div class="admonition-grid">
  27. {% if godot_is_latest %}
  28. <div class="admonition attention latest-notice">
  29. <p class="first admonition-title">Attention: Here be dragons</p>
  30. <p>
  31. This is the <code class="docutils literal notranslate"><span class="pre">latest</span></code>
  32. (unstable) version of this documentation, which may document features
  33. not available in or compatible with released stable versions of Godot.
  34. </p>
  35. <p class="last latest-notice-link">
  36. Checking the stable version of the documentation...
  37. </p>
  38. </div>
  39. {% endif %}
  40. {% if godot_show_article_status and not godot_is_latest %}
  41. <div class="admonition tip article-status">
  42. {% if meta and meta.get('article_outdated') == 'True' %}
  43. <p class="first admonition-title">Work in progress</p>
  44. <p>
  45. The content of this page was not yet updated for Godot
  46. <code class="docutils literal notranslate">{{ godot_version }}</code>
  47. and may be <strong>outdated</strong>. If you know how to improve this page or you can confirm
  48. that it's up to date, feel free to <a href="https://github.com/godotengine/godot-docs">open a pull request</a>.
  49. </p>
  50. {% else %}
  51. <p class="first admonition-title">Up to date</p>
  52. <p>
  53. This page is <strong>up to date</strong> for Godot <code class="docutils literal notranslate">{{ godot_version }}</code>.
  54. If you still find outdated information, please <a href="https://github.com/godotengine/godot-docs">open an issue</a>.
  55. </p>
  56. {% endif %}
  57. </div>
  58. {% endif %}
  59. </div>
  60. {% endif %}
  61. {% block body %}{% endblock %}
  62. {%- if self.comments()|trim %}
  63. <div class="articleComments">
  64. {%- block comments %}{% endblock %}
  65. </div>
  66. {%- endif%}
  67. </div>
  68. {%- endblock %}