Use 100dvh to fix layout issue in mobile devices
This commit is contained in:
committed by
Aditya Chandel
parent
de005398df
commit
fe2d307d2a
@@ -12,7 +12,7 @@
|
||||
|
||||
.virtual-scroller {
|
||||
width: 100%;
|
||||
height: calc(100vh - 10.9rem);
|
||||
height: calc(100dvh - 10.9rem);
|
||||
padding: 1rem;
|
||||
box-sizing: border-box;
|
||||
overflow-y: auto;
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="h-[calc(100vh-6.1rem)] rounded-xl bg-[var(--card-background)] flex flex-col">
|
||||
<div class="h-[calc(100dvh-6.1rem)] rounded-xl bg-[var(--card-background)] flex flex-col">
|
||||
|
||||
<div class="flex items-center justify-between px-4 py-4">
|
||||
<span class="text font-semibold">Filter Mode</span>
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
showGridlines
|
||||
stripedRows
|
||||
[scrollable]="true"
|
||||
[scrollHeight]="'calc(100vh - 160px)'"
|
||||
[scrollHeight]="'calc(100dvh - 160px)'"
|
||||
[virtualScroll]="true"
|
||||
[virtualScrollItemSize]="46"
|
||||
[(selection)]="selectedBooks"
|
||||
|
||||
@@ -84,7 +84,7 @@ export class BookTableComponent implements OnInit, OnDestroy, OnChanges {
|
||||
ngOnChanges() {
|
||||
const wrapperElements: HTMLCollection = document.getElementsByClassName('p-virtualscroller');
|
||||
Array.prototype.forEach.call(wrapperElements, function (wrapperElement) {
|
||||
wrapperElement.style["height"] = 'calc(100vh - 160px)';
|
||||
wrapperElement.style["height"] = 'calc(100dvh - 160px)';
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
width: 100vw;
|
||||
overflow-x: hidden;
|
||||
box-sizing: border-box;
|
||||
|
||||
+1
-1
@@ -10,7 +10,7 @@
|
||||
.epub-viewer-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="flex flex-col h-[calc(100vh-6.1rem)] rounded-xl bg-[var(--card-background)] space-y-4">
|
||||
<div class="flex flex-col h-[calc(100dvh-6.1rem)] rounded-xl bg-[var(--card-background)] space-y-4">
|
||||
|
||||
<div class="px-6 pt-6 pb-4">
|
||||
<h2 class="text-xl font-semibold pb-1">Review Bookdrop Files</h2>
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100vh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
|
||||
<div class="p-4">
|
||||
<p class="text-lg gap-2 pb-4 pt-4">Internal Authentication:</p>
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
.dashboard-container {
|
||||
height: calc(100vh - 6.7rem);
|
||||
height: calc(100dvh - 6.7rem);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -18,7 +18,7 @@
|
||||
</p-tab>
|
||||
}
|
||||
</p-tablist>
|
||||
<p-tabpanels class="overflow-auto" style="height: calc(100vh - 9.7rem);">
|
||||
<p-tabpanels class="overflow-auto" style="height: calc(100dvh - 9.7rem);">
|
||||
<p-tabpanel value="view">
|
||||
<app-metadata-viewer [book$]="book$" [recommendedBooks]="recommendedBooks"></app-metadata-viewer>
|
||||
</p-tabpanel>
|
||||
|
||||
+1
-1
@@ -8,7 +8,7 @@
|
||||
<p-tab value="match">Search Metadata</p-tab>
|
||||
}
|
||||
</p-tablist>
|
||||
<p-tabpanels class="h-[calc(100vh-10rem)]">
|
||||
<p-tabpanels class="h-[calc(100dvh-10rem)]">
|
||||
@if (admin || canEditMetadata) {
|
||||
<p-tabpanel value="edit">
|
||||
<app-metadata-editor
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100vh-11.65rem)] overflow-y-auto border rounded-lg p-4 enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg p-4 enclosing-container">
|
||||
<div class="pt-2">
|
||||
<app-email-provider></app-email-provider>
|
||||
</div>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100vh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
|
||||
<div class="px-4 pt-4 pb-2">
|
||||
<div class="flex items-center gap-2 pb-4 pt-4">
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100vh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
|
||||
<div class="p-4 pt-6 min-w-[50rem]">
|
||||
<p class="text-lg pb-4 pt-2">Auto-Download Metadata for Files in BookDrop Folder:</p>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100vh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="p-4">
|
||||
<p class="text-lg pb-4 pt-4 ">
|
||||
Book Reader Settings: Global or Per-Book
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100vh-11.65rem)] overflow-y-auto border rounded-lg p-4 enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg p-4 enclosing-container">
|
||||
|
||||
<div class="flex justify-between items-center pb-2 pt-2">
|
||||
<h2 class="text-lg flex items-center gap-2">
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
<div class="w-full h-[calc(100vh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<div class="w-full h-[calc(100dvh-11.65rem)] overflow-y-auto border rounded-lg enclosing-container">
|
||||
<app-view-preferences></app-view-preferences>
|
||||
<p-divider></p-divider>
|
||||
<app-sidebar-sorting-preferences></app-sidebar-sorting-preferences>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
.layout-main-container {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
justify-content: space-between;
|
||||
padding: 5rem 1.1rem 2rem 3.6rem;
|
||||
transition: margin-left variables.$transitionDuration;
|
||||
|
||||
@@ -26,7 +26,7 @@ a {
|
||||
}
|
||||
|
||||
.layout-wrapper {
|
||||
min-height: 100vh;
|
||||
min-height: 100dvh;
|
||||
}
|
||||
|
||||
p {
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
.layout-sidebar {
|
||||
position: fixed;
|
||||
width: 225px;
|
||||
height: calc(100vh - 6rem);
|
||||
height: calc(100dvh - 6rem);
|
||||
z-index: 999;
|
||||
overflow-y: auto;
|
||||
user-select: none;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
transform: translateX(-100%);
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
@@ -72,7 +72,7 @@
|
||||
transform: translateX(-100%);
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
height: 100dvh;
|
||||
border-top-left-radius: 0;
|
||||
border-bottom-left-radius: 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user