Improve responsive layouts and streamline page loading
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 8m58s
All checks were successful
Deploy MineGeo to Dokploy / deploy (push) Successful in 8m58s
This commit is contained in:
261
app/polish.css
261
app/polish.css
@@ -28,6 +28,12 @@ select:focus-visible {
|
||||
font-style: normal;
|
||||
font-display: swap;
|
||||
}
|
||||
/* Fallback for user-provided Cyrillic names on English pages. */
|
||||
h1,
|
||||
h2,
|
||||
h3 {
|
||||
font-family: MineGeoPixel, MineGeoPixelCyrillic, monospace;
|
||||
}
|
||||
html[lang="ru"] h1,
|
||||
html[lang="ru"] h2,
|
||||
html[lang="ru"] h3,
|
||||
@@ -127,7 +133,7 @@ html[lang="ru"] .mode-row h3 span {
|
||||
}
|
||||
/* Keep catalog cards readable instead of squeezing long map names. */
|
||||
.cards-grid {
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
|
||||
grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
|
||||
}
|
||||
.map-card .card-body .map-credit {
|
||||
display: block;
|
||||
@@ -251,6 +257,259 @@ html[lang="ru"] .mode-row h3 span {
|
||||
gap: 20px;
|
||||
margin: 24px 0 32px;
|
||||
}
|
||||
|
||||
/* Shared layout repairs: readable content, predictable cards, and touch targets. */
|
||||
:is(a, button, input, select, textarea, summary):focus-visible {
|
||||
outline: 2px solid var(--green);
|
||||
outline-offset: 4px;
|
||||
}
|
||||
.page-content > h1 {
|
||||
text-wrap: balance;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.lead {
|
||||
text-wrap: pretty;
|
||||
}
|
||||
.map-card {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
min-width: 0;
|
||||
}
|
||||
.map-card .card-body {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
padding: 20px;
|
||||
gap: 12px;
|
||||
}
|
||||
.map-card .card-body .eyebrow {
|
||||
font: 11px/1.5 monospace;
|
||||
margin: 0;
|
||||
}
|
||||
.map-card .card-body h3,
|
||||
html[lang="ru"] .map-card .card-body h3 {
|
||||
font:
|
||||
400 18px/1.6 MineGeoPixelCyrillic,
|
||||
monospace;
|
||||
letter-spacing: -0.3px;
|
||||
text-shadow: none;
|
||||
min-height: 4.8em;
|
||||
margin: 0;
|
||||
gap: 12px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
.map-card .card-body h3 > span {
|
||||
display: -webkit-box;
|
||||
-webkit-line-clamp: 3;
|
||||
-webkit-box-orient: vertical;
|
||||
overflow: hidden;
|
||||
min-width: 0;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.map-card .card-body h3 svg {
|
||||
margin-top: 4px;
|
||||
}
|
||||
.map-card .card-body p {
|
||||
font-size: 13px;
|
||||
line-height: 1.65;
|
||||
margin: 0;
|
||||
min-height: 3.3em;
|
||||
}
|
||||
.map-card .card-body .map-credit {
|
||||
margin-top: auto;
|
||||
padding-top: 4px;
|
||||
}
|
||||
.map-card .card-meta {
|
||||
font-size: 11px;
|
||||
gap: 8px;
|
||||
padding-top: 14px;
|
||||
}
|
||||
.catalog-count {
|
||||
margin: 0 0 20px;
|
||||
font-size: 13px;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.catalog-empty {
|
||||
padding: 36px 20px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 16px;
|
||||
}
|
||||
.catalog-empty p {
|
||||
margin: 0;
|
||||
}
|
||||
.catalog-controls .tabs button {
|
||||
min-height: 44px;
|
||||
}
|
||||
.map-back-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
color: var(--muted);
|
||||
margin-bottom: 28px;
|
||||
min-height: 32px;
|
||||
}
|
||||
.map-back-link:hover {
|
||||
color: var(--green);
|
||||
}
|
||||
.map-detail-page .map-detail-title {
|
||||
font-family: MineGeoPixelCyrillic, monospace;
|
||||
font-size: clamp(24px, 3vw, 34px);
|
||||
line-height: 1.5;
|
||||
max-width: 30ch;
|
||||
text-wrap: pretty;
|
||||
}
|
||||
.map-detail-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin: 16px 0;
|
||||
}
|
||||
.map-detail-actions .map-export {
|
||||
margin: 0;
|
||||
}
|
||||
.map-detail-id {
|
||||
font-size: 12px;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.detail-grid > * {
|
||||
min-width: 0;
|
||||
}
|
||||
.start-panel .difficulty-options button {
|
||||
min-width: 0;
|
||||
overflow-wrap: anywhere;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.detail-grid .card-meta span:last-child {
|
||||
display: flex;
|
||||
}
|
||||
.stat-cube.void-cube {
|
||||
background: #9e6bc4;
|
||||
border-color: #cca6ef;
|
||||
}
|
||||
.mode-row:has(.void-cube) {
|
||||
border-color: #9163b080;
|
||||
}
|
||||
.world-stats strong,
|
||||
.card-meta {
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
.loading-surface {
|
||||
background: var(--panel2);
|
||||
border: 1px solid var(--line);
|
||||
border-radius: var(--radius-control);
|
||||
}
|
||||
.loading-title {
|
||||
width: min(440px, 75%);
|
||||
height: 48px;
|
||||
margin: 24px 0 36px;
|
||||
}
|
||||
.loading-card {
|
||||
height: 420px;
|
||||
}
|
||||
.route-loading {
|
||||
min-height: 85dvh;
|
||||
}
|
||||
.leaderboard-preview-placeholder {
|
||||
min-height: 420px;
|
||||
}
|
||||
.leaderboard-preview-placeholder .loading-surface {
|
||||
height: 240px;
|
||||
}
|
||||
@media (max-width: 960px) {
|
||||
.map-detail-page .detail-grid {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
}
|
||||
.detail-grid > div:first-child {
|
||||
width: 100%;
|
||||
max-width: 520px;
|
||||
margin-inline: auto;
|
||||
}
|
||||
.start-panel .difficulty-options {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
}
|
||||
@media (min-width: 701px) and (max-width: 960px) {
|
||||
.home-page .hero {
|
||||
grid-template-columns: minmax(0, 1fr);
|
||||
gap: 32px;
|
||||
}
|
||||
.hero-copy {
|
||||
max-width: 620px;
|
||||
}
|
||||
.home-page .hero h1 {
|
||||
font-size: clamp(40px, 5.8vw, 54px);
|
||||
line-height: 1.12;
|
||||
text-wrap: balance;
|
||||
}
|
||||
.hero-art {
|
||||
min-height: 350px;
|
||||
width: 100%;
|
||||
max-width: 440px;
|
||||
margin-inline: auto;
|
||||
}
|
||||
.hero-art .compass-art {
|
||||
right: calc(50% - 150px);
|
||||
top: 0;
|
||||
}
|
||||
}
|
||||
@media (max-width: 600px) {
|
||||
.section.page-content {
|
||||
padding: 32px 20px 48px;
|
||||
}
|
||||
.catalog-search {
|
||||
width: 100%;
|
||||
}
|
||||
.catalog-search .search-field {
|
||||
min-height: 46px;
|
||||
padding-inline: 12px;
|
||||
}
|
||||
.catalog-search input {
|
||||
font-size: 16px;
|
||||
}
|
||||
.catalog-controls {
|
||||
gap: 16px;
|
||||
}
|
||||
.catalog-controls .tabs {
|
||||
gap: 4px;
|
||||
}
|
||||
.catalog-controls .tabs button {
|
||||
padding-inline: 10px;
|
||||
}
|
||||
.map-card .card-body {
|
||||
padding: 18px;
|
||||
}
|
||||
.map-detail-page .map-detail-title {
|
||||
font-size: 22px;
|
||||
}
|
||||
.map-back-link {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.detail-grid {
|
||||
gap: 28px;
|
||||
margin-top: 28px;
|
||||
}
|
||||
.detail-grid .start-panel {
|
||||
padding: 20px;
|
||||
}
|
||||
.start-panel .difficulty-options {
|
||||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||||
}
|
||||
.start-panel .difficulty-options span {
|
||||
font-size: 12px;
|
||||
}
|
||||
.hero-actions {
|
||||
align-items: stretch;
|
||||
}
|
||||
.hero-actions > .button {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.moderator-setting-row {
|
||||
display: flex;
|
||||
gap: 24px;
|
||||
|
||||
Reference in New Issue
Block a user