Add responsive mobile layouts and navigation
This commit is contained in:
@@ -442,7 +442,7 @@
|
||||
|
||||
.kv-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr));
|
||||
gap: var(--space-3);
|
||||
}
|
||||
.kv {
|
||||
@@ -555,7 +555,11 @@
|
||||
|
||||
.dlg-actions { display: flex; gap: var(--space-2); justify-content: flex-end; }
|
||||
|
||||
@media (max-width: 720px) {
|
||||
@media (max-width: 1000px) {
|
||||
.version-row { grid-template-columns: 1fr; }
|
||||
}
|
||||
@media (max-width: 720px) {
|
||||
.panel-head, .head-actions, .dlg-actions { flex-wrap: wrap; }
|
||||
.dlg { padding: var(--space-4); }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -241,7 +241,7 @@
|
||||
.editor-fields { display: grid; gap: 12px; padding: 6px 16px 16px; }
|
||||
.fields, .add-row { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; }
|
||||
.add-row label { flex: 1 1 220px; }
|
||||
label { display: grid; gap: 7px; flex: 1 1 180px; font-size: 12px; color: var(--text-secondary); }
|
||||
label { display: grid; gap: 7px; flex: 1 1 180px; min-width: 0; font-size: 12px; color: var(--text-secondary); }
|
||||
input, select, button { color: var(--text-primary); background: var(--surface-sunken); border: 1px solid var(--border-strong); border-radius: 6px; padding: 10px 12px; min-width: 0; font: inherit; }
|
||||
input, select { width: 100%; font-size: 13px; min-height: 40px; box-sizing: border-box; }
|
||||
button { cursor: pointer; }
|
||||
|
||||
@@ -99,5 +99,14 @@
|
||||
.eyebrow { display: block; color: var(--text-secondary); font-size: 10px; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 8px; } h2, h3, p { margin: 0; } h2 { font-size: 25px; letter-spacing: -.03em; } h3 { font-size: 16px; }.muted { color: var(--text-secondary); font-size: 13px; line-height: 1.6; }
|
||||
form, .lineup { display: grid; gap: 18px; }.identity { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; } label { display: grid; gap: 7px; font-size: 12px; min-width: 0; } input, select { width: 100%; min-width: 0; box-sizing: border-box; padding: 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface-sunken); color: inherit; font: inherit; }
|
||||
.lineup { border-block: 1px solid var(--border-subtle); padding: 20px 0; }.map-row { display: grid; grid-template-columns: 24px 1fr 1.5fr 80px 24px; gap: 12px; align-items: end; padding: 14px; background: var(--surface-sunken); border-radius: 10px; }.number { font-family: var(--font-mono); font-size: 11px; color: var(--text-secondary); align-self: center; }.count { font-size: 12px; padding: 6px 10px; border: 1px solid var(--border-strong); border-radius: 99px; }.close, .remove { background: none; border: 0; color: var(--text-secondary); font-size: 25px; cursor: pointer; }.remove { padding: 7px 0; }.error { color: var(--state-danger); font-size: 13px; }button:disabled { opacity: .5; cursor: default; }
|
||||
@media (max-width: 620px) { .builder { padding: 20px; }.identity { grid-template-columns: 1fr; }.map-row { grid-template-columns: 1fr 85px 25px; }.number { display: none; }.map-row label:first-of-type { grid-column: 1 / -1; }.actions { align-items: stretch; flex-direction: column; } }
|
||||
@media (max-width: 620px) {
|
||||
.builder { padding: 20px; }
|
||||
header { display: grid; grid-template-columns: minmax(0, 1fr) 44px; align-items: start; }
|
||||
.close, .remove { min-width: 44px; }
|
||||
.identity { grid-template-columns: 1fr; }
|
||||
.map-row { grid-template-columns: minmax(0, 1fr) 44px; }
|
||||
.number { display: none; }
|
||||
.map-row label:first-of-type, .map-row label:nth-of-type(2) { grid-column: 1 / -1; }
|
||||
.actions { align-items: stretch; flex-direction: column; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -170,6 +170,7 @@
|
||||
}
|
||||
.tabs {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 6px;
|
||||
align-items: center;
|
||||
border-bottom: 1px solid var(--border);
|
||||
@@ -273,4 +274,7 @@
|
||||
font-size: var(--text-mono-sm);
|
||||
text-align: right;
|
||||
}
|
||||
@media (max-width: 640px) {
|
||||
.right { width: 100%; margin-left: 0; flex-wrap: wrap; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -30,6 +30,8 @@
|
||||
{:else if !roster || roster.length === 0}
|
||||
<div class="state empty">lobby is empty</div>
|
||||
{:else}
|
||||
<!-- svelte-ignore a11y_no_noninteractive_tabindex (Keyboard users need to scroll the table.) -->
|
||||
<div class="table-scroll" role="region" aria-label="Player roster" tabindex="0">
|
||||
<table class="roster" class:compact>
|
||||
<thead>
|
||||
<tr>
|
||||
@@ -52,9 +54,13 @@
|
||||
{/each}
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
{/if}
|
||||
|
||||
<style>
|
||||
.table-scroll { max-width: 100%; overflow-x: auto; }
|
||||
.table-scroll:focus-visible { box-shadow: var(--focus-ring); }
|
||||
.roster:not(.compact) { min-width: 520px; }
|
||||
.state {
|
||||
font-family: var(--font-mono);
|
||||
font-size: var(--text-mono);
|
||||
|
||||
@@ -65,7 +65,7 @@
|
||||
.v-warning .dot { background: var(--state-warning); }
|
||||
.v-danger .dot { background: var(--state-danger); }
|
||||
.v-info .dot { background: var(--accent-primary); }
|
||||
.msg { flex: 1; }
|
||||
.msg { flex: 1; min-width: 0; overflow-wrap: anywhere; }
|
||||
.close {
|
||||
appearance: none;
|
||||
background: transparent;
|
||||
@@ -80,4 +80,8 @@
|
||||
}
|
||||
.close:hover { color: var(--text-primary); }
|
||||
.close:focus-visible { outline: none; box-shadow: var(--focus-ring); }
|
||||
@media (max-width: 720px) {
|
||||
.toaster { left: max(16px, env(safe-area-inset-left)); right: max(16px, env(safe-area-inset-right)); bottom: calc(16px + env(safe-area-inset-bottom)); max-width: none; }
|
||||
.close { min-width: 44px; flex-shrink: 0; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -39,6 +39,9 @@
|
||||
color: var(--text-tertiary);
|
||||
}
|
||||
.crumbs li {
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
overflow-wrap: anywhere;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
|
||||
@@ -72,6 +72,7 @@
|
||||
|
||||
<style>
|
||||
.btn {
|
||||
max-width: 100%;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
@@ -159,4 +160,7 @@
|
||||
animation: spin 0.7s linear infinite;
|
||||
}
|
||||
@keyframes spin { to { transform: rotate(360deg); } }
|
||||
@media (max-width: 720px) {
|
||||
.btn { white-space: normal; line-height: 1.35; }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -51,6 +51,7 @@
|
||||
|
||||
<style>
|
||||
.card {
|
||||
min-width: 0;
|
||||
position: relative;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
@@ -107,4 +108,7 @@
|
||||
box-shadow: var(--focus-ring), var(--shadow-raised);
|
||||
}
|
||||
.e-interactive:active { transform: translateY(-1px); }
|
||||
@media (max-width: 480px) {
|
||||
.p-md, .p-lg { padding: var(--space-4); }
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -74,12 +74,15 @@
|
||||
}
|
||||
.actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: var(--space-2);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.s-lg .title { font-size: var(--text-2xl); }
|
||||
.s-md .title { font-size: var(--text-xl); }
|
||||
.row { flex-direction: column; align-items: flex-start; gap: var(--space-4); }
|
||||
.actions { width: 100%; }
|
||||
}
|
||||
|
||||
@@ -50,6 +50,8 @@
|
||||
|
||||
<style>
|
||||
.wrap {
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
position: relative;
|
||||
display: block;
|
||||
}
|
||||
|
||||
@@ -44,6 +44,9 @@
|
||||
|
||||
<style>
|
||||
.tabs {
|
||||
min-width: 0;
|
||||
max-width: 100%;
|
||||
overflow-x: auto;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 2px;
|
||||
@@ -53,6 +56,8 @@
|
||||
border: 1px solid var(--border-subtle);
|
||||
}
|
||||
.tab {
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
appearance: none;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
|
||||
Reference in New Issue
Block a user