From af00a04e76fb6db2ebb327a1dcf78c670480b152 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 6 Aug 2021 02:09:26 -0400 Subject: [PATCH 01/12] Update item details mobile layout --- src/assets/css/librarybrowser.scss | 231 ++++++++++--------------- src/controllers/itemDetails/index.html | 10 +- src/controllers/itemDetails/index.js | 28 +-- 3 files changed, 95 insertions(+), 174 deletions(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index 902e1c68af..ec316c4dfc 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -52,8 +52,6 @@ z-index: 1; margin: 0 !important; top: 6.9em !important; - -webkit-transition: -webkit-transform 0.2s ease-out; - -o-transition: transform 0.2s ease-out; transition: transform 0.2s ease-out; } @@ -62,17 +60,14 @@ } .headerUserImage { - -webkit-background-size: contain; background-size: contain; background-repeat: no-repeat; background-position: center center; - -webkit-border-radius: 100em; border-radius: 100em; display: inline-block; } .headerUserButtonRound div { - -webkit-border-radius: 100em; border-radius: 100em; background-size: cover; background-repeat: no-repeat; @@ -80,7 +75,6 @@ } .headerButton { - -webkit-flex-shrink: 0; flex-shrink: 0; } @@ -90,23 +84,15 @@ .headerLeft { display: flex; - -webkit-align-items: center; align-items: center; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; flex-grow: 1; overflow: hidden; justify-content: flex-start; } .headerRight { - display: -webkit-box; - display: -webkit-flex; display: flex; - -webkit-align-items: center; align-items: center; - -webkit-box-pack: end; - -webkit-justify-content: flex-end; justify-content: flex-end; } @@ -116,15 +102,10 @@ } .pageTitle { - display: -webkit-inline-box; - display: -webkit-inline-flex; display: inline-flex; margin: 0 0 0 0.5em; height: 1.7em; - -webkit-box-align: center; - -webkit-align-items: center; align-items: center; - -webkit-flex-shrink: 1; flex-shrink: 1; } @@ -134,21 +115,16 @@ .headerLeft, .skinHeader { - display: -webkit-box; - display: -webkit-flex; + display: flex; } .detailButton, .skinHeader { flex-direction: column; - -webkit-flex-direction: column; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; } .pageTitleWithLogo { background-position: left center; - -webkit-background-size: contain; background-size: contain; background-repeat: no-repeat; width: 13.2em; @@ -194,27 +170,19 @@ } .navMenuOption { - display: -webkit-box !important; - display: -webkit-flex !important; display: flex !important; - -webkit-box-align: center; - -webkit-align-items: center; align-items: center; text-decoration: none; color: inherit; padding: 0.9em 0 0.9em 2.4em !important; - -webkit-box-flex: 1; - -webkit-flex-grow: 1; flex-grow: 1; font-weight: 400 !important; margin: 0 !important; - -webkit-border-radius: 0 !important; border-radius: 0 !important; } .navMenuOptionIcon { margin-right: 1.2em; - -webkit-flex-shrink: 0; flex-shrink: 0; } @@ -229,8 +197,6 @@ } .dashboardDocument .skinBody { - -webkit-transition: left ease-in-out 0.3s, padding ease-in-out 0.3s; - -o-transition: left ease-in-out 0.3s, padding ease-in-out 0.3s; transition: left ease-in-out 0.3s, padding ease-in-out 0.3s; position: absolute; top: 0; @@ -250,26 +216,6 @@ padding-bottom: 10vh; } -.primaryImageWrapper { - display: none; -} - -.primaryImageWrapper > img { - display: block; - margin: 0 auto; - max-width: 80vw; - max-height: 50vh; -} - -.primaryImageWrapper > img.aspect-square { - max-height: 45vh; -} - -.layout-mobile .primaryImageWrapper { - display: block; - flex: 1 0 auto; -} - @media all and (min-width: 40em) { .dashboardDocument .adminDrawerLogo, .dashboardDocument .mainDrawerButton { @@ -280,9 +226,7 @@ z-index: inherit !important; left: 0 !important; top: 0 !important; - -webkit-transform: none !important; transform: none !important; - -webkit-box-shadow: none !important; box-shadow: none !important; width: 20.205em !important; font-size: 94%; @@ -317,14 +261,9 @@ } .headerTabs { - -webkit-align-self: center; align-self: center; width: auto; - -webkit-box-align: center; - -webkit-align-items: center; align-items: center; - -webkit-box-pack: center; - -webkit-justify-content: center; justify-content: center; position: relative; margin-top: -4.3em; @@ -381,8 +320,6 @@ } .flexPageTabContent.is-active { - display: -webkit-box !important; - display: -webkit-flex !important; display: flex !important; } @@ -403,13 +340,11 @@ margin: 1.5em 0; background: #222; padding: 0.8em 0.8em 0.8em 3em; - -webkit-border-radius: 0.3em; border-radius: 0.3em; position: relative; } -.detailLogo, -.itemBackdrop { +.detailLogo { background-repeat: no-repeat; background-position: center center; } @@ -462,26 +397,30 @@ } .itemBackdrop { - -webkit-background-size: cover; background-size: cover; background-repeat: no-repeat; - background-position: center; + background-position: center 0; background-attachment: fixed; height: 40vh; position: relative; animation: backdrop-fadein 800ms ease-in normal both; -} -.layout-mobile .itemBackdrop { - display: none; -} + .layout-mobile & { + background-attachment: initial; + margin-top: 3rem; -.layout-desktop .itemBackdrop::after { - content: ""; - width: 100%; - height: 100%; - background: rgba(0, 0, 0, 0.65); - display: block; + @media all and (orientation: portrait) and (max-width: 40em) { + height: 30vh; + } + } + + .layout-desktop &::after { + content: ""; + width: 100%; + height: 100%; + background: rgba(0, 0, 0, 0.25); + display: block; + } } .layout-tv .itemBackdrop, @@ -494,21 +433,29 @@ flex-direction: column; padding-left: 32.45vw; padding-right: 2%; -} -.layout-mobile .detailPageContent { - padding-left: 5%; - padding-right: 5%; -} + @media all and (max-width: 45em) { + & { + padding-left: 5%; + padding-right: 5%; + } + } -.layout-desktop .detailPageContent .emby-scroller, -.layout-tv .detailPageContent .emby-scroller { - margin-left: 0; -} + .layout-mobile & { + padding-left: 5%; + padding-right: 5%; + } -.layout-desktop .noBackdrop .detailPageContent, -.layout-tv .noBackdrop .detailPageContent { - margin-top: 2.5em; + .layout-desktop &, + .layout-tv & { + .emby-scroller { + margin-left: 0; + } + + .noBackdrop { + margin-top: 2.5em; + } + } } .layout-desktop .noBackdrop .detailImageContainer img, @@ -559,8 +506,6 @@ .mainDetailButtons { display: flex; - -webkit-box-align: center; - -webkit-align-items: center; align-items: center; margin: 1em 0; } @@ -568,8 +513,6 @@ .detailButton, .mainDetailButtons { display: flex; - display: -webkit-box; - display: -webkit-flex; } .itemName { @@ -613,14 +556,19 @@ } .itemMiscInfo { - display: -webkit-box; - display: -webkit-flex; display: flex; - -webkit-flex-wrap: wrap; flex-wrap: wrap; - -webkit-box-align: center; - -webkit-align-items: center; align-items: center; + + .layout-mobile & { + @media all and (orientation: portrait) and (max-width: 40em) { + margin-bottom: 0 !important; + + .mediaInfoItem { + margin-bottom: 0.6em; + } + } + } } .layout-mobile .parentName, @@ -633,9 +581,17 @@ } .layout-mobile .mainDetailButtons { - flex: 2 0 70%; + flex: 1 0 0%; margin-top: 0.5em; margin-bottom: 0.5em; + + @media all and (max-width: 34em) { + & { + margin-left: -32.5vw; + margin-top: 0; + margin-bottom: 0; + } + } } .subtitle { @@ -658,9 +614,14 @@ } .layout-mobile .detailPagePrimaryContainer { - flex-wrap: wrap; - position: relative; - padding: 4.5rem 3.3% 0.5rem; + flex-direction: column; + padding: 0.5rem 5% 0.5rem 37.5vw; + + @media all and (min-width: 45em) { + & { + padding-left: 25vw; + } + } } .layout-tv #itemDetailPage:not(.noBackdrop) .detailPagePrimaryContainer, @@ -690,7 +651,7 @@ } .layout-mobile .infoWrapper { - flex: 2 0 70%; + flex: 1 0 0%; } .infoText { @@ -714,17 +675,27 @@ margin: 1em 0; } -.layout-mobile .detailImageContainer { - display: none; -} - .detailImageContainer .card { position: absolute; - top: 50%; - float: left; - width: 25vw; + top: 20%; + max-width: 25vw; + max-height: 80vh; z-index: 3; - transform: translateY(-50%); + + .cardBox { + margin: 0; + } + + .layout-mobile & { + top: initial; + transform: translateY(-50%); + max-width: 30vw; + } + + .layout-tv & { + top: 50%; + transform: translateY(-50%); + } } .detailImageContainer .card.backdropCard { @@ -735,6 +706,10 @@ top: 40%; } +.layout-mobile .detailImageContainer { + padding-left: 5%; +} + .layout-desktop .noBackdrop .detailImageContainer, .layout-tv .noBackdrop .detailImageContainer { margin-top: 0; @@ -766,7 +741,6 @@ .itemDetailImage { width: 100% !important; - -webkit-box-shadow: 0 0.1em 0.5em 0 rgba(0, 0, 0, 0.75); box-shadow: 0 0.1em 0.5em 0 rgba(0, 0, 0, 0.75); } @@ -873,7 +847,6 @@ div.itemDetailGalleryLink.defaultCardBackground { .recordingFields button { margin-left: 0; margin-right: 0.5em; - -webkit-flex-shrink: 0; flex-shrink: 0; } @@ -884,11 +857,7 @@ div.itemDetailGalleryLink.defaultCardBackground { .detailButton { display: flex; flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; align-items: center; margin: 0 !important; padding: 0.7em 0.7em !important; @@ -916,18 +885,9 @@ div.itemDetailGalleryLink.defaultCardBackground { } .detailButton-content { - display: -webkit-box; - display: -webkit-flex; display: flex; - -webkit-box-orient: vertical; - -webkit-box-direction: normal; - -webkit-flex-direction: column; flex-direction: column; - -webkit-box-pack: center; - -webkit-justify-content: center; justify-content: center; - -webkit-box-align: center; - -webkit-align-items: center; align-items: center; } @@ -984,8 +944,6 @@ div.itemDetailGalleryLink.defaultCardBackground { @media all and (max-width: 31.25em) { .mobileDetails .itemMiscInfo { text-align: center; - -webkit-box-pack: center; - -webkit-justify-content: center; justify-content: center; } @@ -1071,14 +1029,9 @@ div.itemDetailGalleryLink.defaultCardBackground { } .mediaInfoIcons { - display: -webkit-box; - display: -webkit-flex; display: flex; - -webkit-box-align: center; - -webkit-align-items: center; align-items: center; margin: 1em 0; - -webkit-flex-wrap: wrap; flex-wrap: wrap; } @@ -1126,7 +1079,6 @@ div:not(.sectionTitleContainer-cards) > .sectionTitle-cards { .sectionTitleButton { margin-left: 1.5em !important; - -webkit-flex-shrink: 0; flex-shrink: 0; } @@ -1136,22 +1088,17 @@ div:not(.sectionTitleContainer-cards) > .sectionTitle-cards { .sectionTitleIconButton { margin-left: 1.5em !important; - -webkit-flex-shrink: 0; flex-shrink: 0; font-size: 84% !important; padding: 0.5em !important; } .horizontalItemsContainer { - display: -webkit-box; - display: -webkit-flex; display: flex; } .sectionTitleTextButton { margin: 0 !important; - display: -webkit-inline-box !important; - display: -webkit-inline-flex !important; display: inline-flex !important; color: inherit !important; } @@ -1219,8 +1166,6 @@ div:not(.sectionTitleContainer-cards) > .sectionTitle-cards { } .itemsViewSettingsContainer { - -webkit-box-pack: center; - -webkit-justify-content: center; justify-content: center; } diff --git a/src/controllers/itemDetails/index.html b/src/controllers/itemDetails/index.html index 5467469827..0dd9d2c453 100644 --- a/src/controllers/itemDetails/index.html +++ b/src/controllers/itemDetails/index.html @@ -1,14 +1,11 @@
-
-
+
+
+
-
- -
-
@@ -90,7 +87,6 @@
-
diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index 19f8e067e9..b7b6845ec0 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -564,7 +564,7 @@ function renderDetailPageBackdrop(page, item, apiClient) { let hasbackdrop = false; const itemBackdropElement = page.querySelector('#itemBackdrop'); - if (layoutManager.mobile || !userSettings.detailsBanner()) { + if (!userSettings.detailsBanner()) { return false; } @@ -601,24 +601,6 @@ function renderDetailPageBackdrop(page, item, apiClient) { return hasbackdrop; } -function renderPrimaryImage(page, item, apiClient) { - if (item?.ImageTags?.Primary) { - const imageUrl = apiClient.getScaledImageUrl(item.Id, { - type: 'Primary', - maxWidth: dom.getScreenWidth(), - tag: item.ImageTags.Primary - }); - - const imageElem = page.querySelector('#primaryImage'); - imageElem.src = imageUrl; - imageElem.alt = item.Name; - if (item.PrimaryImageAspectRatio === 1) { - imageElem.classList.add('aspect-square'); - } - page.querySelector('.primaryImageWrapper')?.classList.remove('hide'); - } -} - function reloadFromItem(instance, page, params, item, user) { const apiClient = ServerConnections.getApiClient(item.ServerId); @@ -631,9 +613,7 @@ function reloadFromItem(instance, page, params, item, user) { renderLogo(page, item, apiClient); renderDetailPageBackdrop(page, item, apiClient); } - if (layoutManager.mobile) { - renderPrimaryImage(page, item, apiClient); - } + renderBackdrop(item); // Render the main information for the item @@ -820,8 +800,8 @@ function renderDetailImage(elem, item, imageLoader) { overlayText: false, transition: false, disableIndicators: true, - overlayPlayButton: true, - action: 'play', + overlayPlayButton: layoutManager.mobile ? false : true, + action: layoutManager.mobile ? 'none' : 'play', width: dom.getWindowSize().innerWidth * 0.25 }); From d69245361c2ad0d716961f7c4c03fef0bf3bb6b1 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 10 Aug 2021 02:36:35 -0400 Subject: [PATCH 02/12] Disable item backdrops for people --- src/controllers/itemDetails/index.js | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index b7b6845ec0..feede55098 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -560,14 +560,20 @@ function renderBackdrop(item) { } function renderDetailPageBackdrop(page, item, apiClient) { - let imgUrl; - let hasbackdrop = false; - const itemBackdropElement = page.querySelector('#itemBackdrop'); - + // Details banner is disabled in user settings if (!userSettings.detailsBanner()) { return false; } + // Disable item backdrop for people because they never look right + if (item.Type === 'Person') { + return false; + } + + let imgUrl; + let hasbackdrop = false; + const itemBackdropElement = page.querySelector('#itemBackdrop'); + if (item.BackdropImageTags && item.BackdropImageTags.length) { imgUrl = apiClient.getScaledImageUrl(item.Id, { type: 'Backdrop', From 602d14a539a406cd769f2fbd18e496f646331ceb Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Tue, 10 Aug 2021 17:03:40 -0400 Subject: [PATCH 03/12] Fix card positioning on mobile --- src/assets/css/librarybrowser.scss | 32 +++++++++++--------------- src/controllers/itemDetails/index.html | 2 +- 2 files changed, 15 insertions(+), 19 deletions(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index ec316c4dfc..1462064285 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -565,7 +565,7 @@ margin-bottom: 0 !important; .mediaInfoItem { - margin-bottom: 0.6em; + margin-top: 0.5em; } } } @@ -587,8 +587,6 @@ @media all and (max-width: 34em) { & { - margin-left: -32.5vw; - margin-top: 0; margin-bottom: 0; } } @@ -615,13 +613,7 @@ .layout-mobile .detailPagePrimaryContainer { flex-direction: column; - padding: 0.5rem 5% 0.5rem 37.5vw; - - @media all and (min-width: 45em) { - & { - padding-left: 25vw; - } - } + padding: 0.5rem 5%; } .layout-tv #itemDetailPage:not(.noBackdrop) .detailPagePrimaryContainer, @@ -648,10 +640,13 @@ .infoWrapper { flex: 1 0 0; -} -.layout-mobile .infoWrapper { - flex: 1 0 0%; + .layout-mobile & { + flex: 1 0 0%; + position: relative; + padding-left: 37.5%; + overflow: visible; + } } .infoText { @@ -661,10 +656,10 @@ min-width: 0; max-width: 100%; overflow: hidden; -} -.layout-mobile .infoText { - white-space: normal; + .layout-mobile & { + white-space: normal; + } } .detailPageSecondaryContainer { @@ -687,8 +682,9 @@ } .layout-mobile & { - top: initial; - transform: translateY(-50%); + top: auto !important; + left: 0; + bottom: 0; max-width: 30vw; } diff --git a/src/controllers/itemDetails/index.html b/src/controllers/itemDetails/index.html index 0dd9d2c453..d78721e96e 100644 --- a/src/controllers/itemDetails/index.html +++ b/src/controllers/itemDetails/index.html @@ -1,12 +1,12 @@
-
+
From 8c1ccaf485189273042c4b18d8c7aa7437efafac Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Wed, 11 Aug 2021 13:12:49 -0400 Subject: [PATCH 04/12] Fix card positioning on mobile --- src/assets/css/librarybrowser.scss | 50 ++++++++++++++++++------------ 1 file changed, 31 insertions(+), 19 deletions(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index 1462064285..cf40752fdc 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -581,14 +581,13 @@ } .layout-mobile .mainDetailButtons { - flex: 1 0 0%; margin-top: 0.5em; margin-bottom: 0.5em; + margin-left: 37.5%; - @media all and (max-width: 34em) { - & { - margin-bottom: 0; - } + @media all and (max-width: 32em) { + margin-bottom: 0; + margin-left: 0; } } @@ -612,7 +611,8 @@ } .layout-mobile .detailPagePrimaryContainer { - flex-direction: column; + display: block; + position: relative; padding: 0.5rem 5%; } @@ -642,10 +642,12 @@ flex: 1 0 0; .layout-mobile & { - flex: 1 0 0%; - position: relative; padding-left: 37.5%; overflow: visible; + + @media all and (max-width: 32em) { + position: relative; + } } } @@ -681,11 +683,29 @@ margin: 0; } + &.backdropCard { + top: 35%; + } + + &.squareCard { + top: 40%; + } + .layout-mobile & { - top: auto !important; - left: 0; - bottom: 0; + left: 5%; + bottom: 1rem; max-width: 30vw; + + @media all and (max-width: 32em) { + left: 0; + bottom: 0; + } + + &, + &.backdropCard, + &.squareCard { + top: auto; + } } .layout-tv & { @@ -694,14 +714,6 @@ } } -.detailImageContainer .card.backdropCard { - top: 35%; -} - -.detailImageContainer .card.squareCard { - top: 40%; -} - .layout-mobile .detailImageContainer { padding-left: 5%; } From ba1e05ba22e36f30b78b8216971f507958a3e10c Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Wed, 11 Aug 2021 15:28:03 -0400 Subject: [PATCH 05/12] Fix stylelint error --- src/assets/css/librarybrowser.scss | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index cf40752fdc..0bfac6d5ad 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -345,6 +345,12 @@ } .detailLogo { + width: 25vw; + height: 16vh; + position: absolute; + top: 10vh; + right: 25vw; + background-size: contain; background-repeat: no-repeat; background-position: center center; } @@ -727,15 +733,6 @@ position: relative; } -.detailLogo { - width: 25vw; - height: 16vh; - position: absolute; - top: 10vh; - right: 25vw; - background-size: contain; -} - .noBackdrop .detailLogo, .layout-mobile .detailLogo { display: none; From 0c41d29c3405f6790fed15f95714fc2db3e76797 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 13 Aug 2021 10:09:36 -0400 Subject: [PATCH 06/12] Fix tv layout --- src/assets/css/librarybrowser.scss | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index 0bfac6d5ad..11aa27b008 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -624,8 +624,6 @@ .layout-tv #itemDetailPage:not(.noBackdrop) .detailPagePrimaryContainer, .layout-desktop #itemDetailPage:not(.noBackdrop) .detailPagePrimaryContainer { - position: relative; - top: 0; padding-left: 32.45vw; } @@ -679,7 +677,9 @@ } .detailImageContainer .card { - position: absolute; + // important is needed here to override :focus setting + // the position to relative in the tv layout + position: absolute !important; top: 20%; max-width: 25vw; max-height: 80vh; @@ -701,6 +701,7 @@ left: 5%; bottom: 1rem; max-width: 30vw; + padding-left: 5%; @media all and (max-width: 32em) { left: 0; @@ -715,15 +716,13 @@ } .layout-tv & { + left: 5%; + width: 25vw; top: 50%; transform: translateY(-50%); } } -.layout-mobile .detailImageContainer { - padding-left: 5%; -} - .layout-desktop .noBackdrop .detailImageContainer, .layout-tv .noBackdrop .detailImageContainer { margin-top: 0; From dc59c68c209f2c4cbca4a1eaa4f1299457ae7680 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 13 Aug 2021 11:55:10 -0400 Subject: [PATCH 07/12] Fix desktop layout --- src/assets/css/librarybrowser.scss | 35 ++++++++++++++++++------------ 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index 11aa27b008..4ac2ae28f1 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -424,7 +424,7 @@ content: ""; width: 100%; height: 100%; - background: rgba(0, 0, 0, 0.25); + background: rgba(0, 0, 0, 0.65); display: block; } } @@ -610,21 +610,22 @@ align-items: center; align-content: center; z-index: 2; -} -.layout-tv .detailPagePrimaryContainer { - display: block; -} + .layout-mobile & { + display: block; + position: relative; + padding: 0.5rem 5%; + } -.layout-mobile .detailPagePrimaryContainer { - display: block; - position: relative; - padding: 0.5rem 5%; -} + .layout-desktop & { + position: relative; + padding-left: 32.45vw; + } -.layout-tv #itemDetailPage:not(.noBackdrop) .detailPagePrimaryContainer, -.layout-desktop #itemDetailPage:not(.noBackdrop) .detailPagePrimaryContainer { - padding-left: 32.45vw; + .layout-tv & { + display: block; + padding-left: 32.45vw; + } } .layout-desktop .detailRibbon { @@ -715,10 +716,16 @@ } } + .layout-desktop & { + left: 3.3%; + top: -80%; + width: 25vw; + } + .layout-tv & { left: 5%; - width: 25vw; top: 50%; + width: 25vw; transform: translateY(-50%); } } From 1734f5c345c4c944947eb911de5d9cd98e24730d Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 13 Aug 2021 14:43:55 -0400 Subject: [PATCH 08/12] Mobile layout refinements --- src/assets/css/librarybrowser.scss | 4 ++-- src/controllers/itemDetails/index.js | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index 4ac2ae28f1..b8a7a98126 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -587,7 +587,7 @@ } .layout-mobile .mainDetailButtons { - margin-top: 0.5em; + margin-top: 1em; margin-bottom: 0.5em; margin-left: 37.5%; @@ -702,7 +702,7 @@ left: 5%; bottom: 1rem; max-width: 30vw; - padding-left: 5%; + filter: drop-shadow(0 0 0.5rem #000); @media all and (max-width: 32em) { left: 0; diff --git a/src/controllers/itemDetails/index.js b/src/controllers/itemDetails/index.js index feede55098..e18ee6febf 100644 --- a/src/controllers/itemDetails/index.js +++ b/src/controllers/itemDetails/index.js @@ -565,8 +565,8 @@ function renderDetailPageBackdrop(page, item, apiClient) { return false; } - // Disable item backdrop for people because they never look right - if (item.Type === 'Person') { + // Disable item backdrop for books and people because they only have primary images + if (item.Type === 'Person' || item.Type === 'Book') { return false; } From 2754c25964fcdb1badbaaec591d82b67ab53cdc5 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 27 Aug 2021 00:11:03 -0400 Subject: [PATCH 09/12] Remove unused noBackdrop class styles --- src/assets/css/librarybrowser.scss | 28 +--------------------------- src/themes/dark/theme.css | 4 ---- 2 files changed, 1 insertion(+), 31 deletions(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index b8a7a98126..72ba278fe1 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -429,8 +429,7 @@ } } -.layout-tv .itemBackdrop, -.layout-desktop .noBackdrop .itemBackdrop { +.layout-tv .itemBackdrop { display: none; } @@ -457,18 +456,9 @@ .emby-scroller { margin-left: 0; } - - .noBackdrop { - margin-top: 2.5em; - } } } -.layout-desktop .noBackdrop .detailImageContainer img, -.layout-tv .noBackdrop .detailImageContainer img { - margin-top: 0; -} - .detailSectionContent a { color: inherit; } @@ -638,11 +628,6 @@ height: inherit; } -.layout-desktop .noBackdrop .detailRibbon, -.layout-tv .noBackdrop .detailRibbon { - margin-top: 0; -} - .infoWrapper { flex: 1 0 0; @@ -730,16 +715,10 @@ } } -.layout-desktop .noBackdrop .detailImageContainer, -.layout-tv .noBackdrop .detailImageContainer { - margin-top: 0; -} - .detailPagePrimaryContent { position: relative; } -.noBackdrop .detailLogo, .layout-mobile .detailLogo { display: none; } @@ -976,11 +955,6 @@ div.itemDetailGalleryLink.defaultCardBackground { border-collapse: collapse; } -.layout-desktop .noBackdrop .detailPageWrapperContainer, -.layout-tv .noBackdrop .detailPageWrapperContainer { - margin-top: 3.8em; -} - .mediaInfoStream { margin: 0 3em 0 0; display: inline-block; diff --git a/src/themes/dark/theme.css b/src/themes/dark/theme.css index f1c17fe9fd..96ec79522f 100644 --- a/src/themes/dark/theme.css +++ b/src/themes/dark/theme.css @@ -226,10 +226,6 @@ html { background: none; } -.noBackdrop .detailRibbon { - background: #202020; -} - .listItem-border { border-color: rgba(34, 34, 34, 0.9) !important; } From 54e7e887446205a0a20ba6e4c7286448db65ecab Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Fri, 27 Aug 2021 00:22:53 -0400 Subject: [PATCH 10/12] Fix margins for small screens in desktop mode --- src/assets/css/librarybrowser.scss | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index 72ba278fe1..3af99bb6b0 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -439,13 +439,6 @@ padding-left: 32.45vw; padding-right: 2%; - @media all and (max-width: 45em) { - & { - padding-left: 5%; - padding-right: 5%; - } - } - .layout-mobile & { padding-left: 5%; padding-right: 5%; From fc790df0473b076bb2af439a0f59a5acfd3c9bb2 Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Sun, 29 Aug 2021 00:32:35 -0400 Subject: [PATCH 11/12] Adjust overflow rules for tv intersect bug --- src/assets/css/librarybrowser.scss | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index 3af99bb6b0..e180c37e1e 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -507,6 +507,14 @@ .itemName { margin: 0.5em 0; font-weight: 600; + white-space: nowrap; + text-overflow: ellipsis; + overflow: hidden; + + .layout-mobile & { + white-space: normal; + overflow: visible; + } } .itemName.originalTitle { @@ -626,7 +634,6 @@ .layout-mobile & { padding-left: 37.5%; - overflow: visible; @media all and (max-width: 32em) { position: relative; @@ -635,16 +642,9 @@ } .infoText { - white-space: nowrap; - text-overflow: ellipsis; text-align: left; min-width: 0; max-width: 100%; - overflow: hidden; - - .layout-mobile & { - white-space: normal; - } } .detailPageSecondaryContainer { From 4285ab04becb87809516a25951760983be1bdcba Mon Sep 17 00:00:00 2001 From: Bill Thornton Date: Thu, 2 Sep 2021 14:59:53 -0400 Subject: [PATCH 12/12] Remove infoText class from infoWrapper --- src/assets/css/librarybrowser.scss | 2 ++ src/controllers/itemDetails/index.html | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/assets/css/librarybrowser.scss b/src/assets/css/librarybrowser.scss index e180c37e1e..ffbc92b65a 100644 --- a/src/assets/css/librarybrowser.scss +++ b/src/assets/css/librarybrowser.scss @@ -630,6 +630,8 @@ } .infoWrapper { + min-width: 0; + max-width: 100%; flex: 1 0 0; .layout-mobile & { diff --git a/src/controllers/itemDetails/index.html b/src/controllers/itemDetails/index.html index d78721e96e..6ac5ba3368 100644 --- a/src/controllers/itemDetails/index.html +++ b/src/controllers/itemDetails/index.html @@ -5,7 +5,7 @@
-
+