Skip to content

Commit

Permalink
Backport/2.8/theme (#62611)
Browse files Browse the repository at this point in the history
* cherrypick #58832
* fix width (#61619)

(cherry picked from commit 1d40d2b)

* Minify theme (#61734)

* moved most ansible edits out of theme.css
* remove unnecessary edit to theme.css
* replace with upstream minified theme.css for 0.4.3

(cherry picked from commit de826b4)

* Minify ansible (#61792)

* make all comments special to survive minify
* minified css

(cherry picked from commit 7efaad7)
  • Loading branch information
samccann authored and acozine committed Sep 19, 2019
1 parent 4fc2674 commit 912c493
Show file tree
Hide file tree
Showing 21 changed files with 254 additions and 2,029 deletions.
29 changes: 29 additions & 0 deletions docs/docsite/_static/ansible.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

25 changes: 25 additions & 0 deletions docs/docsite/_themes/sphinx_rtd_theme/ansible_extrabody.html
@@ -0,0 +1,25 @@
<!---- extra body elements for Ansible beyond RTD Sphinx Theme --->
<!-- Google Tag Manager -->
<noscript><iframe src="//www.googletagmanager.com/ns.html?id=GTM-PSB293" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='//www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-PSB293');</script>
<!-- End Google Tag Manager -->

<div class="DocSite-globalNav ansibleNav">
<ul>
<li><a href="https://www.ansible.com/ansiblefest" target="_blank">AnsibleFest</a></li>
<li><a href="https://www.ansible.com/tower" target="_blank">Products</a></li>
<li><a href="https://www.ansible.com/community" target="_blank">Community</a></li>
<li><a href="https://www.ansible.com/webinars-training" target="_blank">Webinars & Training</a></li>
<li><a href="https://www.ansible.com/blog" target="_blank">Blog</a></li>
</ul>
</div>

<a class="DocSite-nav" href="/" style="padding-bottom: 30px;">

<img class="DocSiteNav-logo"
src="{{ pathto('_static/', 1) }}images/logo_invert.png"
alt="Ansible Logo">
<div class="DocSiteNav-title">
Documentation
</div>
</a>
18 changes: 18 additions & 0 deletions docs/docsite/_themes/sphinx_rtd_theme/ansible_extrafooter.html
@@ -0,0 +1,18 @@
<!-- extra footer elements for Ansible beyond RTD Sphinx Theme --->
<!-- begin analytics -->
<script type="text/javascript">
var _hsq = _hsq || [];
_hsq.push(["setContentType", "standard-page"]);
(function(d,s,i,r) {
if (d.getElementById(i)){return;}
var n = d.createElement(s),e = document.getElementsByTagName(s)[0];
n.id=i;n.src = '//js.hs-analytics.net/analytics/'+(Math.ceil(new Date()/r)*r)+'/330046.js';
e.parentNode.insertBefore(n, e);
})(document, "script", "hs-analytics",300000);
</script>
<!-- end analytics -->
<script type="text/javascript">
if (("undefined" !== typeof _satellite) && ("function" === typeof _satellite.pageBottom)) {
_satellite.pageBottom();
}
</script>
12 changes: 12 additions & 0 deletions docs/docsite/_themes/sphinx_rtd_theme/ansible_extrahead.html
@@ -0,0 +1,12 @@
<!---- extra head elements for Ansible beyond RTD Sphinx Theme --->
<script type="text/javascript" src="//www.redhat.com/dtm.js"></script>
<meta class="swiftype" name="published_at" data-type="date" content="2017-12-13" />
<meta class="swiftype" name="version" data-type="string" content="3.2.2">

<!-- Google Tag Manager Data Layer -->
<script>
dataLayer = [];
</script>
<!-- End Google Tag Manager Data Layer -->

<script src="//cdnjs.cloudflare.com/ajax/libs/modernizr/2.6.2/modernizr.min.js"></script>
9 changes: 9 additions & 0 deletions docs/docsite/_themes/sphinx_rtd_theme/ansible_extranav.html
@@ -0,0 +1,9 @@
<!-- extra nav elements for Ansible beyond RTD Sphinx Theme --->
<!-- changeable widget links to tower - do not change as image controlled by Ansible-->
<div id="sideBanner">
<br/>
<a href="https://www.ansible.com/docs-left?utm_source=docs">
<img style="border-width:0px;" src="https://cdn2.hubspot.net/hubfs/330046/docs-graphics/ASB-docs-left-rail.png" />
</a>
<br/><br/><br/>
</div>
2 changes: 1 addition & 1 deletion docs/docsite/_themes/sphinx_rtd_theme/breadcrumbs.html
Expand Up @@ -43,8 +43,8 @@
<!-- User defined GitHub URL -->
<a href="{{ meta['github_url'] }}" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% else %}
<!-- Ansible-specific additions for modules etc -->
{% if pagename.endswith('_module') %}

<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ github_module_version }}{{ meta.get('source', '') }}?description=%23%23%23%23%23%20SUMMARY%0A%3C!---%20Your%20description%20here%20--%3E%0A%0A%0A%23%23%23%23%23%20ISSUE%20TYPE%0A-%20Docs%20Pull%20Request%0A%0A%2Blabel:%20docsite_pr" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
{% elif (not 'list_of' in pagename) and (not 'category' in pagename) %}
<a href="https://{{ github_host|default("github.com") }}/{{ github_user }}/{{ github_repo }}/{{ theme_vcs_pageview_mode|default("blob") }}/{{ github_version }}{{ conf_py_path }}{{ pagename }}{{ suffix }}?description=%23%23%23%23%23%20SUMMARY%0A%3C!---%20Your%20description%20here%20--%3E%0A%0A%0A%23%23%23%23%23%20ISSUE%20TYPE%0A-%20Docs%20Pull%20Request%0A%0A%2Blabel:%20docsite_pr" class="fa fa-github"> {{ _('Edit on GitHub') }}</a>
Expand Down
42 changes: 38 additions & 4 deletions docs/docsite/_themes/sphinx_rtd_theme/footer.html
Expand Up @@ -12,6 +12,7 @@

