mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
strip unused css from initial download
This commit is contained in:
parent
6a9accf68f
commit
2d014a82b4
10 changed files with 82 additions and 108 deletions
|
@ -39,6 +39,6 @@
|
|||
"commit": "cec8e49744a1e18b14a711eea77e201bb70de544"
|
||||
},
|
||||
"_source": "git://github.com/desandro/doc-ready.git",
|
||||
"_target": "~1.0.4",
|
||||
"_target": "1.0.x",
|
||||
"_originalSource": "doc-ready"
|
||||
}
|
|
@ -1,71 +0,0 @@
|
|||
#mediaElement {
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.nowPlayingText {
|
||||
display: inline-block;
|
||||
font-weight: normal;
|
||||
position: relative;
|
||||
top: -7px;
|
||||
margin: 0 0 0 3px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
text-align: left;
|
||||
font-size: 15px;
|
||||
max-width: 130px;
|
||||
}
|
||||
|
||||
.mediaButton.infoButton {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.mediaButton.active {
|
||||
color: #52B54B;
|
||||
}
|
||||
|
||||
@media (min-width: 500px) {
|
||||
.nowPlayingText {
|
||||
max-width: 180px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
.nowPlayingText {
|
||||
max-width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 800px) {
|
||||
.nowPlayingText {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.mediaButton img {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.currentTime {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
max-width: 110px;
|
||||
margin-right: 2em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.mediaPlayerAudioContainer {
|
||||
position: fixed;
|
||||
top: 40%;
|
||||
text-align: center;
|
||||
left: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.mediaPlayerAudioContainerInner {
|
||||
padding: 1em;
|
||||
background: #222;
|
||||
}
|
|
@ -1,4 +1,58 @@
|
|||
/* Now playing bar */
|
||||
.nowPlayingText {
|
||||
display: inline-block;
|
||||
font-weight: normal;
|
||||
position: relative;
|
||||
top: -7px;
|
||||
margin: 0 0 0 3px;
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
vertical-align: middle;
|
||||
text-align: left;
|
||||
font-size: 15px;
|
||||
max-width: 130px;
|
||||
}
|
||||
|
||||
.mediaButton.infoButton {
|
||||
width: 34px;
|
||||
height: 34px;
|
||||
}
|
||||
|
||||
.mediaButton.active {
|
||||
color: #52B54B;
|
||||
}
|
||||
|
||||
@media (min-width: 500px) {
|
||||
.nowPlayingText {
|
||||
max-width: 180px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 600px) {
|
||||
.nowPlayingText {
|
||||
max-width: 200px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (min-width: 800px) {
|
||||
.nowPlayingText {
|
||||
margin-right: 30px;
|
||||
}
|
||||
}
|
||||
|
||||
.mediaButton img {
|
||||
height: 24px;
|
||||
}
|
||||
|
||||
.currentTime {
|
||||
display: inline-block;
|
||||
vertical-align: middle;
|
||||
max-width: 110px;
|
||||
margin-right: 2em;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
/* Now playing bar */
|
||||
.nowPlayingBar {
|
||||
border-top: 1px solid #444;
|
||||
text-align: center;
|
||||
|
|
|
@ -664,19 +664,6 @@ div[data-role="controlgroup"] a.ui-btn-active {
|
|||
transform: translateY(-205%);
|
||||
}
|
||||
|
||||
.largePanel {
|
||||
width: 270px !important;
|
||||
}
|
||||
|
||||
/* Make panels larger */
|
||||
.largePanelModalOpen.ui-panel-dismiss-position-right {
|
||||
right: 270px !important;
|
||||
}
|
||||
|
||||
.largePanelModalOpen.ui-panel-dismiss-position-left {
|
||||
left: 270px !important;
|
||||
}
|
||||
|
||||
.checkboxContainer {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
@ -696,22 +683,6 @@ div[data-role="controlgroup"] a.ui-btn-active {
|
|||
padding: .7em .5em;
|
||||
}
|
||||
|
||||
@media all and (min-width: 340px) {
|
||||
|
||||
.largePanel {
|
||||
width: 300px !important;
|
||||
}
|
||||
|
||||
/* Make panels larger */
|
||||
.largePanelModalOpen.ui-panel-dismiss-position-right {
|
||||
right: 300px !important;
|
||||
}
|
||||
|
||||
.largePanelModalOpen.ui-panel-dismiss-position-left {
|
||||
left: 300px !important;
|
||||
}
|
||||
}
|
||||
|
||||
textarea {
|
||||
width: 100%;
|
||||
}
|
||||
|
|
|
@ -223,7 +223,7 @@
|
|||
$('.alphabetPicker', page).alphaValue(query.NameStartsWith);
|
||||
}
|
||||
|
||||
pageIdOn.on('pageinit', "channelItemsPage", function () {
|
||||
pageIdOn('pageinit', "channelItemsPage", function () {
|
||||
|
||||
var page = this;
|
||||
|
||||
|
|
|
@ -160,9 +160,9 @@
|
|||
var requiresControls = !MediaPlayer.canAutoPlayAudio();
|
||||
|
||||
if (requiresControls) {
|
||||
html += '<div class="mediaPlayerAudioContainer"><div class="mediaPlayerAudioContainerInner">';;
|
||||
html += '<div class="mediaPlayerAudioContainer" style="position: fixed;top: 40%;text-align: center;left: 0;right: 0;"><div class="mediaPlayerAudioContainerInner">';;
|
||||
} else {
|
||||
html += '<div class="mediaPlayerAudioContainer" style="display:none;"><div class="mediaPlayerAudioContainerInner">';;
|
||||
html += '<div class="mediaPlayerAudioContainer" style="display:none;padding: 1em;background: #222;"><div class="mediaPlayerAudioContainerInner">';;
|
||||
}
|
||||
|
||||
html += '<audio class="mediaPlayerAudio" crossorigin="anonymous" controls>';
|
||||
|
|
|
@ -674,6 +674,8 @@
|
|||
|
||||
function ensureVideoPlayerElements() {
|
||||
|
||||
Dashboard.importCss('css/mediaplayer-video.css');
|
||||
|
||||
var html = '<div id="mediaPlayer" style="display: none;">';
|
||||
|
||||
html += '<div class="videoBackdrop">';
|
||||
|
@ -745,7 +747,6 @@
|
|||
var div = document.createElement('div');
|
||||
div.innerHTML = html;
|
||||
document.body.appendChild(div);
|
||||
$(div).trigger('create');
|
||||
}
|
||||
|
||||
Dashboard.ready(function () {
|
||||
|
|
|
@ -764,6 +764,7 @@
|
|||
|
||||
var page = this;
|
||||
|
||||
Dashboard.importCss('css/nowplaying.css');
|
||||
bindEvents(page);
|
||||
|
||||
$('.sendMessageForm').off('submit', NowPlayingPage.onMessageSubmit).on('submit', NowPlayingPage.onMessageSubmit);
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
|
||||
self.show = function () {
|
||||
|
||||
Dashboard.importCss('css/search.css');
|
||||
$('.headerSearchInput').val('');
|
||||
|
||||
require(["jquery", "velocity"], function ($, Velocity) {
|
||||
|
|
|
@ -1924,9 +1924,26 @@ var AppInfo = {};
|
|||
tapDelay: 0
|
||||
});
|
||||
|
||||
function parentWithClass(elem, className) {
|
||||
|
||||
while (!elem.classList || !elem.classList.contains(className)) {
|
||||
elem = elem.parentNode;
|
||||
|
||||
if (!elem) {
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
return elem;
|
||||
}
|
||||
|
||||
// Have to work around this issue of fast click breaking the panel dismiss
|
||||
$(document.body).on('touchstart', '.ui-panel-dismiss', function () {
|
||||
$(this).trigger('click');
|
||||
document.body.addEventListener('touchstart', function (e) {
|
||||
|
||||
var tgt = parentWithClass(e.target, 'ui-panel-dismiss');
|
||||
if (tgt) {
|
||||
$(tgt).click();
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue