Skip to content

Commit a9f07bf

Browse files
committed
Add footer transition
1 parent a20ad4a commit a9f07bf

File tree

2 files changed

+14
-0
lines changed

2 files changed

+14
-0
lines changed

_stylesheets/docs.css

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -527,6 +527,8 @@ h2:hover>a.anchor, h2>a.anchor:hover, h3:hover>a.anchor, h3>a.anchor:hover, h4:h
527527
background-color: #000;
528528
padding: 0px 0;
529529
z-index: 5;
530+
transition: transform 0.5s ease-out;
531+
transform: translateY(0);
530532
}
531533

532534
.close-btn-sm {

_templates/_page_openshift.html.erb

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -803,5 +803,17 @@
803803
})
804804
</script>
805805

806+
<!-- hide footer after 3 seconds -->
807+
<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+
}
817+
</script>
806818
</body>
807819
</html>

0 commit comments

Comments
 (0)