mirror of
https://github.com/gitpitch/gitpitch.git
synced 2024-04-18 07:30:55 +08:00
Auto-hide notifications bar on small screens.
This commit is contained in:
parent
dd29f06f33
commit
816660e736
|
@ -1,5 +1,11 @@
|
||||||
@(ssm: com.gitpitch.models.SlideshowModel)
|
@(ssm: com.gitpitch.models.SlideshowModel)
|
||||||
<style>
|
<style>
|
||||||
|
#title-footer.footer-visible {
|
||||||
|
display: inline;
|
||||||
|
}
|
||||||
|
#title-footer.footer-hidden {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
#title-footer #notification {
|
#title-footer #notification {
|
||||||
font-family: 'Roboto', sans-serif;
|
font-family: 'Roboto', sans-serif;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
@(ssm: com.gitpitch.models.SlideshowModel)
|
@(ssm: com.gitpitch.models.SlideshowModel)
|
||||||
<script>
|
<script>
|
||||||
function pushNotification(msg, fade) {
|
function pushNotification(msg, fade) {
|
||||||
|
var footer = document.getElementById('title-footer')
|
||||||
var notification = document.getElementById('notification')
|
var notification = document.getElementById('notification')
|
||||||
|
if(window.innerWidth < 700) {
|
||||||
|
footer.className = "footer-hidden";
|
||||||
|
} else {
|
||||||
|
footer.className = "footer-visible";
|
||||||
if(fade) {
|
if(fade) {
|
||||||
notification.className = "footer-fade";
|
notification.className = "footer-fade";
|
||||||
notification.innerHTML = msg;
|
notification.innerHTML = msg;
|
||||||
|
@ -9,6 +14,7 @@
|
||||||
notification.className = "footer-hard";
|
notification.className = "footer-hard";
|
||||||
notification.innerHTML = msg;
|
notification.innerHTML = msg;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
function pushHelpNotification() {
|
function pushHelpNotification() {
|
||||||
|
|
Loading…
Reference in New Issue
Block a user