Files
godot-docs/_templates/layout.html
Yuri Sizov ff4f111677 Add a warning that docs are WIP and a status flag for articles
By default (no flag) articles are considered up-to-date, with the end goal to have no
articles marked as outdated.
Use `:article_outdated: True` at the top of an article to mark it as being outdated.
2023-02-26 12:57:38 +01:00

76 lines
3.1 KiB
HTML

{% extends "!layout.html" -%}
{% block htmltitle -%}
<title>{{ godot_title_prefix }}{{ title|striptags|e }}{{ titlesuffix }}</title>
{% endblock -%}
{% block extrahead -%}
<meta name="doc_version" content="{{ version }}">
<meta name="doc_is_latest" content="{{ godot_is_latest }}">
{% endblock -%}
{% block linktags -%}
<meta name="theme-color" content="#3d8fcc">
{% if godot_inject_language_links -%}
{% for alternate_lang in godot_docs_supported_languages -%}
{# Convert to ISO 639-1 format, e.g. zh_CN -> zh-cn -#}
{% set alternate_lang_href = alternate_lang.lower().replace("_", "-") -%}
<link rel="alternate" hreflang="{{ alternate_lang_href }}" href="{{ godot_docs_basepath }}{{ alternate_lang }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
{% endfor -%}
<link rel="alternate" hreflang="x-default" href="{{ godot_docs_basepath }}{{ godot_default_lang }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
<link rel="canonical" href="{{ godot_docs_basepath }}{{ lang_attr }}/{{ godot_canonical_version }}/{{ pagename }}{{ godot_docs_suffix }}" />
{% endif -%}
{{ super() }}
{% endblock -%}
{%- block document %}
<div itemprop="articleBody">
{% if godot_is_latest or godot_show_article_status %}
<div class="admonition-grid">
{% if godot_is_latest %}
<div class="admonition attention latest-notice">
<p class="first admonition-title">Attention</p>
<p>
You are reading the <code class="docutils literal notranslate"><span class="pre">latest</span></code>
(unstable) version of this documentation, which may document features not available
or compatible with Godot 3.x.
</p>
<p class="last latest-notice-link">
Checking the stable version of the documentation...
</p>
</div>
{% endif %}
{% if godot_show_article_status %}
<div class="admonition tip article-status">
<p class="first admonition-title">Work in progress</p>
<p>
Godot documentation is being updated to reflect the latest changes in version
<code class="docutils literal notranslate">{{ godot_version }}</code>. Some documentation pages may
still state outdated information. This banner will tell you if you're reading one of such pages.
</p>
<p>
{% if meta and meta.get('article_outdated') == 'True' %}
The contents of this page can be <strong>outdated</strong>. If you know how to improve this page or you can confirm
that it's up to date, feel free to <a href="https://github.com/godotengine/godot-docs">open a pull request</a>.
{% else %}
The contents of this page are <strong>up to date</strong>. If you can still find outdated information, please
<a href="https://github.com/godotengine/godot-docs">open an issue</a>.
{% endif %}
</p>
</div>
{% endif %}
</div>
{% endif %}
{% block body %}{% endblock %}
</div>
{%- if self.comments()|trim %}
<div class="articleComments">
{%- block comments %}{% endblock %}
</div>
{%- endif%}
</div>
{%- endblock %}