enable/disable #eol-warning based on "is_release_eol" context variable.
this allows us to generate a more static web page. and pave the road to
a releases.json-free doc build process.
Signed-off-by: Kefu Chai <kchai@redhat.com>
if (branch === "master") {
$("#dev-warning").show();
} else if (data && data.releases && branch in data.releases) {
- var eol = ("actual_eol" in data.releases[branch]);
- if (eol) {
- $("#eol-warning").show();
- }
+ return;
} else {
$("#dev-warning").show();
}
<p class="last">This document is for a development version of Ceph.</p>
</div>
-<div id="eol-warning" class="admonition warning" style="display:none;">
+{%- if is_release_eol %}
+<div id="eol-warning" class="admonition warning">
<p class="first admonition-title">Warning</p>
<p class="last">This document is for an unsupported version of Ceph.</p>
</div>
+{%- endif %}
{%- if not is_release_eol %}
<div id="docubetter" align="right" style="padding: 15px; font-weight: bold;">