|
| 1 | +body { |
| 2 | + display: flex; |
| 3 | + flex-direction: column; |
| 4 | + min-height: 100vh; |
| 5 | +} |
| 6 | + |
| 7 | +main { |
| 8 | + min-height: 0; |
| 9 | + flex: 1 0 auto; |
| 10 | +} |
| 11 | + |
| 12 | +.article.content { |
| 13 | + /* Override 100vh from myst-theme:styles/typography.css so content div |
| 14 | + * doesn't grow <main> to push the footer offscreen. |
| 15 | + */ |
| 16 | + min-height: 0; |
| 17 | +} |
| 18 | + |
| 19 | +.footer { |
| 20 | + /* Make footer "sticky" to page bottom (also the above flex rules), per |
| 21 | + * the flexbox strategy described here: |
| 22 | + * https://css-tricks.com/couple-takes-sticky-footer/#aa-there-is-flexbox |
| 23 | + * and here: |
| 24 | + * https://philipwalton.github.io/solved-by-flexbox/demos/sticky-footer/ |
| 25 | + * This solution does not require hardcoding a fixed footer height in the |
| 26 | + * style rules. |
| 27 | + */ |
| 28 | + flex-shrink: 0; |
| 29 | + background: #013243; |
| 30 | + color: white; |
| 31 | + padding-left: 2rem; |
| 32 | + padding-right: 2rem; |
| 33 | + |
| 34 | + /* Outer content grid */ |
| 35 | + & .outer-grid { |
| 36 | + /* logo, project description, link columns, social icons */ |
| 37 | + grid-template-columns: 2fr 6fr 8fr 3fr; |
| 38 | + column-gap: 4rem; |
| 39 | + align-items: center; |
| 40 | + margin: 0rem 4rem; |
| 41 | + |
| 42 | + & li { |
| 43 | + list-style: none; |
| 44 | + } |
| 45 | + } |
| 46 | + |
| 47 | + @media (max-width: 640px) { |
| 48 | + & .outer-grid { |
| 49 | + grid-template-columns: 1fr; |
| 50 | + justify-items: start; |
| 51 | + } |
| 52 | + } |
| 53 | + |
| 54 | + /* Heading colours */ |
| 55 | + & a, |
| 56 | + h1, |
| 57 | + h2, |
| 58 | + h3, |
| 59 | + h4, |
| 60 | + h5, |
| 61 | + h6 { |
| 62 | + color: white; |
| 63 | + } |
| 64 | + |
| 65 | + & h1 { |
| 66 | + font-size: 1.25rem; |
| 67 | + font-weight: bold; |
| 68 | + } |
| 69 | + & .footer-links { |
| 70 | + column-gap: 1.5rem; |
| 71 | + line-height: normal; |
| 72 | + |
| 73 | + & a { |
| 74 | + color: white; |
| 75 | + text-decoration-color: white; |
| 76 | + display: inline-block; |
| 77 | + white-space: nowrap; |
| 78 | + |
| 79 | + /* MyST renders external links as |
| 80 | + * <a class="whitespace-nowrap"><span class="link-text whitespace-normal">. |
| 81 | + * Override the span so multi-word labels stay on one line. */ |
| 82 | + & .link-text { |
| 83 | + white-space: nowrap; |
| 84 | + } |
| 85 | + } |
| 86 | + } |
| 87 | + |
| 88 | + & .footer-icons { |
| 89 | + column-gap: 3rem; |
| 90 | + row-gap: 1rem; |
| 91 | + |
| 92 | + & img { |
| 93 | + filter: invert(100%); |
| 94 | + margin-bottom: 0.1rem; |
| 95 | + margin-top: 0.1rem; |
| 96 | + min-width: 1.75rem; |
| 97 | + width: 1.75rem; |
| 98 | + } |
| 99 | + } |
| 100 | +} |
| 101 | + |
| 102 | +.footer-logo { |
| 103 | + min-width: 60px; |
| 104 | +} |
| 105 | + |
| 106 | +/* Hide download button */ |
| 107 | +.myst-fm-downloads-button { |
| 108 | + display: none; |
| 109 | +} |
| 110 | + |
| 111 | +/* Set site title bold */ |
| 112 | +.myst-home-link { |
| 113 | + font-weight: bold; |
| 114 | +} |
| 115 | + |
| 116 | +/* Unsure where this CSS came from, but keeping it for now */ |
| 117 | +/* --- Make layout feel less "book-ish" and closer to a website --- */ |
| 118 | +.bd-main .bd-content .bd-article-container { |
| 119 | + max-width: 900px; /* keep readable, less wide than default "docs" feel */ |
| 120 | +} |
| 121 | + |
| 122 | +h1, |
| 123 | +h2, |
| 124 | +h3, |
| 125 | +h4 { |
| 126 | + letter-spacing: -0.01em; |
| 127 | +} |
| 128 | + |
| 129 | +/* Slightly tighten the top spacing so it feels more like a marketing/docs site */ |
| 130 | +.bd-header { |
| 131 | + box-shadow: none; |
| 132 | +} |
| 133 | + |
| 134 | +/* If the left sidebar feels too dominant, reduce its visual weight */ |
| 135 | +.bd-sidebar-primary { |
| 136 | + border-right: 0; |
| 137 | +} |
| 138 | + |
| 139 | +.copyright { |
| 140 | + font-size: smaller; |
| 141 | +} |
0 commit comments