web frontend for git repositories, written in Go git.pocka.jp/legit.git
3

Configure Feed

Select the types of activity you want to include in your feed.

Add footer

The motivation is to display "Powered by ...". The patch I received adds
that text to header, and I felt it stands out too much considering
frequency of user using (reading and getting actually useful
information from) it. I like the idea of "Powered by" as there were
times that text helped me discover new tools.

The most natural place to put it is footer, but my legit fork does not
have that. And just having "Powered by ..." text alone feels off, so I
added admin configurable links section for things like contact email
address, mirrors, and other social links.

I personally like the outcome.

Shota FUJI (Jul 11, 2026, 9:23 PM +0900) fbc46772 784362b7

+110 -7
+14
config.yaml
··· 43 43 # NOTE: This applies only to blob page. Code blocks inside README will be untouched. 44 44 syntaxHighlight: true 45 45 46 + ui: 47 + # Footer won't appear if `links` is empty and `poweredBy` is `false`. 48 + footer: 49 + # Links to display in the footer. 50 + links: 51 + - text: Contact 52 + # legit simply use this value as `<a>` tag's `href` attribute value. 53 + href: mailto:johndoe@example.com 54 + - text: Author Profile 55 + href: https://example.com 56 + 57 + # Display "Powered by ..." text. 58 + poweredBy: true 59 + 46 60 server: 47 61 # legit uses this strings for clone URL. 48 62 # `https://<name>/<directory>`
+9
config/config.go
··· 25 25 Description string `yaml:"description"` 26 26 SyntaxHighlight bool `yaml:"syntaxHighlight"` 27 27 } `yaml:"meta"` 28 + UI struct { 29 + Footer struct { 30 + Links []struct { 31 + Text string `yaml:"text"` 32 + Href string `yaml:"href"` 33 + } `yaml:"links"` 34 + PoweredBy bool `yaml:"poweredBy"` 35 + } `yaml:"footer"` 36 + } `yaml:"ui"` 28 37 Server struct { 29 38 Name string `yaml:"name,omitempty"` 30 39 Host string `yaml:"host"`
+11
demo/config.yaml
··· 37 37 description: Test legit features with real repositories. 38 38 syntaxHighlight: true 39 39 40 + ui: 41 + footer: 42 + links: 43 + - text: Hosted 44 + href: https://git.pocka.jp/legit.git 45 + - text: GitHub Mirror 46 + href: https://github.com/pocka/legit 47 + - text: Original 48 + href: https://github.com/icyphox/legit 49 + poweredBy: true 50 + 40 51 server: 41 52 name: example.com 42 53 host: localhost
+46 -7
static/global.css
··· 83 83 font-weight: var(--font-regular); 84 84 display: grid; 85 85 grid-template-columns: 100%; 86 + grid-template-rows: min-content minmax(0, 1fr) min-content min-content; 86 87 grid-template-areas: 87 88 "header" 88 89 "main" 89 - "aside"; 90 + "aside" 91 + "footer"; 90 92 align-content: start; 91 93 gap: var(--space-lg) 0; 92 94 padding: 0; ··· 130 132 } 131 133 } 132 134 133 - .main, .aside { 135 + .main, .aside, .footer { 134 136 width: 100%; 135 137 max-width: 60rem; 136 138 margin: 0 auto; ··· 147 149 .aside { 148 150 grid-area: aside; 149 151 font-size: var(--font-sm); 152 + } 153 + 154 + .footer { 155 + grid-area: footer; 156 + align-self: end; 157 + font-size: var(--font-xs); 158 + border-block-start: 1px solid var(--color-border-subtle); 159 + margin: 0; 160 + margin-block-start: var(--space-xxxl); 161 + max-width: unset; 162 + 163 + background-color: var(--color-bg); 164 + text-align: end; 165 + z-index: 15; 166 + } 167 + 168 + .footer--links { 169 + padding: 0; 170 + padding-inline-start: 1em; 171 + margin: 0; 172 + display: flex; 173 + flex-wrap: wrap; 174 + gap: 0.5em 2em; 150 175 } 151 176 152 177 .breadcrumbs { ··· 327 352 grid-template-columns: 60rem minmax(0, 1fr); 328 353 grid-template-areas: 329 354 "header header" 330 - "main aside"; 355 + "main aside" 356 + "footer footer"; 331 357 } 332 358 333 359 body:where(:not(:has(.aside))) { 334 360 grid-template-areas: 335 361 "header header" 336 - "main main"; 362 + "main main" 363 + "footer footer"; 337 364 } 338 365 339 366 .aside { ··· 351 378 @media (min-width: 100rem) { 352 379 body { 353 380 grid-template-columns: minmax(0, 40rem) minmax(60rem, 1fr) minmax(0, 40rem); 354 - grid-template-areas: "header main aside"; 355 - gap: var(--space-xxl); 381 + grid-template-rows: minmax(0, 1fr) min-content; 382 + grid-template-areas: 383 + "header main aside" 384 + "footer main aside"; 385 + gap: 0 var(--space-xxl); 356 386 } 357 387 358 388 .header { 359 389 position: sticky; 360 - height: 100dvh; 361 390 top: 0; 362 391 border-block-end: none; 363 392 border-inline-end: 1px solid var(--color-border-subtle); 393 + align-self: stretch; 364 394 365 395 box-shadow: 1px 0px 3px var(--color-shadow) inset; 396 + } 397 + 398 + .footer { 399 + margin: 0; 400 + border-inline-end: 1px solid var(--color-border-subtle); 401 + } 402 + 403 + .footer--links { 404 + display: inline-flex; 366 405 } 367 406 368 407 .breadcrumbs {
+1
templates/repo-blob-ref-html-preview.html.tmpl
··· 71 71 </dd> 72 72 </dl> 73 73 </aside> 74 + {{ template "site-footer" . }} 74 75 </body> 75 76 </html> 76 77 {{- end }}
+1
templates/repo-blob-ref.html.tmpl
··· 85 85 {{- end -}} 86 86 </dl> 87 87 </aside> 88 + {{ template "site-footer" . }} 88 89 </body> 89 90 </html> 90 91 {{- end }}
+1
templates/repo-commit.html.tmpl
··· 158 158 </dl> 159 159 </div> 160 160 </main> 161 + {{ template "site-footer" . }} 161 162 </body> 162 163 </html> 163 164 {{- end }}
+1
templates/repo-list.html.tmpl
··· 45 45 {{- end -}} 46 46 </ul> 47 47 </main> 48 + {{ template "site-footer" . }} 48 49 </body> 49 50 </html> 50 51 {{- end }}
+1
templates/repo-log-ref.html.tmpl
··· 72 72 {{- end }} 73 73 </ol> 74 74 </main> 75 + {{ template "site-footer" . }} 75 76 </body> 76 77 </html> 77 78 {{- end }}
+1
templates/repo-refs.html.tmpl
··· 63 63 <p class="ref-empty">This repository has no tags.</p> 64 64 {{ end -}} 65 65 </main> 66 + {{ template "site-footer" . }} 66 67 </body> 67 68 </html> 68 69 {{- end }}
+1
templates/repo-top.html.tmpl
··· 81 81 </div> 82 82 </aside> 83 83 </div> 84 + {{ template "site-footer" . }} 84 85 </body> 85 86 </html> 86 87 {{- end }}
+1
templates/repo-tree-ref.html.tmpl
··· 83 83 {{- end }} 84 84 </ul> 85 85 </main> 86 + {{ template "site-footer" . }} 86 87 </body> 87 88 </html> 88 89 {{- end }}
+22
templates/site-footer.html.tmpl
··· 1 + <!-- 2 + Copyright 2026 Shota FUJI <pockawoooh@gmail.com> 3 + SPDX-License-Identifier: MIT 4 + --> 5 + {{ define "site-footer" -}} 6 + {{- if or (gt (len .Config.UI.Footer.Links) 0) .Config.UI.Footer.PoweredBy -}} 7 + <footer class="footer"> 8 + {{- if gt (len .Config.UI.Footer.Links) 0 }} 9 + <ul class="footer--links"> 10 + {{- range .Config.UI.Footer.Links }} 11 + <li> 12 + <a href="{{ .Href }}">{{ .Text }}</a> 13 + </li> 14 + {{- end }} 15 + </ul> 16 + {{- end }} 17 + {{- if .Config.UI.Footer.PoweredBy }} 18 + <p>Powered by <a href="https://git.pocka.jp/legit.git">legit</a></p> 19 + {{- end }} 20 + </footer> 21 + {{- end -}} 22 + {{- end -}}