Skip to content

Commit bad90e1

Browse files
authored
Merge pull request #30 from Mazizova/contribute-page-redesign
Redesign the Suggest a Resource page
2 parents c60b462 + 84a66b0 commit bad90e1

3 files changed

Lines changed: 490 additions & 144 deletions

File tree

‎assets/scss/_light-theme.scss‎

Lines changed: 23 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -278,16 +278,35 @@
278278
}
279279
}
280280

281-
.contribute-fm-block {
282-
background: #f8f9fc;
281+
.contribute-list,
282+
.contribute-subcat-list { color: #334155; }
283+
284+
.contribute-tags-table {
283285
border-color: #dde3ed;
284286
}
285287

286-
.contribute-fm-label {
287-
color: #94a3b8;
288+
.contribute-tags-row {
288289
border-bottom-color: #dde3ed;
290+
291+
> span:first-child { color: #64748b; }
289292
}
290293

294+
.contribute-category-item {
295+
background: #f8f9fc;
296+
border-color: #dde3ed;
297+
298+
&[open] { border-color: rgba(0, 200, 255, 0.35); }
299+
300+
summary {
301+
color: #0f172a;
302+
&:hover { color: #0272a5; }
303+
}
304+
305+
&[open] summary { border-bottom-color: #dde3ed; }
306+
}
307+
308+
.contribute-accordion-chevron { color: #94a3b8; }
309+
291310
.contribute-method-badge {
292311
color: #0272a5;
293312
background: rgba(0, 200, 255, 0.06);

‎assets/scss/_resources.scss‎

Lines changed: 80 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1262,26 +1262,13 @@ body.sheet-open {
12621262
}
12631263
}
12641264

1265-
.contribute-types {
1266-
display: flex;
1267-
flex-direction: column;
1268-
gap: 0.375rem;
1269-
margin-top: 1.25rem;
1270-
}
1271-
1272-
.contribute-type-item {
1273-
font-size: 0.9375rem;
1274-
color: $muted;
1275-
line-height: 1.5;
1276-
1277-
strong { color: $off-white; font-weight: 600; }
1278-
}
1279-
12801265
.contribute-lead {
12811266
font-size: 1.125rem;
12821267
color: $muted;
12831268
line-height: 1.7;
1284-
margin: 0;
1269+
margin: 0 0 1rem;
1270+
1271+
&:last-child { margin-bottom: 0; }
12851272
}
12861273

12871274
.contribute-methods {
@@ -1378,29 +1365,12 @@ body.sheet-open {
13781365
.contribute-example-bad { color: $muted; text-decoration: line-through; }
13791366
}
13801367

1381-
.contribute-frontmatter {
1382-
display: grid;
1383-
grid-template-columns: repeat(auto-fit, #{"min(100%, 360px)"});
1384-
gap: 1rem;
1385-
margin-bottom: 1.5rem;
1386-
}
1387-
1388-
.contribute-fm-block {
1389-
background: $dark-bg;
1390-
border: 1px solid $dark-border;
1391-
border-radius: 8px;
1392-
overflow: hidden;
1393-
1394-
pre { margin: 0; border: none; border-radius: 0; }
1395-
}
1368+
.contribute-list {
1369+
padding-left: 1.25rem;
1370+
color: $off-white;
1371+
margin: 0 0 1.25rem;
13961372

1397-
.contribute-fm-label {
1398-
font-size: 0.75rem;
1399-
font-weight: 600;
1400-
color: $muted;
1401-
padding: 0.5rem 1.25rem;
1402-
border-bottom: 1px solid $dark-border;
1403-
letter-spacing: 0.04em;
1373+
li { margin-bottom: 0.375rem; }
14041374
}
14051375

14061376
.contribute-tags-table {
@@ -1491,6 +1461,74 @@ body.sheet-open {
14911461
a { color: $accent; }
14921462
}
14931463

1464+
// ── "Choose a category" accordion (contribute page, Option 2 — Advanced) ──
1465+
// Native <details>/<summary> — no JS needed, closed by default so a visitor
1466+
// sees only the 7 category names until they pick one.
1467+
1468+
.contribute-category-accordion {
1469+
display: flex;
1470+
flex-direction: column;
1471+
gap: 0.625rem;
1472+
margin: 1rem 0 1.5rem;
1473+
}
1474+
1475+
.contribute-category-item {
1476+
border: 1px solid $dark-border;
1477+
border-radius: 10px;
1478+
background: $dark-surface;
1479+
overflow: hidden;
1480+
1481+
&[open] { border-color: rgba($accent, 0.3); }
1482+
1483+
summary {
1484+
display: flex;
1485+
align-items: center;
1486+
justify-content: space-between;
1487+
gap: 1rem;
1488+
padding: 1rem 1.25rem;
1489+
cursor: pointer;
1490+
list-style: none;
1491+
font-size: 1rem;
1492+
font-weight: 600;
1493+
color: $white;
1494+
1495+
&::-webkit-details-marker { display: none; }
1496+
1497+
&:hover { color: $accent; }
1498+
}
1499+
1500+
&[open] summary {
1501+
border-bottom: 1px solid $dark-border;
1502+
}
1503+
1504+
.contribute-accordion-chevron {
1505+
flex: none;
1506+
color: $muted;
1507+
transition: transform 0.15s ease;
1508+
}
1509+
1510+
&[open] .contribute-accordion-chevron {
1511+
transform: rotate(180deg);
1512+
}
1513+
}
1514+
1515+
.contribute-category-body {
1516+
padding: 1.25rem 1.25rem 1.5rem;
1517+
1518+
h3:first-child { margin-top: 0; }
1519+
}
1520+
1521+
.contribute-subcat-list {
1522+
display: grid;
1523+
grid-template-columns: repeat(2, 1fr);
1524+
gap: 0.25rem 1.5rem;
1525+
padding-left: 1.25rem;
1526+
color: $off-white;
1527+
margin: 0 0 1.25rem;
1528+
1529+
li { margin-bottom: 0.375rem; font-size: 0.9375rem; }
1530+
}
1531+
14941532
@media (max-width: $break-md) {
14951533
.contribute-issue-card {
14961534
grid-template-columns: 1fr auto;
@@ -1502,6 +1540,10 @@ body.sheet-open {
15021540
grid-template-columns: 1fr;
15031541
gap: 0.375rem;
15041542
}
1543+
1544+
.contribute-subcat-list {
1545+
grid-template-columns: 1fr;
1546+
}
15051547
}
15061548

15071549
// ── Resource detail card (Software & Tools / SaaS & Cloud Solutions / Services) ──

0 commit comments

Comments
 (0)