Add Fest banner (#71360)
Adds Fest banner, with fixes; updates existing banners, adds links.
This commit is contained in:
parent
2675768e3d
commit
9be8d723da
1 changed files with 8 additions and 15 deletions
|
@ -6,11 +6,7 @@
|
||||||
// Create a banner if we're not on the official docs site
|
// Create a banner if we're not on the official docs site
|
||||||
if (location.host == "docs.testing.ansible.com") {
|
if (location.host == "docs.testing.ansible.com") {
|
||||||
document.write('<div id="testing_banner_id" class="admonition important">');
|
document.write('<div id="testing_banner_id" class="admonition important">');
|
||||||
para = document.createElement('p');
|
document.write('<p>This is the testing site for Ansible Documentation. Unless you are reviewing pre-production changes, please visit the <a href="https://docs.ansible.com/ansible/latest/">official documentation website</a>.</p> <p></p>');
|
||||||
banner_text=document.createTextNode("This is a testing site. For the official docs go to https://docs.ansible.com/");
|
|
||||||
para.appendChild(banner_text);
|
|
||||||
element = document.getElementById('testing_banner_id');
|
|
||||||
element.appendChild(para);
|
|
||||||
document.write('</div>');
|
document.write('</div>');
|
||||||
}
|
}
|
||||||
{% if (not READTHEDOCS) and (available_versions is defined) %}
|
{% if (not READTHEDOCS) and (available_versions is defined) %}
|
||||||
|
@ -18,21 +14,18 @@
|
||||||
current_url_path = window.location.pathname;
|
current_url_path = window.location.pathname;
|
||||||
if (startsWith(current_url_path, "/ansible/latest/") || startsWith(current_url_path, "/ansible/{{ latest_version }}/")) {
|
if (startsWith(current_url_path, "/ansible/latest/") || startsWith(current_url_path, "/ansible/{{ latest_version }}/")) {
|
||||||
// no banner for latest release
|
// no banner for latest release
|
||||||
|
// temp banner to advertise AnsibleFest
|
||||||
|
document.write('<div id="banner_id" class="admonition important">');
|
||||||
|
document.write('<p><a href="https://www.ansible.com/ansiblefest">AnsibleFest</a> is going virtual with two days of expert speakers, live demos and hands-on labs Oct 13-14!</p>');
|
||||||
|
document.write('</div>');
|
||||||
|
|
||||||
} else if (startsWith(current_url_path, "/ansible/devel/")) {
|
} else if (startsWith(current_url_path, "/ansible/devel/")) {
|
||||||
document.write('<div id="banner_id" class="admonition caution">');
|
document.write('<div id="banner_id" class="admonition caution">');
|
||||||
para = document.createElement('p');
|
document.write('<p>You are reading the *devel* 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>');
|
||||||
banner_text=document.createTextNode("You are reading the *devel* 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.");
|
|
||||||
para.appendChild(banner_text);
|
|
||||||
element = document.getElementById('banner_id');
|
|
||||||
element.appendChild(para);
|
|
||||||
document.write('</div>');
|
document.write('</div>');
|
||||||
} else {
|
} else {
|
||||||
document.write('<div id="banner_id" class="admonition caution">');
|
document.write('<div id="banner_id" class="admonition caution">');
|
||||||
para = document.createElement('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>');
|
||||||
banner_text=document.createTextNode("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.");
|
|
||||||
para.appendChild(banner_text);
|
|
||||||
element = document.getElementById('banner_id');
|
|
||||||
element.appendChild(para);
|
|
||||||
document.write('</div>');
|
document.write('</div>');
|
||||||
}
|
}
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
Loading…
Reference in a new issue