gitoria

jukebox

All repositories: gitoria

ReadmeCodePull requestsReleasesTicketsSettings
Commitb264e5deb264e5deRecords: P1 icons stopmreb264e5de/theme/shell/content-first.hl

1.4 KB

  1. // content-first.hl — SHELL 1, the regular app: a sidebar and the main content (docs/layouts/content-first.md).
  2. // Phone: the main content; the sidebar is the overlay the header's toggle opens. 60rem+: sidebar and main side by side,
  3. // both inside the centred content column (--layout-column) the header's contents are flush with.
  4. //
  5. // ContentFirst {
  6. // Sidebar { nav { a { href = "/" "Home" } } }
  7. // main { h1 { "Title" } p { "…" } }
  8. // }
  9. //
  10. // Without a Sidebar, or with `Sidebar { desktop = "false" }`, main takes the whole column on desktop.
  11. slot = null
  12. Style {
  13. contentFirst {
  14. display = 'block'
  15. paddingInline = 'max(var(--layout-gutter), calc((100% - var(--layout-column)) / 2))'
  16. paddingTop = '1rem'
  17. paddingBottom = '3rem'
  18. '> main' {
  19. display = 'block'
  20. minWidth = '0'
  21. }
  22. @media {
  23. minWidth = '60rem'
  24. display = 'grid'
  25. gridTemplateColumns = 'var(--layout-sidebar) minmax(0, 1fr)'
  26. gap = '3rem'
  27. alignItems = 'start'
  28. paddingTop = '1.5rem'
  29. '> app-sidebar' {
  30. position = 'sticky'
  31. top = 'calc(var(--layout-header) + 1.5rem)'
  32. maxHeight = 'calc(100dvh - var(--layout-header) - 3rem)'
  33. overflowY = 'auto'
  34. marginLeft = '-.75rem'
  35. }
  36. }
  37. }
  38. // Keep the whole selector for :has condition.
  39. 'content-first:not(:has(> app-sidebar:not(.mobile-only)))' {
  40. @media {
  41. minWidth = '60rem'
  42. gridTemplateColumns = 'minmax(0, 1fr)'
  43. }
  44. }
  45. }
  46. View {
  47. contentFirst { slot }
  48. }

Branches

Latest commits

  • b264e5deRecords: P1 icons stopmre
  • 514d7cbeRecords: mission 008 startedmre
  • 61c40127Mission 008: #19 + #21mre
  • 6dcaeb46Records: resetKey planmre
  • c5dbf2ecRecords: R2 resultmre
  • 956069b8Records: R1 result, mission 007mre
  • 3c8a2e12Mission 007: #20 sort scrollmre
  • deb8cef5Records: mission 006 startedmre
  • 4f0ad42fMission 006: jukebox#20mre
  • 800cae06Records: #21 planmre
  • 64bc7823Records: #21 causemre
  • 76639655Records: B1 questionmre
  • d7906b36Records: mission 005 startedmre
  • d3df773cMission 005: doc linemre
  • 6a5d840aMission 005: jukebox#22mre
  • 13e5e748Records: mission 004 startedmre
  • a8098271Mission 004: jukebox#21mre
  • df8f5205Records: jukebox#19-21, #11 closedmre
  • b7a4e692Records: hybriel#298mre
  • 9bcbb017Records: day38b waits for day39 fixmre