mirror of
https://github.com/jellyfin/jellyfin-web
synced 2025-03-30 19:56:21 +00:00
Merge pull request #1022 from ferferga/fix-mobile-layout
Fix mobile layout for itemdetails
This commit is contained in:
commit
d4427e8a37
2 changed files with 27 additions and 8 deletions
|
@ -517,6 +517,13 @@
|
|||
|
||||
.itemName {
|
||||
margin: 0.5em 0;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.nameContainer {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.itemMiscInfo {
|
||||
|
@ -534,7 +541,6 @@
|
|||
.layout-mobile .itemName,
|
||||
.layout-mobile .itemMiscInfo,
|
||||
.layout-mobile .mainDetailButtons {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
text-align: center;
|
||||
|
@ -576,7 +582,6 @@
|
|||
|
||||
.infoText {
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
text-align: left;
|
||||
}
|
||||
|
|
|
@ -336,7 +336,6 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "userSetti
|
|||
|
||||
return html = html.join(" / ");
|
||||
}
|
||||
|
||||
function renderName(item, container, isStatic, context) {
|
||||
var parentRoute;
|
||||
var parentNameHtml = [];
|
||||
|
@ -401,14 +400,25 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "userSetti
|
|||
} else if (item.Album) {
|
||||
parentNameHtml.push(item.Album);
|
||||
}
|
||||
|
||||
// FIXME: This whole section needs some refactoring, so it becames easier to scale across all form factors. See GH #1022
|
||||
var html = "";
|
||||
var tvShowHtml = parentNameHtml[0];
|
||||
var tvSeasonHtml = parentNameHtml[1];
|
||||
|
||||
if (parentNameHtml.length) {
|
||||
if (parentNameLast) {
|
||||
html = '<h3 class="parentName" style="margin: .25em 0;">' + parentNameHtml.join(" - ") + "</h3>";
|
||||
// Music
|
||||
if (layoutManager.mobile) {
|
||||
html = '<h3 class="parentName" style="margin: .25em 0;">' + parentNameHtml.join("</br>") + "</h3>";
|
||||
} else {
|
||||
html = '<h3 class="parentName" style="margin: .25em 0;">' + parentNameHtml.join(" - ") + "</h3>";
|
||||
}
|
||||
} else {
|
||||
html = '<h1 class="parentName" style="margin: .1em 0 .25em;">' + parentNameHtml.join(" - ") + "</h1>";
|
||||
if (layoutManager.mobile) {
|
||||
html = '<h1 class="parentName" style="margin: .1em 0 .25em;">' + parentNameHtml.join("</br>") + "</h1>";
|
||||
} else {
|
||||
html = '<h1 class="parentName" style="margin: .1em 0 .25em;">' + tvShowHtml + "</h1>";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -418,13 +428,17 @@ define(["loading", "appRouter", "layoutManager", "connectionManager", "userSetti
|
|||
var offset = parentNameLast ? ".25em" : ".5em";
|
||||
|
||||
if (html && !parentNameLast) {
|
||||
html += '<h3 class="itemName infoText" style="margin: .25em 0 .5em;">' + name + '</h3>';
|
||||
if (!layoutManager.mobile && tvSeasonHtml) {
|
||||
html += '<h3 class="itemName infoText" style="margin: .25em 0 .5em;">' + tvSeasonHtml + ' - ' + name + '</h3>';
|
||||
} else {
|
||||
html += '<h3 class="itemName infoText" style="margin: .25em 0 .5em;">' + name + '</h3>';
|
||||
}
|
||||
} else {
|
||||
html = '<h1 class="itemName infoText" style="margin: .1em 0 ' + offset + ';">' + name + "</h1>" + html;
|
||||
}
|
||||
|
||||
if (item.OriginalTitle && item.OriginalTitle != item.Name) {
|
||||
html += '<h4 class="itemName infoText" style="margin: -' + offset + ' 0 0">' + item.OriginalTitle + '</h4>';
|
||||
html += '<h4 class="itemName infoText" style="margin: -' + offset + ' 0 0;">' + item.OriginalTitle + '</h4>';
|
||||
}
|
||||
|
||||
container.innerHTML = html;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue