basics of resonsive layout

This commit is contained in:
2024-01-11 00:07:15 +01:00
parent a60deb8cd8
commit 671cf3b44e
4 changed files with 34 additions and 14 deletions

View File

@@ -11,15 +11,16 @@
<style> <style>
#mainContainer { #mainContainer {
display: grid; display: grid;
grid-template-columns: 25% 75%; grid-template-columns: 25% 1fr;
height: 100vh; height: calc(100vh - 1em); /* fallback */
height: calc(100dvh - 1em);
gap: 0.5em;
margin: 0.5em;
} }
#sidebar { #sidebar {
grid-column: 1; grid-column: 1;
height: calc(100vh - 1em);
overflow: auto;
overflow-wrap: break-word; overflow-wrap: break-word;
margin: 0.5em;
scrollbar-gutter: stable; scrollbar-gutter: stable;
overflow-y: scroll; overflow-y: scroll;
scrollbar-width: thin; scrollbar-width: thin;
@@ -27,9 +28,24 @@
#content { #content {
grid-column: 2; grid-column: 2;
margin: 0.5em;
margin-left: 0em;
height: calc(100vh - 1em); height: calc(100vh - 1em);
scrollbar-gutter: stable; height: calc(100dvh - 1em);
}
@media (max-width: 500px) {
#mainContainer {
grid-template-columns: 100%;
grid-template-rows: 70% 1fr;
}
#sidebar {
order: 1;
height: 100%;
}
#content {
grid-column: 1;
height: 100%;
}
} }
</style> </style>

View File

@@ -198,4 +198,10 @@
.material-icons::-moz-focus-inner { .material-icons::-moz-focus-inner {
border: 0; border: 0;
} }
@media (max-width: 500px) {
.stream-item-star {
opacity: 0.5;
}
}
</style> </style>

View File

@@ -24,15 +24,14 @@
<style> <style>
#streamContainer { #streamContainer {
display: grid; display: grid;
grid-template-rows: auto 1fr; grid-template-rows: 1fr auto;
height: calc(100vh - 1em); height: 100%;
gap: 0.5em;
} }
#streamPage { #streamPage {
grid-row: 1 / 2; grid-row: 1 / 2;
overflow: auto; overflow: auto;
margin-bottom: 0.5em;
width: 100%;
background: local url('/assets/result.png') top right / 50% no-repeat, rgba(0, 0, 0, 0.8); background: local url('/assets/result.png') top right / 50% no-repeat, rgba(0, 0, 0, 0.8);
} }
@@ -40,5 +39,6 @@
grid-row: 2 / 3; grid-row: 2 / 3;
margin-left: 1px; margin-left: 1px;
margin-right: 1px; margin-right: 1px;
height: 100%;
} }
</style> </style>

View File

@@ -57,8 +57,6 @@
} }
#table-container { #table-container {
display: grid;
grid-template-columns: auto 1fr 1fr;
overflow-x: hidden; overflow-x: hidden;
margin-left: 3%; margin-left: 3%;
} }