mirror of
https://github.com/jellyfin/jellyfin-web.git
synced 2024-11-17 02:48:19 -07:00
Update item details mobile layout
This commit is contained in:
parent
0fcb5e7b3e
commit
af00a04e76
@ -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;
|
||||
}
|
||||
|
||||
|
@ -1,14 +1,11 @@
|
||||
<div id="itemDetailPage" data-role="page" class="page libraryPage itemDetailPage noSecondaryNavPage selfBackdropPage" data-backbutton="true">
|
||||
<div id="itemBackdrop" class="itemBackdrop">
|
||||
</div>
|
||||
<div id="itemBackdrop" class="itemBackdrop"></div>
|
||||
|
||||
<div class="detailImageContainer padded-left"></div>
|
||||
<div class="detailLogo"></div>
|
||||
|
||||
<div class="detailPageWrapperContainer padded-bottom-page">
|
||||
<div class="detailPagePrimaryContainer padded-left padded-right">
|
||||
<div class="primaryImageWrapper hide">
|
||||
<img id="primaryImage" />
|
||||
</div>
|
||||
|
||||
<div class="infoWrapper infoText">
|
||||
<div class="nameContainer"></div>
|
||||
<div class="itemMiscInfo itemMiscInfo-primary" style="margin-bottom: 0.6em;"></div>
|
||||
@ -90,7 +87,6 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="detailPageSecondaryContainer">
|
||||
<div class="detailImageContainer padded-left"></div>
|
||||
<div class="detailPageContent">
|
||||
<div class="detailPagePrimaryContent padded-right">
|
||||
<div class="detailSection">
|
||||
|
@ -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
|
||||
});
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user