Auto-hide notifications bar on small screens.

This commit is contained in:
David Russell 2017-11-15 09:27:56 +07:00
parent dd29f06f33
commit 816660e736
2 changed files with 17 additions and 5 deletions

View File

@ -1,5 +1,11 @@
@(ssm: com.gitpitch.models.SlideshowModel)
<style>
#title-footer.footer-visible {
display: inline;
}
#title-footer.footer-hidden {
display: none;
}
#title-footer #notification {
font-family: 'Roboto', sans-serif;
}

View File

@ -1,13 +1,19 @@
@(ssm: com.gitpitch.models.SlideshowModel)
<script>
function pushNotification(msg, fade) {
var footer = document.getElementById('title-footer')
var notification = document.getElementById('notification')
if(fade) {
notification.className = "footer-fade";
notification.innerHTML = msg;
if(window.innerWidth < 700) {
footer.className = "footer-hidden";
} else {
notification.className = "footer-hard";
notification.innerHTML = msg;
footer.className = "footer-visible";
if(fade) {
notification.className = "footer-fade";
notification.innerHTML = msg;
} else {
notification.className = "footer-hard";
notification.innerHTML = msg;
}
}
};