Refactor homepage for mobile: add discover/quick-start layout and responsive styles #1
@@ -632,6 +632,104 @@ img, picture { display: block; max-width: 100%; height: auto; }
|
||||
}
|
||||
.hero-card__body { padding: 18px; display: grid; gap: 10px; }
|
||||
|
||||
.sr-only {
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
height: 1px;
|
||||
padding: 0;
|
||||
margin: -1px;
|
||||
overflow: hidden;
|
||||
clip: rect(0, 0, 0, 0);
|
||||
white-space: nowrap;
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.discover-shell {
|
||||
max-width: 1200px;
|
||||
margin: 24px auto 40px;
|
||||
display: grid;
|
||||
grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
|
||||
gap: 24px;
|
||||
align-items: stretch;
|
||||
}
|
||||
.discover-shell__main,
|
||||
.tag-panel,
|
||||
.empty-state,
|
||||
.quick-start {
|
||||
background: var(--surface);
|
||||
border: 1px solid var(--stroke);
|
||||
border-radius: var(--radius);
|
||||
box-shadow: var(--shadow);
|
||||
}
|
||||
.discover-shell__main {
|
||||
padding: 22px;
|
||||
display: grid;
|
||||
gap: 18px;
|
||||
}
|
||||
.section-header--stack {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
text-align: left;
|
||||
}
|
||||
.discover-search {
|
||||
margin: 0;
|
||||
}
|
||||
.discover-stats {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(3, minmax(0, 1fr));
|
||||
gap: 12px;
|
||||
}
|
||||
.discover-stat {
|
||||
padding: 14px;
|
||||
background: var(--panel);
|
||||
border: 1px solid var(--stroke);
|
||||
border-radius: 14px;
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
}
|
||||
.discover-stat strong {
|
||||
font-size: clamp(1.1rem, 2vw, 1.5rem);
|
||||
}
|
||||
.discover-stat span {
|
||||
color: var(--muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
.tag-panel {
|
||||
padding: 16px;
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
box-shadow: none;
|
||||
border-radius: 16px;
|
||||
}
|
||||
.tag-panel__head {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
.tag-panel__head h3 {
|
||||
margin: 0;
|
||||
}
|
||||
.tag-row--panel {
|
||||
margin-top: 0;
|
||||
}
|
||||
.quick-start {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto 40px;
|
||||
padding: 22px;
|
||||
display: grid;
|
||||
gap: 18px;
|
||||
}
|
||||
.empty-state {
|
||||
padding: 22px;
|
||||
display: grid;
|
||||
gap: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
.empty-state h3,
|
||||
.empty-state p {
|
||||
margin: 0;
|
||||
}
|
||||
.section-header {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto 12px;
|
||||
@@ -824,6 +922,40 @@ img, picture { display: block; max-width: 100%; height: auto; }
|
||||
#backToTop.show { opacity: 1; transform: translateY(0); }
|
||||
#backToTop:hover { background: var(--panel-2); }
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.discover-shell {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 16px;
|
||||
margin: 16px auto 32px;
|
||||
}
|
||||
|
||||
.discover-shell__main,
|
||||
.quick-start,
|
||||
.coming-features,
|
||||
.empty-state {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.discover-stats {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.tag-panel__head {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.discover-shell__main,
|
||||
.quick-start,
|
||||
.coming-features,
|
||||
.empty-state,
|
||||
.tag-panel {
|
||||
padding: 14px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ══════════════════════════════════════════════════════════════════
|
||||
RESPONSIVE
|
||||
══════════════════════════════════════════════════════════════════ */
|
||||
|
||||
Reference in New Issue
Block a user
The new "Quick start" block promises the shortest path from craving to plate, but
array_slice($recipes, 0, 3)just reuses whatever orderfilter_recipes()returned. In the current catalog,data/recipes.jsonputs the 60-minute tagliatelle before the 30-minute steak, so this section already highlights a slower recipe ahead of a faster one; any catalog order change will keep producing misleading "quick" recommendations.Useful? React with 👍 / 👎.