rockcampbell.com/static/css/custom.css
Rock Campbell 9b37504988 Redesign homepage: Explore dropdown nav + paginated post list with summaries
- Replace Tags nav item with an Explore dropdown containing Tags, Site Index,
  and all tool subpages (Status, Flights, Volleyball Score, Pixel Art, ASCII Art)
- Limit homepage to 8 posts per page with pagination controls
- Show frontmatter description as post excerpt (more useful than auto-summary
  for Morning Brief posts with similar titles)
- Custom CSS for dropdown panel (hover + focus-within for keyboard/touch)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-10 18:13:14 +00:00

92 lines
1.9 KiB
CSS

/* ── Explore dropdown nav ── */
/* Wrapper li needs relative positioning for the dropdown panel */
.nav-has-dropdown {
position: relative;
}
/* Show the dropdown on hover (desktop) and when focus is inside (keyboard/touch) */
.nav-has-dropdown:hover .nav-dropdown,
.nav-has-dropdown:focus-within .nav-dropdown {
display: block;
}
/* Dropdown panel */
.nav-dropdown {
display: none;
position: absolute;
top: calc(100% + 4px);
right: 0;
min-width: 180px;
list-style: none;
margin: 0;
padding: 6px 0;
background: var(--color-surface);
border: 1px solid var(--color-border);
border-radius: 4px;
box-shadow: 0 4px 16px rgba(44, 36, 22, 0.10);
z-index: 200;
}
.nav-dropdown li {
display: block;
}
.nav-dropdown a {
display: block;
padding: 7px 16px;
font-size: 15px;
color: var(--color-secondary);
white-space: nowrap;
text-decoration: none;
transition: background 100ms ease, color 100ms ease;
}
.nav-dropdown a:hover {
background: var(--color-neutral);
color: var(--color-primary);
}
/* Subtle arrow nudge so it's clear it's a dropdown trigger */
.nav-arrow {
font-size: 11px;
opacity: 0.6;
vertical-align: middle;
}
/* ── Homepage post list improvements ── */
/* Slightly more breathing room between entries */
.post-list__entry {
padding-bottom: 1.4rem;
margin-bottom: 1.4rem;
}
/* Description/excerpt text under each post title */
.post-list__excerpt {
margin-top: 0.3rem;
font-size: 0.9rem;
color: var(--color-secondary);
line-height: 1.55;
}
/* Pagination controls at bottom of homepage */
.post-list-pagination {
display: flex;
justify-content: space-between;
align-items: center;
padding-top: 1.5rem;
border-top: 1px solid var(--color-border);
font-size: 0.875rem;
color: var(--color-tertiary);
}
.post-list-pagination a {
color: var(--color-accent);
text-decoration: none;
font-weight: 500;
}
.post-list-pagination a:hover {
text-decoration: underline;
}