forge
Clone
https://git.tahinli.com/Tahinli/forge.git
0 watching0 forksRustAGPL-3.07.1 MiB490f099Tahinli7 hours ago322 commits
| 1 | // The history strip (one bar per recent commit) and the dock's shared parts. The repo home's panes |
| 2 | // and dock are in _canvas_repo.scss; the run page keeps its thin dock here. |
| 3 | |
| 4 | // With no footer on this page, the dock sits close to the window's bottom edge. |
| 5 | .shell-body > main:has(.repo-home) { |
| 6 | padding-bottom: 12px; |
| 7 | } |
| 8 | |
| 9 | // The Code tab's head: no title row. The tabs sit at the left, and the visibility, the counts and |
| 10 | // the watch and star controls sit at the right end of the same row. Fork and mirror lines wrap |
| 11 | // under the row. |
| 12 | .repo-head-code { |
| 13 | justify-content: flex-start; |
| 14 | |
| 15 | > div:first-child:empty { |
| 16 | display: none; |
| 17 | } |
| 18 | |
| 19 | > div:first-child { |
| 20 | order: 2; |
| 21 | flex: 1 0 100%; |
| 22 | } |
| 23 | |
| 24 | .repo-tabs { |
| 25 | margin-right: auto; |
| 26 | } |
| 27 | |
| 28 | } |
| 29 | |
| 30 | // One rule under the whole row, so the actions read as part of the tab bar. The tab icons go to |
| 31 | // make the room. Under 1280px the two no longer fit, and the actions take a row of their own. |
| 32 | @media (min-width: 900px) { |
| 33 | .repo-head-code { |
| 34 | align-items: center; |
| 35 | border-bottom: 1px solid var(--border); |
| 36 | |
| 37 | .repo-tabs { |
| 38 | margin-bottom: 0; |
| 39 | border-bottom: 0; |
| 40 | } |
| 41 | |
| 42 | .repo-tabs .tab-icon { |
| 43 | display: none; |
| 44 | } |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | @media (min-width: 1280px) { |
| 49 | .repo-head-code { |
| 50 | flex-wrap: nowrap; |
| 51 | |
| 52 | .repo-tabs { |
| 53 | flex: 0 1 auto; |
| 54 | min-width: 0; |
| 55 | } |
| 56 | |
| 57 | } |
| 58 | } |
| 59 | |
| 60 | // The page is exactly one window: the footer is left off this page, and the panes and the dock |
| 61 | // fill the height. (The footer would sit under the floating profile panel.) |
| 62 | body:has(.repo-home) .site-footer { |
| 63 | display: none; |
| 64 | } |
| 65 | |
| 66 | // The run page's dock: one thin row, the strip after the CI words. The repo home has its own dock. |
| 67 | .repo-dock:not(.canvas-dock) { |
| 68 | display: flex; |
| 69 | align-items: center; |
| 70 | gap: 16px; |
| 71 | box-sizing: border-box; |
| 72 | height: 52px; |
| 73 | margin-top: 12px; |
| 74 | padding: 0 16px; |
| 75 | min-width: 0; |
| 76 | overflow: hidden; |
| 77 | background: var(--surface); |
| 78 | border: 1px solid var(--border); |
| 79 | border-radius: var(--radius-lg); |
| 80 | font-size: 13px; |
| 81 | } |
| 82 | |
| 83 | .dock-history { |
| 84 | order: 1; |
| 85 | display: flex; |
| 86 | flex: 1 1 0; |
| 87 | align-items: flex-end; |
| 88 | min-width: 0; |
| 89 | height: 100%; |
| 90 | } |
| 91 | |
| 92 | .history-strip { |
| 93 | flex: 1 1 auto; |
| 94 | min-width: 0; |
| 95 | } |
| 96 | |
| 97 | // Visually hidden on the run page; the repo home shows it as the strip's column label. |
| 98 | .history-label { |
| 99 | position: absolute; |
| 100 | width: 1px; |
| 101 | height: 1px; |
| 102 | overflow: hidden; |
| 103 | clip-path: inset(50%); |
| 104 | } |
| 105 | |
| 106 | .history-bars { |
| 107 | display: flex; |
| 108 | align-items: flex-end; |
| 109 | gap: 2px; |
| 110 | height: 28px; |
| 111 | min-width: 0; |
| 112 | overflow: hidden; |
| 113 | |
| 114 | > a { |
| 115 | display: block; |
| 116 | flex: 1 1 0; |
| 117 | min-width: 2px; |
| 118 | border-radius: 2px; |
| 119 | background: var(--muted); |
| 120 | opacity: 0.42; |
| 121 | } |
| 122 | |
| 123 | // A bar has its commit's CI colour: passed is the ok colour, softer, so a failure and the running |
| 124 | // commit stand out at full strength. |
| 125 | > a.hs-ok { |
| 126 | background: var(--ok); |
| 127 | opacity: 0.5; |
| 128 | } |
| 129 | |
| 130 | > a.hs-bad { |
| 131 | background: var(--bad); |
| 132 | opacity: 1; |
| 133 | } |
| 134 | |
| 135 | > a.hs-live { |
| 136 | background: var(--heat-3); |
| 137 | opacity: 1; |
| 138 | } |
| 139 | |
| 140 | > a:hover { |
| 141 | opacity: 0.75; |
| 142 | } |
| 143 | |
| 144 | > a:focus-visible { |
| 145 | outline: 2px solid var(--accent); |
| 146 | outline-offset: 2px; |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | // Bar heights: one class per whole percent, from the floor of 6% to the full strip. Each class is |
| 151 | // a child selector, so it outranks the bar's own rule. |
| 152 | @for $i from 6 through 100 { |
| 153 | .history-bars > .hs-h-#{$i} { |
| 154 | height: $i * 1%; |
| 155 | } |
| 156 | } |
| 157 | |
| 158 | // Below 900px the panes stack and the page scrolls: the dock becomes the one-line CI row, and the |
| 159 | // strip, which needs the width, is left out. |
| 160 | @media (max-width: 899px) { |
| 161 | .repo-dock:not(.canvas-dock) { |
| 162 | height: auto; |
| 163 | } |
| 164 | |
| 165 | .dock-history { |
| 166 | display: none; |
| 167 | } |
| 168 | } |