mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2024-11-24 03:21:49 +01:00
Fix unified diff view styling (#585)
Signed-off-by: Manuel Kuhlmann <manuel@mkuhlmann.org>
This commit is contained in:
parent
a5e07da8be
commit
eb9ce39bb7
3 changed files with 57 additions and 37 deletions
|
@ -1992,30 +1992,38 @@ footer .ui.language .menu {
|
||||||
padding-top: 8px;
|
padding-top: 8px;
|
||||||
padding-bottom: 8px;
|
padding-bottom: 8px;
|
||||||
}
|
}
|
||||||
.repository .diff-file-box .code-diff tbody tr.add-code td:nth-child(1),
|
|
||||||
.repository .diff-file-box .code-diff tbody tr.add-code td:nth-child(2),
|
|
||||||
.repository .diff-file-box .code-diff tbody tr.del-code td:nth-child(3),
|
|
||||||
.repository .diff-file-box .code-diff tbody tr.del-code td:nth-child(4) {
|
|
||||||
background-color: #fafafa;
|
|
||||||
}
|
|
||||||
.repository .diff-file-box .code-diff tbody tr.del-code td:nth-child(1),
|
|
||||||
.repository .diff-file-box .code-diff tbody tr.del-code td:nth-child(2),
|
|
||||||
.repository .diff-file-box .code-diff tbody tr td.del-code {
|
|
||||||
background-color: #ffe0e0 !important;
|
|
||||||
border-color: #f1c0c0 !important;
|
|
||||||
}
|
|
||||||
.repository .diff-file-box .code-diff tbody tr.add-code td:nth-child(3),
|
|
||||||
.repository .diff-file-box .code-diff tbody tr.add-code td:nth-child(4),
|
|
||||||
.repository .diff-file-box .code-diff tbody tr td.add-code {
|
|
||||||
background-color: #d6fcd6 !important;
|
|
||||||
border-color: #c1e9c1 !important;
|
|
||||||
}
|
|
||||||
.repository .diff-file-box .code-diff tbody tr .removed-code {
|
.repository .diff-file-box .code-diff tbody tr .removed-code {
|
||||||
background-color: #ff9999;
|
background-color: #ff9999;
|
||||||
}
|
}
|
||||||
.repository .diff-file-box .code-diff tbody tr .added-code {
|
.repository .diff-file-box .code-diff tbody tr .added-code {
|
||||||
background-color: #99ff99;
|
background-color: #99ff99;
|
||||||
}
|
}
|
||||||
|
.repository .diff-file-box .code-diff-unified tbody tr.del-code td {
|
||||||
|
background-color: #ffe0e0 !important;
|
||||||
|
border-color: #f1c0c0 !important;
|
||||||
|
}
|
||||||
|
.repository .diff-file-box .code-diff-unified tbody tr.add-code td {
|
||||||
|
background-color: #d6fcd6 !important;
|
||||||
|
border-color: #c1e9c1 !important;
|
||||||
|
}
|
||||||
|
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(1),
|
||||||
|
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(2),
|
||||||
|
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(3),
|
||||||
|
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(4) {
|
||||||
|
background-color: #fafafa;
|
||||||
|
}
|
||||||
|
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(1),
|
||||||
|
.repository .diff-file-box .code-diff-split tbody tr.del-code td:nth-child(2),
|
||||||
|
.repository .diff-file-box .code-diff-split tbody tr td.del-code {
|
||||||
|
background-color: #ffe0e0 !important;
|
||||||
|
border-color: #f1c0c0 !important;
|
||||||
|
}
|
||||||
|
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(3),
|
||||||
|
.repository .diff-file-box .code-diff-split tbody tr.add-code td:nth-child(4),
|
||||||
|
.repository .diff-file-box .code-diff-split tbody tr td.add-code {
|
||||||
|
background-color: #d6fcd6 !important;
|
||||||
|
border-color: #c1e9c1 !important;
|
||||||
|
}
|
||||||
.repository .diff-file-box.file-content img {
|
.repository .diff-file-box.file-content img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
padding: 5px 5px 0 5px;
|
padding: 5px 5px 0 5px;
|
||||||
|
|
|
@ -922,6 +922,27 @@
|
||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
.removed-code {
|
||||||
|
background-color: #ff9999;
|
||||||
|
}
|
||||||
|
.added-code {
|
||||||
|
background-color: #99ff99;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.code-diff-unified tbody tr {
|
||||||
|
&.del-code td {
|
||||||
|
background-color: #ffe0e0 !important;
|
||||||
|
border-color: #f1c0c0 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.add-code td {
|
||||||
|
background-color: #d6fcd6 !important;
|
||||||
|
border-color: #c1e9c1 !important;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.code-diff-split tbody tr {
|
||||||
// light gray for empty lines before / after commit
|
// light gray for empty lines before / after commit
|
||||||
&.add-code td:nth-child(1), &.add-code td:nth-child(2),
|
&.add-code td:nth-child(1), &.add-code td:nth-child(2),
|
||||||
&.del-code td:nth-child(3), &.del-code td:nth-child(4) {
|
&.del-code td:nth-child(3), &.del-code td:nth-child(4) {
|
||||||
|
@ -939,15 +960,6 @@
|
||||||
background-color: #d6fcd6 !important;
|
background-color: #d6fcd6 !important;
|
||||||
border-color: #c1e9c1 !important;
|
border-color: #c1e9c1 !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.removed-code {
|
|
||||||
background-color: #ff9999;
|
|
||||||
}
|
|
||||||
.added-code {
|
|
||||||
background-color: #99ff99;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
&.file-content {
|
&.file-content {
|
||||||
img {
|
img {
|
||||||
|
|
|
@ -85,7 +85,7 @@
|
||||||
<img src="{{$.RawPath}}/{{EscapePound .Name}}">
|
<img src="{{$.RawPath}}/{{EscapePound .Name}}">
|
||||||
</div>
|
</div>
|
||||||
{{else}}
|
{{else}}
|
||||||
<div class="file-body file-code code-view code-diff">
|
<div class="file-body file-code code-view code-diff {{if $.IsSplitStyle}}code-diff-split{{else}}code-diff-unified{{end}}">
|
||||||
<table>
|
<table>
|
||||||
<tbody>
|
<tbody>
|
||||||
{{if $.IsSplitStyle}}
|
{{if $.IsSplitStyle}}
|
||||||
|
|
Loading…
Reference in a new issue