Fix mobile layout overflow

This commit is contained in:
lucio committed 2026-06-09 22:28:39 -07:00
1 parent 217b84e52d
commit 423e1552f8
8 files changed
+245 -25

No files matched your search

+215 -1
View File
@@ -58,10 +58,17 @@ body {
-webkit-font-smoothing: antialiased;
}
html,
body {
width: 100%;
max-width: 100%;
}
/* Global Grid Layout */
.app-container {
display: flex;
min-height: 100vh;
min-width: 0;
}
/* Premium Sidebar Navigation */
@@ -160,6 +167,7 @@ body {
flex-grow: 1;
padding: 2.5rem 3.5rem;
max-width: 1400px;
min-width: 0;
}
.page-header {
@@ -239,6 +247,7 @@ body {
padding: 1.75rem;
margin-bottom: 2rem;
transition: box-shadow 0.3s ease, border-color 0.3s ease;
min-width: 0;
}
.card:hover {
@@ -304,6 +313,7 @@ body {
/* Items Tables and Layouts */
.data-table-wrapper {
overflow-x: auto;
max-width: 100%;
}
.data-table {
@@ -388,6 +398,7 @@ body {
display: flex;
flex-direction: column;
gap: 2rem;
min-width: 0;
}
.item-visuals {
@@ -427,6 +438,7 @@ body {
display: flex;
flex-direction: column;
gap: 2rem;
min-width: 0;
}
.qr-card {
@@ -922,6 +934,7 @@ tr:last-child .actions-dropdown-menu {
align-items: center;
gap: 1rem;
flex-grow: 1;
min-width: 0;
}
.folder-icon-wrapper {
@@ -945,6 +958,7 @@ tr:last-child .actions-dropdown-menu {
display: flex;
flex-direction: column;
gap: 0.15rem;
min-width: 0;
}
.folder-name-link {
@@ -953,6 +967,7 @@ tr:last-child .actions-dropdown-menu {
text-decoration: none;
font-size: 1.05rem;
transition: color 0.2s ease;
overflow-wrap: anywhere;
}
.folder-name-link:hover {
@@ -1068,6 +1083,7 @@ tr:last-child .actions-dropdown-menu {
justify-content: space-between;
align-items: flex-start;
gap: 0.5rem;
min-width: 0;
}
.item-card-title {
@@ -1080,6 +1096,7 @@ tr:last-child .actions-dropdown-menu {
-webkit-line-clamp: 1;
-webkit-box-orient: vertical;
overflow: hidden;
min-width: 0;
}
.item-card-title:hover {
@@ -1159,20 +1176,30 @@ tr:last-child .actions-dropdown-menu {
}
@media (max-width: 768px) {
body {
overflow-x: hidden;
}
.public-header {
padding: 1rem 1.5rem;
flex-wrap: wrap;
gap: 1rem;
}
.folders-grid {
grid-template-columns: 1fr;
min-width: 0;
}
.items-grid {
grid-template-columns: 1fr;
min-width: 0;
}
/* Stack vertically so the top bar spans full width above content
instead of becoming a flex item beside it */
.app-container {
display: block;
width: 100%;
overflow-x: hidden;
}
/* Show the mobile top bar */
@@ -1182,6 +1209,7 @@ tr:last-child .actions-dropdown-menu {
/* Sidebar becomes an off-canvas drawer */
.sidebar {
width: min(260px, 86vw);
transform: translateX(-100%);
transition: transform 0.25s ease;
box-shadow: var(--shadow-lg);
@@ -1198,7 +1226,10 @@ tr:last-child .actions-dropdown-menu {
/* Content takes the full width; no reserved sidebar gutter */
.main-wrapper {
margin-left: 0;
padding: 1.5rem 1.25rem;
padding: 1.25rem 1rem;
width: 100%;
max-width: 100%;
overflow-x: hidden;
}
/* Collapse all multi-column layouts to a single column */
@@ -1209,18 +1240,39 @@ tr:last-child .actions-dropdown-menu {
.form-grid--3,
.form-grid--4 {
grid-template-columns: 1fr;
min-width: 0;
}
.detail-main,
.detail-sidebar,
.folder-view-container,
.directory-section,
.card,
.filter-bar,
.data-table-wrapper {
width: 100%;
max-width: 100%;
min-width: 0;
}
.card {
padding: 1rem;
margin-bottom: 1.25rem;
}
/* Search & filter bar stacks vertically with full-width controls */
.filter-bar {
flex-wrap: wrap;
align-items: stretch;
gap: 0.75rem;
padding: 0.75rem;
}
.filter-bar > * {
width: 100%;
}
.filter-bar .filter-select {
width: 100%;
min-width: 0;
}
/* Page header: title and actions stack instead of overflowing */
@@ -1228,6 +1280,168 @@ tr:last-child .actions-dropdown-menu {
flex-direction: column;
align-items: flex-start;
gap: 1rem;
margin-bottom: 1.5rem;
}
.page-title h1,
.folder-title {
font-size: 1.6rem;
overflow-wrap: anywhere;
}
.page-header > div,
.page-header .btn,
.folder-controls > div,
.folder-controls .btn {
max-width: 100%;
}
.btn {
max-width: 100%;
white-space: normal;
}
.status-pill,
.tag-pill {
max-width: 100%;
white-space: normal;
overflow-wrap: anywhere;
}
.item-card-header {
flex-wrap: wrap;
}
.folder-card {
align-items: flex-start;
gap: 0.75rem;
}
.actions-dropdown-menu {
max-width: calc(100vw - 2rem);
}
#toast-container {
left: 1rem;
right: 1rem;
bottom: 1rem;
}
.toast {
width: 100%;
min-width: 0;
max-width: none;
}
.main-wrapper .category-grid,
.main-wrapper .pills-grid {
grid-template-columns: 1fr;
}
.wizard-progress-bar {
max-width: 100%;
}
.wizard-step .step-label {
max-width: 5.5rem;
text-align: center;
font-size: 0.75rem;
}
.data-table-wrapper:has(.data-table--responsive) {
overflow-x: visible;
}
.data-table--responsive,
.data-table--responsive thead,
.data-table--responsive tbody,
.data-table--responsive tr,
.data-table--responsive td {
display: block;
width: 100%;
}
.data-table--responsive thead,
.data-table--responsive thead tr,
.data-table--responsive thead th {
position: absolute;
width: 1px;
height: 1px;
overflow: hidden;
clip: rect(0 0 0 0);
clip-path: inset(50%);
white-space: nowrap;
}
.data-table--responsive thead th {
padding: 0;
border: 0;
}
.data-table--responsive tr {
padding: 0.85rem 1rem;
border-bottom: 1px solid var(--color-border);
}
.data-table--responsive tr:last-child {
border-bottom: none;
}
.data-table--responsive td {
border-bottom: none;
padding: 0.45rem 0;
text-align: left !important;
}
.data-table--responsive td:not([colspan]) {
display: grid;
grid-template-columns: minmax(6.75rem, 36%) minmax(0, 1fr);
gap: 0.75rem;
align-items: start;
}
.data-table--responsive td::before {
content: attr(data-label);
color: var(--color-text-light);
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.05em;
text-transform: uppercase;
}
.data-table--responsive td[colspan]::before {
content: none;
}
.data-table--responsive td > *,
.data-table--responsive td div,
.data-table--responsive td form {
min-width: 0;
}
.data-table--responsive .actions-cell > div {
display: flex !important;
flex-wrap: wrap;
justify-content: flex-start;
gap: 0.5rem;
}
.data-table--responsive .actions-cell .btn {
flex: 0 1 auto;
}
.data-table--responsive td a,
.data-table--responsive td code,
.data-table--responsive td span,
.data-table--responsive td div {
overflow-wrap: anywhere;
}
.data-table--responsive td div[title] {
max-width: 100% !important;
overflow: visible !important;
text-overflow: clip !important;
white-space: normal !important;
}
}
+8 -8
View File
@@ -989,7 +989,7 @@
<!-- Assets Inventory Table -->
<div class="card" style="padding: 0;">
<div class="data-table-wrapper">
<table class="data-table">
<table class="data-table data-table--responsive">
<thead>
<tr>
<th style="width: 80px;">{{T "items.col.qr"}}</th>
@@ -1005,7 +1005,7 @@
{{if .Items}}
{{range .Items}}
<tr class="{{if eq .LifecycleState "removed"}}lifecycle-removed{{else if eq .LifecycleState "archived"}}lifecycle-archived{{end}}">
<td style="text-align: center; vertical-align: middle;">
<td data-label="{{T "items.col.qr"}}" style="text-align: center; vertical-align: middle;">
{{if .ShortSlug}}
<a href="javascript:void(0)" onclick="openQRModal('{{.ShortSlug}}', '{{.Name}}')">
<img src="/admin/qr/{{.ShortSlug}}" alt="QR Label" style="width: 42px; height: 42px; border: 1px solid var(--color-border); padding: 1px; border-radius: 4px; background: white; cursor: pointer;">
@@ -1014,7 +1014,7 @@
<span style="color: var(--color-text-light); font-size: 0.75rem;">--</span>
{{end}}
</td>
<td>
<td data-label="{{T "items.col.name"}}">
<div style="display: flex; flex-direction: column;">
<a href="/admin?view={{.ID}}" style="font-weight: 700; color: var(--color-text-main); text-decoration: none; font-size: 1.05rem;">
{{.Name}}
@@ -1024,7 +1024,7 @@
{{end}}
</div>
</td>
<td>
<td data-label="{{T "items.col.location"}}">
{{if .LocationName.Valid}}
<span style="font-weight: 500; font-size: 0.95rem;">
<a href="/{{.LocationSlug.String}}" style="color: var(--color-brand-primary); text-decoration: none;">{{.LocationName.String}}</a>
@@ -1033,7 +1033,7 @@
<span style="color: var(--color-text-light); font-style: italic; font-size: 0.9rem;">{{T "common.unassigned"}}</span>
{{end}}
</td>
<td>
<td data-label="{{T "items.col.status"}}">
{{if eq .LifecycleState "archived"}}
<span class="status-pill archived">{{T "common.archived"}}</span>
{{else}}
@@ -1042,17 +1042,17 @@
</span>
{{end}}
</td>
<td style="font-weight: 600; font-size: 0.95rem; color: var(--color-text-muted); text-align: center;">
<td data-label="{{T "items.col.quantity"}}" style="font-weight: 600; font-size: 0.95rem; color: var(--color-text-muted); text-align: center;">
{{.Quantity}}
</td>
<td>
<td data-label="{{T "items.col.tags"}}">
<div class="tag-list">
{{range .Tags}}
<a href="/admin?tag={{.ID}}" style="text-decoration: none;"><span class="tag-pill" style="background-color: {{.Color}};">{{.Name}}</span></a>
{{end}}
</div>
</td>
<td class="actions-cell" style="text-align: right;">
<td data-label="{{T "common.actions"}}" class="actions-cell" style="text-align: right;">
<div style="display: inline-flex; gap: 0.5rem; align-items: center;">
{{if eq .LifecycleState "removed"}}
<!-- Soft removed item actions -->
+5 -5
View File
@@ -24,7 +24,7 @@
<div class="detail-main">
<div class="card" style="padding: 0;">
<div class="data-table-wrapper">
<table class="data-table">
<table class="data-table data-table--responsive">
<thead>
<tr>
<th>{{T "locations.col.name"}}</th>
@@ -37,13 +37,13 @@
{{if .Locations}}
{{range .Locations}}
<tr class="{{if eq .LifecycleState "removed"}}lifecycle-removed{{else if eq .LifecycleState "archived"}}lifecycle-archived{{end}}">
<td style="font-weight: 600;">
<td data-label="{{T "locations.col.name"}}" style="font-weight: 600;">
<a href="/{{.Slug}}" style="color: var(--color-brand-primary); text-decoration: none;">{{.Name}}</a>
{{if eq .LifecycleState "archived"}}
<span class="status-pill archived" style="margin-left: 0.5rem; font-size: 0.7rem; padding: 0.1rem 0.4rem;">{{T "common.archived"}}</span>
{{end}}
</td>
<td>
<td data-label="{{T "locations.col.parent"}}">
{{if .ParentName.Valid}}
<span style="color: var(--color-text-muted); font-size: 0.9rem;">
{{.ParentName.String}} &rarr;
@@ -52,8 +52,8 @@
<span style="color: var(--color-text-light); font-size: 0.85rem;">{{T "common.root"}}</span>
{{end}}
</td>
<td style="color: var(--color-text-muted); font-size: 0.9rem;">{{.Description}}</td>
<td class="actions-cell" style="text-align: right;">
<td data-label="{{T "common.description"}}" style="color: var(--color-text-muted); font-size: 0.9rem;">{{.Description}}</td>
<td data-label="{{T "common.actions"}}" class="actions-cell" style="text-align: right;">
<div style="display: inline-flex; gap: 0.5rem; align-items: center;">
{{if eq .ID 1}}
<span style="color: var(--color-text-light); font-size: 0.8rem; font-style: italic; padding: 0.35rem 0.65rem;">{{T "common.locked"}}</span>
+6 -6
View File
@@ -22,7 +22,7 @@
<div class="detail-main">
<div class="card" style="padding: 0;">
<div class="data-table-wrapper">
<table class="data-table">
<table class="data-table data-table--responsive">
<thead>
<tr>
<th>{{T "shortener.col.slug"}}</th>
@@ -36,7 +36,7 @@
{{if .Links}}
{{range .Links}}
<tr class="{{if eq .LifecycleState "removed"}}lifecycle-removed{{else if eq .LifecycleState "archived"}}lifecycle-archived{{end}}">
<td>
<td data-label="{{T "shortener.col.slug"}}">
<div style="display: flex; flex-direction: column; gap: 0.15rem;">
<div style="display: flex; align-items: center; gap: 0.35rem;">
<a href="/s/{{.Slug}}" target="_blank" style="font-weight: 700; color: var(--color-brand-primary); text-decoration: none;">
@@ -52,12 +52,12 @@
</a>
</div>
</td>
<td>
<td data-label="{{T "shortener.col.target_url"}}">
<div style="max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-family: monospace; font-size: 0.85rem;" title="{{.URL}}">
{{.URL}}
</div>
</td>
<td>
<td data-label="{{T "shortener.col.link_type"}}">
{{if .ItemID.Valid}}
<span style="font-size: 0.8rem; font-weight: 600; color:#065f46; background-color:#d1fae5; padding: 0.2rem 0.5rem; border-radius: 4px;">
{{T "shortener.asset_link"}} #{{.ItemID.Int64}}
@@ -68,10 +68,10 @@
</span>
{{end}}
</td>
<td style="text-align: center; font-weight: 600; font-size: 0.95rem; color: var(--color-text-muted);">
<td data-label="{{T "shortener.col.clicks"}}" style="text-align: center; font-weight: 600; font-size: 0.95rem; color: var(--color-text-muted);">
{{.Clicks}}
</td>
<td class="actions-cell" style="text-align: right;">
<td data-label="{{T "common.actions"}}" class="actions-cell" style="text-align: right;">
{{if .ItemID.Valid}}
<!-- Asset link modifications are handled through items CRUD -->
<span style="color: var(--color-text-light); font-size: 0.85rem; font-style: italic;">{{T "shortener.managed_by_asset"}}</span>
+5 -5
View File
@@ -22,7 +22,7 @@
<div class="detail-main">
<div class="card" style="padding: 0;">
<div class="data-table-wrapper">
<table class="data-table">
<table class="data-table data-table--responsive">
<thead>
<tr>
<th style="width: 150px;">{{T "tags.col.tag"}}</th>
@@ -35,7 +35,7 @@
{{if .Tags}}
{{range .Tags}}
<tr class="{{if eq .LifecycleState "removed"}}lifecycle-removed{{else if eq .LifecycleState "archived"}}lifecycle-archived{{end}}">
<td>
<td data-label="{{T "tags.col.tag"}}">
<span class="tag-pill" style="background-color: {{.Color}}; color: #1c1917; padding: 0.35rem 0.75rem; font-size: 0.85rem;">
{{.Name}}
</span>
@@ -43,13 +43,13 @@
<span class="status-pill archived" style="margin-left: 0.5rem; font-size: 0.7rem; padding: 0.1rem 0.4rem;">{{T "common.archived"}}</span>
{{end}}
</td>
<td>
<td data-label="{{T "tags.col.color"}}">
<code style="font-family: monospace; font-size: 0.9rem; background-color: var(--color-bg-base); padding: 0.15rem 0.35rem; border-radius: 4px; border: 1px solid var(--color-border);">
{{.Color}}
</code>
</td>
<td style="color: var(--color-text-muted); font-size: 0.9rem;">{{.Description}}</td>
<td class="actions-cell" style="text-align: right;">
<td data-label="{{T "common.description"}}" style="color: var(--color-text-muted); font-size: 0.9rem;">{{.Description}}</td>
<td data-label="{{T "common.actions"}}" class="actions-cell" style="text-align: right;">
<div style="display: inline-flex; gap: 0.5rem; align-items: center;">
{{if eq .Name "Default Room"}}
<span style="color: var(--color-text-light); font-size: 0.8rem; font-style: italic; padding: 0.35rem 0.65rem;">{{T "common.locked"}}</span>
+2
View File
@@ -1,3 +1,5 @@
//go:build ignore
package main
import (
+2
View File
@@ -1,3 +1,5 @@
//go:build ignore
package main
import (
+2
View File
@@ -1,3 +1,5 @@
//go:build ignore
package main
import (