css: add bg to readme/file content

This commit is contained in:
Anirudh Oppiliappan 2022-12-19 17:49:32 +05:30
parent d1a2847a26
commit 2b9b2bdb1f
No known key found for this signature in database
GPG key ID: 8A93F96F78C5D4C4
3 changed files with 11 additions and 5 deletions

View file

@ -9,7 +9,7 @@
--sans-font: "InterVar", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif; --sans-font: "InterVar", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif;
--display-font: "InterDisplay", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif; --display-font: "InterDisplay", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif;
--mono-font: "SF Mono", "Roboto Mono", monospace; --mono-font: -apple-system, "SF Mono", "Roboto Mono", monospace;
} }
html { html {
@ -149,8 +149,8 @@ a:hover {
} }
.readme { .readme {
padding-bottom: 2rem; background: var(--light-gray);
border-bottom: 1.5px solid var(--medium-gray); padding: 0.5rem;
} }
.diff { .diff {
@ -230,6 +230,8 @@ a:hover {
grid-template-columns: 1rem minmax(0, 1fr); grid-template-columns: 1rem minmax(0, 1fr);
gap: 1rem; gap: 1rem;
overflow: scroll; overflow: scroll;
padding: 0.5rem;
background: var(--light-gray);
} }
.commit-info { .commit-info {

View file

@ -49,8 +49,11 @@
<div class="diff"> <div class="diff">
<div id="{{ .Name.New }}"> <div id="{{ .Name.New }}">
{{ if .Name.Old }} {{ if .Name.Old }}
<a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}">{{ .Name.Old }}</a> &#8594; <a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.Old }}">{{ .Name.Old }}</a>
<a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}">{{ .Name.New }}</a> {{ if .Name.New }}
&#8594;
<a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}">{{ .Name.New }}</a>
{{ end }}
{{ else }} {{ else }}
<a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}">{{ .Name.New }}</a> <a href="/{{ $repo }}/blob/{{ $this }}/{{ .Name.New }}">{{ .Name.New }}</a>
{{- end -}} {{- end -}}

View file

@ -7,6 +7,7 @@
<body> <body>
{{ template "nav" . }} {{ template "nav" . }}
<main> <main>
<p>{{ .path }}</p>
<div class="file-wrapper"> <div class="file-wrapper">
<div class="line-numbers"> <div class="line-numbers">
{{- range .linecount }} {{- range .linecount }}