|
20 | 20 | <link href="https://assets.openshift.net/content/subdomain/touch-icon-precomposed.png" rel="apple-touch-icon-precomposed" type="image/png"/>
|
21 | 21 | <link href="https://assets.openshift.net/content/subdomain/favicon32x32.png" rel="shortcut icon" type="text/css"/>
|
22 | 22 | <link href="https://assets.openshift.net/content/osh-nav-footer.css" rel="stylesheet" type="text/css" media="screen"/>
|
23 |
| - <link href="https://docs.openshift.com/container-platform/4.1/_stylesheets/docs.css" rel="stylesheet" media="screen"/> |
| 23 | + <link href="https://file.emea.redhat.com/aireilly/add-footer-transition/_stylesheets/docs.css" rel="stylesheet" media="screen"/> |
24 | 24 | <link href="https://docs.openshift.com/container-platform/4.1/_stylesheets/print.css" rel="stylesheet" type="text/css" media="print"/>
|
25 | 25 | <!--[if IE]><link rel="shortcut icon" href="https://assets.openshift.net/content/subdomain/favicon.ico"><![endif]-->
|
26 | 26 | <!-- or, set /favicon.ico for IE10 win -->
|
|
717 | 717 | })
|
718 | 718 | </script>
|
719 | 719 |
|
720 |
| - <!--adjust sidebar and toc when footer is displayed --> |
721 |
| - <script type="text/javascript"> |
722 |
| - sidebar = document.querySelector('.sidebar') |
723 |
| - toc = document.querySelector('#toc') |
724 |
| - main = document.querySelector('.main') |
725 |
| - okd_footer = document.querySelector('.footer-origin-docs') |
726 |
| - |
727 |
| - //handle short pages |
728 |
| - if (window.innerHeight === document.documentElement.scrollHeight) { |
729 |
| - //sidebar |
730 |
| - if (sidebar !== null && okd_footer == null) { |
731 |
| - sidebar.style.marginBottom = "38px"; |
732 |
| - main.style.marginBottom = "35px"; |
733 |
| - }; |
734 |
| - //okd sidebar |
735 |
| - if(sidebar !== null && okd_footer !== null) { |
736 |
| - sidebar.style.marginBottom = "176px"; |
737 |
| - main.style.marginBottom = "135px"; |
738 |
| - } |
739 |
| - }; |
740 |
| - |
741 |
| - //handle scrolling pages |
742 |
| - document.addEventListener('scroll', () => { |
743 |
| - //scroll to bottom |
744 |
| - if ($(window).width() >= 1008) { |
745 |
| - if(sidebar !== null) { |
746 |
| - //pages with multiple toc entries |
747 |
| - if(document.documentElement.scrollHeight === window.pageYOffset + window.innerHeight) { |
748 |
| - //sidebar |
749 |
| - if (sidebar !== null && okd_footer == null){ |
750 |
| - sidebar.style.marginBottom = "38px"; |
751 |
| - main.style.marginBottom = "35px"; |
752 |
| - }; |
753 |
| - //toc |
754 |
| - if (toc !== null && okd_footer == null){ |
755 |
| - toc.style.bottom = "35px"; |
756 |
| - }; |
757 |
| - //okd sidebar |
758 |
| - if(sidebar !== null && okd_footer !== null) { |
759 |
| - sidebar.style.marginBottom = "176px"; |
760 |
| - main.style.marginBottom = "135px"; |
761 |
| - }; |
762 |
| - //okd toc |
763 |
| - if (toc !== null && okd_footer !== null){ |
764 |
| - toc.style.bottom = "175px"; |
765 |
| - }; |
766 |
| - }; |
767 |
| - if(document.documentElement.scrollHeight != window.pageYOffset + window.innerHeight) { |
768 |
| - sidebar.style.marginBottom = "0px"; |
769 |
| - if (toc !== null) { |
770 |
| - toc.style.bottom = "0px"; |
771 |
| - } |
772 |
| - } |
773 |
| - } |
774 |
| - } |
775 |
| - }) |
776 |
| - </script> |
777 |
| - |
778 | 720 | <!-- adjust alerts on mobile -->
|
779 | 721 | <script type="text/javascript">
|
780 | 722 | alert = document.querySelector('#support-alert')
|
|
805 | 747 |
|
806 | 748 | <!-- hide footer after 3 seconds -->
|
807 | 749 | <script type="text/javascript">
|
808 |
| - const bottomVisible = () => document.documentElement.clientHeight + window.scrollY >= (document.documentElement.scrollHeight || document.documentElement.clientHeight); |
809 |
| - |
810 |
| - if (bottomVisible()) { |
811 |
| - setTimeout(() => { |
812 |
| - document.querySelector('footer#rh').classList.add('hide-footer'); |
813 |
| - }, 3000); |
814 |
| - } else { |
815 |
| - document.querySelector('footer#rh').classList.remove('hide-footer'); |
816 |
| - } |
| 750 | + const hideFooter = () => { |
| 751 | + document.querySelector('footer#rh').style.display = "none"; |
| 752 | + }; |
| 753 | + |
| 754 | + window.addEventListener('scroll', function() { |
| 755 | + if (window.innerHeight + window.scrollY >= document.body.offsetHeight) { |
| 756 | + setTimeout(hideFooter, 3000); |
| 757 | + } else { |
| 758 | + document.querySelector('footer#rh').style.display = "block"; |
| 759 | + } |
| 760 | + }) |
817 | 761 | </script>
|
818 | 762 | </body>
|
819 | 763 | </html>
|
0 commit comments