versions.html 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. {# Add rst-badge after rst-versions for small badge style. #}
  2. {% set display_version = version -%}
  3. {% set listed_languages = ({"en":"#", "de":"#", "es":"#", "fr":"#"}).items() -%}
  4. {% set listed_versions = ({"stable":"#", "latest":"#"}).items() -%}
  5. {% if READTHEDOCS and current_version %}
  6. {% set display_version = current_version -%}
  7. {% endif %}
  8. {% if READTHEDOCS and versions %}
  9. {% set listed_versions = versions -%}
  10. {% endif %}
  11. <div class="rst-versions" data-toggle="rst-versions" role="note" aria-label="versions">
  12. <span class="rst-current-version" data-toggle="rst-current-version">
  13. <span class="fa fa-book"> Read the Docs</span>
  14. v: {{ display_version }}{% if display_version != godot_version %} ({{ godot_version }}){% endif %}
  15. <span class="fa fa-caret-down"></span>
  16. </span>
  17. <div class="rst-other-versions">
  18. {#
  19. The contents of this element will be replaced in production.
  20. But we can still have some mock data for testing.
  21. #}
  22. <dl>
  23. <dt>{{ _('Languages') }}</dt>
  24. {% for slug, url in listed_languages %}
  25. <dd><a href="{{ url }}">{{ slug }}</a></dd>
  26. {% endfor %}
  27. </dl>
  28. <dl>
  29. <dt>{{ _('Versions') }}</dt>
  30. {% for slug, url in listed_versions %}
  31. <dd><a href="{{ url }}">{{ slug }}</a></dd>
  32. {% endfor %}
  33. </dl>
  34. <dl>
  35. {# Translators: The phrase "Read the Docs" is not translated #}
  36. <dt>{{ _('On Read the Docs') }}</dt>
  37. <dd>
  38. <a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}">{{ _('Project Home') }}</a>
  39. </dd>
  40. <dd>
  41. <a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/builds/">{{ _('Builds') }}</a>
  42. </dd>
  43. <dd>
  44. <a href="//{{ PRODUCTION_DOMAIN }}/projects/{{ slug }}/downloads/">{{ _('Downloads') }}</a>
  45. </dd>
  46. </dl>
  47. <hr>
  48. <small>
  49. <span>Hosted by <a href="https://readthedocs.org">Read the Docs</a></span>
  50. <span> · </span>
  51. <a href="https://docs.readthedocs.io/page/privacy-policy.html">Privacy Policy</a>
  52. </small>
  53. {##}
  54. </div>
  55. </div>