<hr/>

{# Ansible search with Swift - do not remove #}
<script type="text/javascript">
(function(w,d,t,u,n,s,e){w['SwiftypeObject']=n;w[n]=w[n]||function(){
(w[n].q=w[n].q||[]).push(arguments);};s=d.createElement(t);
Expand All @@ -21,8 +22,41 @@
_st('install','yABGvz2N8PwcwBxyfzUc','2.0.0');
</script>

<p>
{%- if last_updated %}{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}<br/>{% endif %}
Copyright © 2019 Red Hat, Inc. <br/>
</p>
<div role="contentinfo">
<p>
{%- if show_copyright %}
{%- if hasdoc('copyright') %}
{% trans path=pathto('copyright'), copyright=copyright|e %}&copy; <a href="{{ path }}">Copyright</a> {{ copyright }}{% endtrans %}
{%- else %}
{% trans copyright=copyright|e %}&copy; Copyright {{ copyright }}{% endtrans %}
{%- endif %}
{%- endif %}

{%- if build_id and build_url %}
{% trans build_url=build_url, build_id=build_id %}
<span class="build">
Build
<a href="{{ build_url }}">{{ build_id }}</a>.
</span>
{% endtrans %}
{%- elif commit %}
{% trans commit=commit %}
<span class="commit">
Revision <code>{{ commit }}</code>.
</span>
{% endtrans %}
{%- elif last_updated %}
<span class="lastupdated">
{% trans last_updated=last_updated|e %}Last updated on {{ last_updated }}.{% endtrans %}
</span>
{%- endif %}

</p>
</div>

{%- if show_sphinx %}
{% trans %}Built with <a href="http://sphinx-doc.org/">Sphinx</a> using a <a href="https://github.com/rtfd/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>{% endtrans %}.
{%- endif %}

{%- block extrafooter %} {% endblock %}
</footer>

0 comments on commit 912c493

Please sign in to comment.