scrollable containers

This commit is contained in:
bronku 2025-04-06 14:13:01 +02:00
parent f0cd58040c
commit c36c9a3ef1
3 changed files with 16 additions and 5 deletions

View file

@ -26,7 +26,6 @@ body {
color: var(--text-color); color: var(--text-color);
background-color: var(--background-color); background-color: var(--background-color);
display: flex; display: flex;
min-height: 100vh;
width: 100%; width: 100%;
line-height: 1.6; line-height: 1.6;
} }
@ -112,7 +111,7 @@ nav>a:hover::after {
padding: 0; padding: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
min-height: 100vh; height: 100dvh;
overflow-x: hidden; overflow-x: hidden;
} }
@ -140,7 +139,9 @@ main {
padding: 2rem; padding: 2rem;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
height: 100%;
gap: 1.5rem; gap: 1.5rem;
overflow: hidden;
} }
/* Search form */ /* Search form */
@ -313,11 +314,21 @@ tr a {
flex-direction: column; flex-direction: column;
} }
.order>div {
flex-basis: 0;
flex-shrink: 0;
}
.order-contents>*:first-child, .order-contents>*:first-child,
.order-contents>*:last-child { .order-contents>*:last-child {
flex-grow: 0; flex-grow: 0;
} }
.scrollable {
overflow-y: auto;
min-height: 0;
}
/* Responsive adjustments */ /* Responsive adjustments */
@media (max-width: 768px) { @media (max-width: 768px) {
.search-container { .search-container {

View file

@ -43,7 +43,7 @@
<input type="number" name="paid" min="0" value="{{.Paid}}"> <input type="number" name="paid" min="0" value="{{.Paid}}">
</label> </label>
</div> </div>
<div> <div class="scrollable">
<h2>Dodane Ciasta</h2> <h2>Dodane Ciasta</h2>
<ul id="basket"> <ul id="basket">
</ul> </ul>
@ -52,7 +52,7 @@
</div> </div>
{{end}} {{end}}
{{with .Catalogue}} {{with .Catalogue}}
<div> <div class="scrollable">
<h2>Katalog</h2> <h2>Katalog</h2>
<ul> <ul>
{{range .}} {{range .}}

View file

@ -15,7 +15,7 @@ Zamówienia
<input type="date" value="{{.Last}}" name="to"> <input type="date" value="{{.Last}}" name="to">
</label> </label>
</form> </form>
<div id="results-table"> <div id="results-table" class="scrollable">
{{template "orders-table" .Orders}} {{template "orders-table" .Orders}}
</div> </div>
</main> </main>