gives each banner a unique div ID (#74907)
Co-authored-by: Alicia Cozine <acozine@users.noreply.github.com>
This commit is contained in:
parent
4f3ee4624e
commit
33924d7e8d
1 changed files with 9 additions and 9 deletions
|
@ -14,40 +14,40 @@
|
||||||
current_url_path = window.location.pathname;
|
current_url_path = window.location.pathname;
|
||||||
|
|
||||||
if (startsWith(current_url_path, "/ansible-core/")) {
|
if (startsWith(current_url_path, "/ansible-core/")) {
|
||||||
document.write('<div id="banner_id" class="admonition caution">');
|
document.write('<div id="core_banner_id" class="admonition caution">');
|
||||||
document.write('<p>You are reading documentation for Ansible Core, which contains no plugins except for those in ansible.builtin. For documentation of the Ansible package, go to <a href="https://docs.ansible.com/ansible/latest">the latest documentation</a>.</p>');
|
document.write('<p>You are reading documentation for Ansible Core, which contains no plugins except for those in ansible.builtin. For documentation of the Ansible package, go to <a href="https://docs.ansible.com/ansible/latest">the latest documentation</a>.</p>');
|
||||||
document.write('</div>');
|
document.write('</div>');
|
||||||
|
|
||||||
} else if (startsWith(current_url_path, "/ansible/latest/") || startsWith(current_url_path, "/ansible/{{ latest_version }}/")) {
|
} else if (startsWith(current_url_path, "/ansible/latest/") || startsWith(current_url_path, "/ansible/{{ latest_version }}/")) {
|
||||||
/* temp banner to advertise GalaxyNG survey */
|
/* temp banner to advertise GalaxyNG survey */
|
||||||
document.write('<div id="banner_id" class="admonition important">');
|
document.write('<div id="latest_survey_banner_id" class="admonition important">');
|
||||||
document.write('<br><p>Please take our <a href="https://www.surveymonkey.co.uk/r/2VWVJY3">survey</a> to help us improve support for collections and roles in GalaxyNG.</p><br>');
|
document.write('<br><p>Please take our <a href="https://www.surveymonkey.co.uk/r/2VWVJY3">survey</a> to help us improve support for collections and roles in GalaxyNG.</p><br>');
|
||||||
document.write('</div>');
|
document.write('</div>');
|
||||||
|
|
||||||
document.write('<div id="banner_id" class="admonition caution">');
|
document.write('<div id="latest_banner_id" class="admonition caution">');
|
||||||
document.write('<p>You are reading the latest community version of the Ansible documentation. Red Hat subscribers, select <b>2.9</b> in the version selection to the left for the most recent Red Hat release.</p>');
|
document.write('<p>You are reading the latest community version of the Ansible documentation. Red Hat subscribers, select <b>2.9</b> in the version selection to the left for the most recent Red Hat release.</p>');
|
||||||
document.write('</div>');
|
document.write('</div>');
|
||||||
|
|
||||||
} else if (startsWith(current_url_path, "/ansible/2.9/")) {
|
} else if (startsWith(current_url_path, "/ansible/2.9/")) {
|
||||||
document.write('<div id="banner_id" class="admonition caution">');
|
document.write('<div id="2dot9_banner_id" class="admonition caution">');
|
||||||
document.write('<p>You are reading the latest Red Hat released version of the Ansible documentation. Community users can use this, or select any version in version selection to the left, including <b>latest</b> for the most recent community version.</p>');
|
document.write('<p>You are reading the latest Red Hat released version of the Ansible documentation. Community users can use this version, or select <b>latest</b> from the version selector to the left for the most recent community version.</p>');
|
||||||
document.write('</div>');
|
document.write('</div>');
|
||||||
} else if (startsWith(current_url_path, "/ansible/devel/")) {
|
} else if (startsWith(current_url_path, "/ansible/devel/")) {
|
||||||
/* temp banner to advertise GalaxyNG survey */
|
/* temp banner to advertise GalaxyNG survey */
|
||||||
document.write('<div id="banner_id" class="admonition important">');
|
document.write('<div id="devel_survey_banner_id" class="admonition important">');
|
||||||
document.write('<br><p>Please take our <a href="https://www.surveymonkey.co.uk/r/2VWVJY3">survey</a> to help us improve support for collections and roles in GalaxyNG.</p><br>');
|
document.write('<br><p>Please take our <a href="https://www.surveymonkey.co.uk/r/2VWVJY3">survey</a> to help us improve support for collections and roles in GalaxyNG.</p><br>');
|
||||||
document.write('</div>');
|
document.write('</div>');
|
||||||
/* temp banner to advertise survey
|
/* temp banner to advertise survey
|
||||||
document.write('<div id="banner_id" class="admonition important">');
|
document.write('<div id="devel_survey_banner_id" class="admonition important">');
|
||||||
document.write('<br><p>Please take our <a href="https://www.surveymonkey.co.uk/r/B9V3CDY">Docs survey</a> before December 31 to help us improve Ansible documentation.</p><br>');
|
document.write('<br><p>Please take our <a href="https://www.surveymonkey.co.uk/r/B9V3CDY">Docs survey</a> before December 31 to help us improve Ansible documentation.</p><br>');
|
||||||
document.write('</div>'); */
|
document.write('</div>'); */
|
||||||
|
|
||||||
document.write('<div id="banner_id" class="admonition caution">');
|
document.write('<div id="devel_banner_id" class="admonition caution">');
|
||||||
document.write('<p>You are reading the <b>devel</b> version of the Ansible documentation - this version is not guaranteed stable. Use the version selection to the left if you want the latest stable released version.</p>');
|
document.write('<p>You are reading the <b>devel</b> version of the Ansible documentation - this version is not guaranteed stable. Use the version selection to the left if you want the latest stable released version.</p>');
|
||||||
document.write('</div>');
|
document.write('</div>');
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
document.write('<div id="banner_id" class="admonition caution">');
|
document.write('<div id="EOL_banner_id" class="admonition caution">');
|
||||||
document.write('<p>You are reading an older version of the Ansible documentation. Use the version selection to the left if you want the latest stable released version.</p>');
|
document.write('<p>You are reading an older version of the Ansible documentation. Use the version selection to the left if you want the latest stable released version.</p>');
|
||||||
document.write('</div>');
|
document.write('</div>');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue