1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

use shared headroom

This commit is contained in:
Luke Pulverenti 2016-08-15 22:40:29 -04:00
parent e5b6336256
commit a11c82ac9d
12 changed files with 177 additions and 156 deletions

View file

@ -5,16 +5,9 @@
right: 0;
z-index: 1;
bottom: 0;
}
.appfooter-headroom {
transition: transform 180ms linear;
}
.appfooter--pinned {
transform: none;
}
.appfooter--unpinned {
.appfooter.headroom--unpinned {
transform: translateY(100%);
}

View file

@ -13,27 +13,10 @@
function initHeadRoom(instance, elem) {
require(["headroom"], function () {
require(["headroom-window"], function (headroom) {
// construct an instance of Headroom, passing the element
var headroom = new Headroom(elem, {
// or scroll tolerance per direction
tolerance: {
down: 20,
up: 0
},
classes: {
pinned: 'appfooter--pinned',
unpinned: 'appfooter--unpinned',
top: 'appfooter--top',
notTop: 'appfooter--not-top',
initial: 'appfooter-headroom'
}
});
// initialise
headroom.init();
instance.headroom = headroom;
self.headroom = headroom;
headroom.add(elem);
});
}
@ -62,10 +45,11 @@
var self = this;
if (self.headroom) {
self.headroom.destroy();
self.headroom.remove(self.element);
self.headroom = null;
}
self.Element = null;
self.element = null;
};
return dockedTabs;