diff options
Diffstat (limited to '')
-rw-r--r-- | legitrx.yaml | 2 | ||||
-rw-r--r-- | static/style-old.css | 306 | ||||
-rw-r--r-- | static/style.css | 312 | ||||
-rw-r--r-- | templates/404.html | 2 | ||||
-rw-r--r-- | templates/500.html | 2 | ||||
-rw-r--r-- | templates/commit.html | 2 | ||||
-rw-r--r-- | templates/file.html | 2 | ||||
-rw-r--r-- | templates/log.html | 2 | ||||
-rw-r--r-- | templates/refs.html | 2 | ||||
-rw-r--r-- | templates/repo.html | 2 | ||||
-rw-r--r-- | templates/tree.html | 2 |
11 files changed, 321 insertions, 315 deletions
diff --git a/legitrx.yaml b/legitrx.yaml index 556e733..e8bb4a6 100644 --- a/legitrx.yaml +++ b/legitrx.yaml @@ -1,5 +1,5 @@ repo: - scanPath: /tmp/git + scanPath: /home/runxiyu/gittest readme: - readme - README diff --git a/static/style-old.css b/static/style-old.css deleted file mode 100644 index 67b8e26..0000000 --- a/static/style-old.css +++ /dev/null @@ -1,306 +0,0 @@ -:root { - --light: #f4f4f4; - --cyan: #509c93; - --light-gray: #eee; - --medium-gray: #ddd; - --gray: #6a6a6a; - --dark: #444; - --darker: #222; - - --sans-font: "InterVar", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif; - --display-font: "InterDisplay", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif; - --mono-font: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', 'Roboto Mono', Menlo, Consolas, monospace; -} - -html { - background: var(--light); - -webkit-text-size-adjust: none; - font-family: var(--sans-font); -} - -pre { - font-family: var(--mono-font); -} - -::selection { - background: var(--medium-gray); - opacity: 0.3; -} - -* { - box-sizing: border-box; - padding: 0; - margin: 0; -} - -body { - max-width: 1000px; - padding: 0 13px; - margin: 40px auto; -} - -main, footer { - font-size: 1rem; - padding: 0; - line-height: 160%; -} - -main h1, h2, h3, strong { - font-family: var(--display-font); - font-weight: 500; -} - -strong { - font-weight: 500; -} - -main h1 { - font-size: 20px; - padding: 10px 0 10px 0; -} - -main h2 { - font-size: 18px; -} - -main h2, h3 { - padding: 20px 0 15px 0; -} - -nav { - padding: 0.4rem 0 1.5rem 0; -} - -nav ul { - padding: 0; - margin: 0; - list-style: none; - padding-bottom: 20px; -} - -nav ul li { - padding-right: 10px; - display: inline-block; -} - -a { - margin: 0; - padding: 0; - box-sizing: border-box; - text-decoration: none; - word-wrap: break-word; -} - -a { - color: var(--darker); - border-bottom: 1.5px solid var(--medium-gray); -} - -a:hover { - border-bottom: 1.5px solid var(--gray); -} - -.index { - padding-top: 2em; - display: grid; - grid-template-columns: 6em 1fr minmax(0, 7em); - grid-row-gap: 0.5em; - min-width: 0; -} - -.clone-url { - padding-top: 2rem; -} - -.clone-url pre { - color: var(--dark); - white-space: pre-wrap; -} - -.desc { - font-weight: normal; - color: var(--gray); - font-style: italic; -} - -.tree { - display: grid; - grid-template-columns: 10ch auto 1fr; - grid-row-gap: 0.5em; - grid-column-gap: 1em; - min-width: 0; -} - -.log { - display: grid; - grid-template-columns: 20rem minmax(0, 1fr); - grid-row-gap: 0.8em; - grid-column-gap: 8rem; - margin-bottom: 2em; - padding-bottom: 1em; - border-bottom: 1.5px solid var(--medium-gray); -} - -.log pre { - white-space: pre-wrap; -} - -.mode, .size { - font-family: var(--mono-font); -} -.size { - text-align: right; -} - -.readme pre { - white-space: pre-wrap; -} - -.readme { - background: var(--light-gray); - padding: 0.5rem; -} - -.readme ul { - padding: revert; -} - -.readme img { - max-width: 100%; -} - -.diff { - margin: 1rem 0 1rem 0; - padding: 1rem 0 1rem 0; - border-bottom: 1.5px solid var(--medium-gray); -} - -.diff pre { - overflow: scroll; -} - -.diff-stat { - padding: 1rem 0 1rem 0; -} - -.commit-hash, .commit-email { - font-family: var(--mono-font); -} - -.commit-email:before { - content: '<'; -} - -.commit-email:after { - content: '>'; -} - -.commit { - margin-bottom: 1rem; -} - -.commit pre { - padding-bottom: 1rem; - white-space: pre-wrap; -} - -.diff-stat ul li { - list-style: none; - padding-left: 0.5em; -} - -.diff-add { - color: green; -} - -.diff-del { - color: red; -} - -.diff-noop { - color: var(--gray); -} - -.ref { - font-family: var(--display-font); - font-size: 14px; - color: var(--gray); - display: inline-block; - padding-top: 0.7em; -} - -.refs pre { - white-space: pre-wrap; - padding-bottom: 0.5rem; -} - -.refs strong { - padding-right: 1em; -} - -.line-numbers { - white-space: pre-line; - -moz-user-select: -moz-none; - -khtml-user-select: none; - -webkit-user-select: none; - -o-user-select: none; - user-select: none; - display: flex; - float: left; - flex-direction: column; - margin-right: 1ch; -} - -.file-wrapper { - display: flex; - flex-direction: row; - grid-template-columns: 1rem minmax(0, 1fr); - gap: 1rem; - padding: 0.5rem; - background: var(--light-gray); - overflow-x: auto; -} - -.file-content { - background: var(--light-gray); - overflow-y: hidden; - overflow-x: auto; -} - -.diff-type { - color: var(--gray); -} - -.commit-info { - color: var(--gray); - padding-bottom: 1.5rem; - font-size: 0.85rem; -} - -@media (max-width: 600px) { - .index { - grid-row-gap: 0.8em; - } - - .log { - grid-template-columns: 1fr; - grid-row-gap: 0em; - } - - .index { - grid-template-columns: 1fr; - grid-row-gap: 0em; - } - - .index-name:not(:first-child) { - padding-top: 1.5rem; - } - - .commit-info:not(:last-child) { - padding-bottom: 1.5rem; - } - - pre { - font-size: 0.8rem; - } -} diff --git a/static/style.css b/static/style.css index 9bc9119..5a8d72f 100644 --- a/static/style.css +++ b/static/style.css @@ -920,3 +920,315 @@ main#legitrx table.blob .kwa { color:#000000; font-weight:bold; } main#legitrx table.blob .kwb { color:#0057ae; } main#legitrx table.blob .kwc { color:#000000; font-weight:bold; } main#legitrx table.blob .kwd { color:#010181; } + +/* + * The following is copied from upstream legit. + * I don't want things to look insane as I am removing things, + * so let's just keep them for now. + */ + + +html#legit { + background: var(--light); + -webkit-text-size-adjust: none; + font-family: var(--sans-font); + --light: #f4f4f4; + --cyan: #509c93; + --light-gray: #eee; + --medium-gray: #ddd; + --gray: #6a6a6a; + --dark: #444; + --darker: #222; + + --sans-font: "InterVar", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif; + --display-font: "InterDisplay", -apple-system, BlinkMacSystemFont, "Roboto", "Segoe UI", sans-serif; + --mono-font: 'SF Mono', SFMono-Regular, ui-monospace, 'DejaVu Sans Mono', 'Roboto Mono', Menlo, Consolas, monospace; +} + +html#legit pre { + font-family: var(--mono-font); +} + +html#legit ::selection { + background: var(--medium-gray); + opacity: 0.3; +} + +html#legit * { + box-sizing: border-box; + padding: 0; + margin: 0; +} + +html#legit body { + max-width: 1000px; + padding: 0 13px; + margin: 40px auto; +} + +html#legit main, footer { + font-size: 1rem; + padding: 0; + line-height: 160%; +} + +html#legit main h1, h2, h3, strong { + font-family: var(--display-font); + font-weight: 500; +} + +html#legit strong { + font-weight: 500; +} + +html#legit main h1 { + font-size: 20px; + padding: 10px 0 10px 0; +} + +html#legit main h2 { + font-size: 18px; +} + +html#legit main h2, h3 { + padding: 20px 0 15px 0; +} + +html#legit nav { + padding: 0.4rem 0 1.5rem 0; +} + +html#legit nav ul { + padding: 0; + margin: 0; + list-style: none; + padding-bottom: 20px; +} + +html#legit nav ul li { + padding-right: 10px; + display: inline-block; +} + +html#legit a { + margin: 0; + padding: 0; + box-sizing: border-box; + text-decoration: none; + word-wrap: break-word; +} + +html#legit a { + color: var(--darker); + border-bottom: 1.5px solid var(--medium-gray); +} + +html#legit a:hover { + border-bottom: 1.5px solid var(--gray); +} + +html#legit .index { + padding-top: 2em; + display: grid; + grid-template-columns: 6em 1fr minmax(0, 7em); + grid-row-gap: 0.5em; + min-width: 0; +} + +html#legit .clone-url { + padding-top: 2rem; +} + +html#legit .clone-url pre { + color: var(--dark); + white-space: pre-wrap; +} + +html#legit .desc { + font-weight: normal; + color: var(--gray); + font-style: italic; +} + +html#legit .tree { + display: grid; + grid-template-columns: 10ch auto 1fr; + grid-row-gap: 0.5em; + grid-column-gap: 1em; + min-width: 0; +} + +html#legit .log { + display: grid; + grid-template-columns: 20rem minmax(0, 1fr); + grid-row-gap: 0.8em; + grid-column-gap: 8rem; + margin-bottom: 2em; + padding-bottom: 1em; + border-bottom: 1.5px solid var(--medium-gray); +} + +html#legit .log pre { + white-space: pre-wrap; +} + +html#legit .mode, .size { + font-family: var(--mono-font); +} + +html#legit .size { + text-align: right; +} + +html#legit .readme pre { + white-space: pre-wrap; +} + +html#legit .readme { + background: var(--light-gray); + padding: 0.5rem; +} + +html#legit .readme ul { + padding: revert; +} + +html#legit .readme img { + max-width: 100%; +} + +html#legit .diff { + margin: 1rem 0 1rem 0; + padding: 1rem 0 1rem 0; + border-bottom: 1.5px solid var(--medium-gray); +} + +html#legit .diff pre { + overflow: scroll; +} + +html#legit .diff-stat { + padding: 1rem 0 1rem 0; +} + +html#legit .commit-hash, .commit-email { + font-family: var(--mono-font); +} + +html#legit .commit-email:before { + content: '<'; +} + +html#legit .commit-email:after { + content: '>'; +} + +html#legit .commit { + margin-bottom: 1rem; +} + +html#legit .commit pre { + padding-bottom: 1rem; + white-space: pre-wrap; +} + +html#legit .diff-stat ul li { + list-style: none; + padding-left: 0.5em; +} + +html#legit .diff-add { + color: green; +} + +html#legit .diff-del { + color: red; +} + +html#legit .diff-noop { + color: var(--gray); +} + +html#legit .ref { + font-family: var(--display-font); + font-size: 14px; + color: var(--gray); + display: inline-block; + padding-top: 0.7em; +} + +html#legit .refs pre { + white-space: pre-wrap; + padding-bottom: 0.5rem; +} + +html#legit .refs strong { + padding-right: 1em; +} + +html#legit .line-numbers { + white-space: pre-line; + -moz-user-select: -moz-none; + -khtml-user-select: none; + -webkit-user-select: none; + -o-user-select: none; + user-select: none; + display: flex; + float: left; + flex-direction: column; + margin-right: 1ch; +} + +html#legit .file-wrapper { + display: flex; + flex-direction: row; + grid-template-columns: 1rem minmax(0, 1fr); + gap: 1rem; + padding: 0.5rem; + background: var(--light-gray); + overflow-x: auto; +} + +html#legit .file-content { + background: var(--light-gray); + overflow-y: hidden; + overflow-x: auto; +} + +html#legit .diff-type { + color: var(--gray); +} + +html#legit .commit-info { + color: var(--gray); + padding-bottom: 1.5rem; + font-size: 0.85rem; +} + +@media (max-width: 600px) { + html#legit .index { + grid-row-gap: 0.8em; + } + + html#legit .log { + grid-template-columns: 1fr; + grid-row-gap: 0em; + } + + html#legit .index { + grid-template-columns: 1fr; + grid-row-gap: 0em; + } + + html#legit .index-name:not(:first-child) { + padding-top: 1.5rem; + } + + html#legit .commit-info:not(:last-child) { + padding-bottom: 1.5rem; + } + + html#legit pre { + font-size: 0.8rem; + } +} diff --git a/templates/404.html b/templates/404.html index 20bb58c..c461c21 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,6 +1,6 @@ {{ define "404" }} <!DOCTYPE html> -<html> +<html id="legit"> <title>404</title> {{ template "head" . }} <body> diff --git a/templates/500.html b/templates/500.html index fa1a639..33c1626 100644 --- a/templates/500.html +++ b/templates/500.html @@ -1,6 +1,6 @@ {{ define "500" }} <!DOCTYPE html> -<html> +<html id="legit"> <title>500</title> {{ template "head" . }} <body> diff --git a/templates/commit.html b/templates/commit.html index e23a96d..b7b7e22 100644 --- a/templates/commit.html +++ b/templates/commit.html @@ -1,6 +1,6 @@ {{ define "commit" }} <!DOCTYPE html> -<html> +<html id="legit"> {{ template "head" . }} {{ template "repoheader" . }} <body> diff --git a/templates/file.html b/templates/file.html index de81b17..da39f2b 100644 --- a/templates/file.html +++ b/templates/file.html @@ -1,6 +1,6 @@ {{ define "file" }} <!DOCTYPE html> -<html> +<html id="legit"> {{ template "head" . }} {{ template "repoheader" . }} <body> diff --git a/templates/log.html b/templates/log.html index 153e01c..6572712 100644 --- a/templates/log.html +++ b/templates/log.html @@ -1,6 +1,6 @@ {{ define "log" }} <!DOCTYPE html> -<html> +<html id="legit"> {{ template "head" . }} {{ template "repoheader" . }} <body> diff --git a/templates/refs.html b/templates/refs.html index e8534a7..9f4c573 100644 --- a/templates/refs.html +++ b/templates/refs.html @@ -1,6 +1,6 @@ {{ define "refs" }} <!DOCTYPE html> -<html> +<html id="legit"> {{ template "head" . }} {{ template "repoheader" . }} <body> diff --git a/templates/repo.html b/templates/repo.html index 4d0bff3..b813c05 100644 --- a/templates/repo.html +++ b/templates/repo.html @@ -1,6 +1,6 @@ {{ define "repo" }} <!DOCTYPE html> -<html> +<html id="legit"> {{ template "head" . }} <body> {{ template "repoheader" . }} diff --git a/templates/tree.html b/templates/tree.html index 30e8c57..f126a97 100644 --- a/templates/tree.html +++ b/templates/tree.html @@ -1,6 +1,6 @@ {{ define "tree" }} <!DOCTYPE html> -<html> +<html id="legit"> {{ template "head" . }} {{ template "repoheader" . }} <body> |