mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-18 03:18:19 -07:00
stub out docked tabs
This commit is contained in:
parent
40e40dac81
commit
fe9b016e92
24
dashboard-ui/components/dockedtabs/dockedtabs.css
Normal file
24
dashboard-ui/components/dockedtabs/dockedtabs.css
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
.dockedtabs {
|
||||||
|
height: 60px;
|
||||||
|
background: #212121;
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
z-index: 99999;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dockedtabs-bottom {
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dockedtabs-headroom {
|
||||||
|
transition: transform 180ms linear;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dockedtabs--pinned {
|
||||||
|
transform: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dockedtabs--unpinned {
|
||||||
|
transform: translateY(100%);
|
||||||
|
}
|
67
dashboard-ui/components/dockedtabs/dockedtabs.js
Normal file
67
dashboard-ui/components/dockedtabs/dockedtabs.js
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
define(['css!./dockedtabs'], function () {
|
||||||
|
|
||||||
|
function render(options) {
|
||||||
|
|
||||||
|
var elem = document.createElement('div');
|
||||||
|
|
||||||
|
elem.classList.add('dockedtabs');
|
||||||
|
elem.classList.add('dockedtabs-bottom');
|
||||||
|
|
||||||
|
// tabs:
|
||||||
|
// home
|
||||||
|
// favorites
|
||||||
|
// live tv
|
||||||
|
// now playing
|
||||||
|
|
||||||
|
document.body.appendChild(elem);
|
||||||
|
|
||||||
|
return elem;
|
||||||
|
}
|
||||||
|
|
||||||
|
function initHeadRoom(instance, elem) {
|
||||||
|
|
||||||
|
require(["headroom"], function () {
|
||||||
|
|
||||||
|
// 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: 'dockedtabs--pinned',
|
||||||
|
unpinned: 'dockedtabs--unpinned',
|
||||||
|
top: 'dockedtabs--top',
|
||||||
|
notTop: 'dockedtabs--not-top',
|
||||||
|
initial: 'dockedtabs-headroom'
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// initialise
|
||||||
|
headroom.init();
|
||||||
|
|
||||||
|
instance.headroom = headroom;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function dockedTabs(options) {
|
||||||
|
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
self.element = render(options);
|
||||||
|
|
||||||
|
initHeadRoom(self, self.element);
|
||||||
|
}
|
||||||
|
|
||||||
|
dockedTabs.prototype.destroy = function() {
|
||||||
|
var self = this;
|
||||||
|
|
||||||
|
if (self.headroom) {
|
||||||
|
self.headroom.destroy();
|
||||||
|
}
|
||||||
|
|
||||||
|
self.Element = null;
|
||||||
|
};
|
||||||
|
|
||||||
|
return dockedTabs;
|
||||||
|
});
|
@ -1107,4 +1107,7 @@
|
|||||||
|
|
||||||
setDrawerClass();
|
setDrawerClass();
|
||||||
|
|
||||||
|
//require(['dockedtabs'], function (dockedtabs) {
|
||||||
|
// new dockedtabs({});
|
||||||
|
//});
|
||||||
});
|
});
|
@ -1260,6 +1260,7 @@ var AppInfo = {};
|
|||||||
|
|
||||||
define("libjass", [bowerPath + "/libjass/libjass.min", "css!" + bowerPath + "/libjass/libjass"], returnFirstDependency);
|
define("libjass", [bowerPath + "/libjass/libjass.min", "css!" + bowerPath + "/libjass/libjass"], returnFirstDependency);
|
||||||
|
|
||||||
|
define("dockedtabs", ["components/dockedtabs/dockedtabs"], returnFirstDependency);
|
||||||
define("directorybrowser", ["components/directorybrowser/directorybrowser"], returnFirstDependency);
|
define("directorybrowser", ["components/directorybrowser/directorybrowser"], returnFirstDependency);
|
||||||
define("metadataEditor", [embyWebComponentsBowerPath + "/metadataeditor/metadataeditor"], returnFirstDependency);
|
define("metadataEditor", [embyWebComponentsBowerPath + "/metadataeditor/metadataeditor"], returnFirstDependency);
|
||||||
define("personEditor", [embyWebComponentsBowerPath + "/metadataeditor/personeditor"], returnFirstDependency);
|
define("personEditor", [embyWebComponentsBowerPath + "/metadataeditor/personeditor"], returnFirstDependency);
|
||||||
|
Loading…
Reference in New Issue
Block a user