|
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://file.emea.redhat.com/aireilly/add-footer-transition/_stylesheets/docs.css" rel="stylesheet" media="screen"/> |
| 23 | + <link href="https://docs.openshift.com/container-platform/4.1/_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 -->
|
|
718 | 718 | })
|
719 | 719 | </script>
|
720 | 720 |
|
| 721 | + <!--adjust sidebar and toc when footer is displayed --> |
| 722 | + <script type="text/javascript"> |
| 723 | + sidebar = document.querySelector('.sidebar') |
| 724 | + toc = document.querySelector('#toc') |
| 725 | + main = document.querySelector('.main') |
| 726 | + okd_footer = document.querySelector('.footer-origin-docs') |
| 727 | + |
| 728 | + //handle short pages |
| 729 | + if (window.innerHeight === document.documentElement.scrollHeight) { |
| 730 | + //sidebar |
| 731 | + if (sidebar !== null && okd_footer == null) { |
| 732 | + sidebar.style.marginBottom = "38px"; |
| 733 | + main.style.marginBottom = "35px"; |
| 734 | + }; |
| 735 | + //okd sidebar |
| 736 | + if(sidebar !== null && okd_footer !== null) { |
| 737 | + sidebar.style.marginBottom = "176px"; |
| 738 | + main.style.marginBottom = "135px"; |
| 739 | + } |
| 740 | + }; |
| 741 | + |
| 742 | + //handle scrolling pages |
| 743 | + document.addEventListener('scroll', () => { |
| 744 | + //scroll to bottom |
| 745 | + if ($(window).width() >= 1008) { |
| 746 | + if(sidebar !== null) { |
| 747 | + //pages with multiple toc entries |
| 748 | + if(document.documentElement.scrollHeight === window.pageYOffset + window.innerHeight) { |
| 749 | + //sidebar |
| 750 | + if (sidebar !== null && okd_footer == null){ |
| 751 | + sidebar.style.marginBottom = "38px"; |
| 752 | + main.style.marginBottom = "35px"; |
| 753 | + }; |
| 754 | + //toc |
| 755 | + if (toc !== null && okd_footer == null){ |
| 756 | + toc.style.bottom = "35px"; |
| 757 | + }; |
| 758 | + //okd sidebar |
| 759 | + if(sidebar !== null && okd_footer !== null) { |
| 760 | + sidebar.style.marginBottom = "176px"; |
| 761 | + main.style.marginBottom = "135px"; |
| 762 | + }; |
| 763 | + //okd toc |
| 764 | + if (toc !== null && okd_footer !== null){ |
| 765 | + toc.style.bottom = "175px"; |
| 766 | + }; |
| 767 | + }; |
| 768 | + if(document.documentElement.scrollHeight != window.pageYOffset + window.innerHeight) { |
| 769 | + sidebar.style.marginBottom = "0px"; |
| 770 | + if (toc !== null) { |
| 771 | + toc.style.bottom = "0px"; |
| 772 | + } |
| 773 | + } |
| 774 | + } |
| 775 | + } |
| 776 | + }) |
| 777 | + </script> |
| 778 | + |
721 | 779 | <!-- adjust alerts on mobile -->
|
722 | 780 | <script type="text/javascript">
|
723 | 781 | alert = document.querySelector('#support-alert')
|
|
746 | 804 | })
|
747 | 805 | </script>
|
748 | 806 |
|
749 |
| - <!-- hide footer after 3 seconds --> |
750 |
| - <script type="text/javascript"> |
751 |
| - const hideFooter = () => { |
752 |
| - document.querySelector('footer#rh').style.display = "none"; |
753 |
| - }; |
754 |
| - |
755 |
| - window.addEventListener('scroll', function() { |
756 |
| - if (window.innerHeight + window.scrollY >= document.body.offsetHeight) { |
757 |
| - setTimeout(hideFooter, 3000); |
758 |
| - } else { |
759 |
| - document.querySelector('footer#rh').style.display = "block"; |
760 |
| - } |
761 |
| - }) |
762 |
| - </script> |
763 | 807 | </body>
|
764 | 808 | </html>
|
0 commit comments