Add picture elements support.

This commit is contained in:
Dermot Duffy
2021-10-07 21:16:16 -07:00
parent 639e2cddfd
commit 49455ab741
14 changed files with 438 additions and 120 deletions
+15 -3
View File
@@ -1,15 +1,16 @@
.container {
position: relative;
overflow: auto;
height: 100%;
width: 100%;
height: 100%;
margin: auto;
display: flex;
justify-content: center;
}
.frigate-card-contents {
width: 100%;
width: inherit;
height: inherit;
margin: auto;
overflow: auto;
-ms-overflow-style: none; /* Hide scrollbar: IE and Edge */
@@ -43,6 +44,17 @@
.outer:hover + .hover-menu, .hover-menu:hover {
opacity: 1.0;
}
/* A relative div to place absolute picture elements onto */
.picture-elements {
position: relative;
width: inherit;
}
/* Enforce picture elements to only be the size of the card/fullscreen (and not
larger) when in gallery mode so that the picture elements do not scroll. */
.picture-elements.gallery {
height: 100%;
}
ha-card {
display: flex;
@@ -56,7 +68,7 @@ ha-card {
background-color: var(--secondary-background-color, black);
}
frigate-card-gallery, frigate-card-viewer, frigate-card-live {
frigate-card-gallery, frigate-card-viewer, frigate-card-live, frigate-card-message, frigate-card-error-message {
width: 100%;
display: block;
}
+4
View File
@@ -0,0 +1,4 @@
.element {
position: absolute;
transform: translate(-50%, -50%);
}
+4
View File
@@ -1,6 +1,10 @@
@use "@material/image-list/mdc-image-list";
@use "@material/image-list";
:host {
overflow: auto;
}
.frigate-card-gallery {
// Note: In fullscreen, number of columns is overwritten in Javascript based
// on dimensions.