From bdcc178e91b1314e2175b78dc6f9f51964ecdb9c Mon Sep 17 00:00:00 2001 From: Vrifox Date: Tue, 8 Dec 2020 21:14:44 +0100 Subject: [PATCH] repository diff: del- and add-code --- scss/dynamic.scss | 1 + scss/import/repository.scss | 33 +++-- scss/import/syntax.scss | 267 ++++++++++++++++++++++++++++++++++++ scss/static.scss | 1 + 4 files changed, 294 insertions(+), 8 deletions(-) create mode 100644 scss/import/syntax.scss diff --git a/scss/dynamic.scss b/scss/dynamic.scss index 2fc61d8..2aa4113 100644 --- a/scss/dynamic.scss +++ b/scss/dynamic.scss @@ -26,6 +26,7 @@ $border-radius: 5px; // @import 'import/_colors.scss'; +@import 'import/syntax.scss'; @import 'import/include.scss'; @import 'import/_main.scss'; @import 'import/_nav.scss'; diff --git a/scss/import/repository.scss b/scss/import/repository.scss index 0f3b57d..1e50390 100644 --- a/scss/import/repository.scss +++ b/scss/import/repository.scss @@ -1479,7 +1479,9 @@ div { .diff-detail-box { background: $bg50; + border: 0; color: $white; + margin: 0; padding: 10px; .button { background: $bg70; @@ -1599,6 +1601,15 @@ .file-body { table { tbody { + @if $nojavascript == true { + tr { + td { + a.blob-excerpt { + display: none; + } + } + } + } .tag-code { td { background: $bg30 !important; @@ -1615,21 +1626,27 @@ } .del-code { td { - background: $red !important; - border-color: $red-light !important; - color: $white; + background: $bg50 !important; + &:not(:last-of-type) { + background: $red !important; + color: $white-light; + } .removed-code { - background: $red-dark; + background: transparent; + border-bottom: 2px solid $red; } } } .add-code { td { - background: $green !important; - border-color: $green-light !important; - color: $white; + background: $bg50 !important; + &:not(:last-of-type) { + background: $green !important; + color: $white-light; + } .added-code { - background: $green-dark; + background: transparent; + border-bottom: 2px solid $green; } } } diff --git a/scss/import/syntax.scss b/scss/import/syntax.scss new file mode 100644 index 0000000..bc26955 --- /dev/null +++ b/scss/import/syntax.scss @@ -0,0 +1,267 @@ + .chroma { // background + .x { // other + + } + .err { // error + + } + .lntd { // lineTableTD + border: 0; + margin: 0; + padding: 0 0 0 20px; + vertical-align: top; + } + .lntable { // lineTable + border: 0; + border-spacing: 0; + display: block; + margin: 0; + overflow: auto; + padding: 0; + width: auto; + } + .hl { // lineHighlight + background: #ffffcc; + display: block; + width: 100%; + } + .lnt { // lineNumbersTable + color: $white-dark; + margin-right: 0.4em; + padding: 0 0.4em 0 0.4em; + } + .ln { // lineNumbers + color: $white-dark; + margin-right: 0.4em; + padding: 0 0.4em 0 0.4em; + } + .k { // keyword + color: #ff79c6; + } + .kc { // keywordConstant + color: #ff79c6; + } + .kd { // keywordDeclaration + color: #8be9fd; + font-style: italic; + } + .kn { // keywordNamespace + color: #ff79c6; + } + .kp { // keywordPseudo + color: #ff79c6; + } + .kr { // keywordReserved + color: #ff79c6; + } + .kt { // keywordType + color: #8be9fd; + } + .n { // name + + } + .na { // nameAttribute + color: #50fa7b; + } + .nb { // nameBuiltin + color: #8be9fd; + font-style: italic + } + .bp { // nameBuiltinPseudo + + } + .nc { // nameClass + color: #50fa7b; + } + .no { // nameConstant + + } + .nd { // nameDecorator + + } + .ni { // nameEntity + + } + .ne { // nameException + + } + .nf { // nameFunction + color: #50fa7b; + } + .fm { // nameFunctionMagic + + } + .nl { // nameLabel + color: #8be9fd; + font-style: italic; + } + .nn { // nameNamespace + + } + .nx { // nameOther + + } + .py { // nameProperty + + } + .nt { // nameTag + color: $white-light; + } + .nv { // nameVariable + color: #8be9fd; + font-style: italic; + } + .vc { // nameVariableClass + color: #8be9fd; + font-style: italic; + } + .vg { // nameVariableGlobal + color: #8be9fd; + font-style: italic; + } + .vi { // nameVariableInstance + color: #8be9fd; + font-style: italic; + } + .vm { // nameVariableMagic + + } + .l { // literal + + } + .ld { // literalDate + + } + .s { // literalString + color: #f1fa8c; + } + .sa { // literalStringAffix + color: #f1fa8c; + } + .sb { // literalStringBacktick + color: #f1fa8c; + } + .sc { // literalStringChar + color: #f1fa8c; + } + .dl { // literalStringDelimiter + color: #f1fa8c; + } + .sd { // literalStringDoc + color: #f1fa8c; + } + .s2 { // literalStringDouble + color: #f1fa8c; + } + .se { // literalStringEscape + color: #f1fa8c; + } + .sh { // literalStringHeredoc + color: #f1fa8c; + } + .si { // literalStringInterpol + color: #f1fa8c; + } + .sx { // literalStringOther + color: #f1fa8c; + } + .sr { // literalStringRegex + color: #f1fa8c; + } + .s1 { // literalStringSingle + color: #f1fa8c; + } + .ss { // literalStringSymbol + color: #f1fa8c; + } + .m { // literalNumber + color: #bd93f9; + } + .mb { // literalNumberBin + color: #bd93f9; + } + .mf { // literalNumberFloat + color: #bd93f9; + } + .mh { // literalNumberHex + color: #bd93f9; + } + .mi { // literalNumberInteger + color: #bd93f9; + } + .il { // literalNumberIntegerLong + color: #bd93f9; + } + .mo { // literalNumberOct + color: #bd93f9; + } + .o { // operator + color: #ff79c6; + } + .ow { // operatorWord + color: #ff79c6; + } + .p { // punctuation + + } + .c { // comment + color: #6272a4; + } + .ch { // commentHashbang + color: #6272a4; + } + .cm { // commentMultiline + color: #6272a4; + } + .c1 { // commentSingle + color: #6272a4; + } + .cs { // commentSpecial + color: #6272a4; + } + .cp { // commentPreproc + color: #ff79c6; + } + .cpf { // commentPreprocFile + color: #ff79c6; + } + .g { // generic + + } + .gd { // genericDeleted + color: #8b080b; + } + .ge { // genericEmph + text-decoration: underline; + } + .gr { // genericError + + } + .gh { // genericHeading + font-weight: bold; + } + .gi { // genericInserted + font-weight: bold; + } + .go { // genericOutput + color: #44475a; + } + .gp { // genericPrompt + + } + .gs { // genericStrong + + } + .gu { // genericSubheading + font-weight: bold; + } + .gt { // genericTraceback + + } + .gl { // genericUnderline + text-decoration: underline; + } + .w { // textWhitespace + + } + } diff --git a/scss/static.scss b/scss/static.scss index e679321..a7551a0 100644 --- a/scss/static.scss +++ b/scss/static.scss @@ -26,6 +26,7 @@ $border-radius: 5px; // @import 'import/_colors.scss'; +@import 'import/syntax.scss'; @import 'import/include.scss'; @import 'import/_main.scss'; @import 'import/_nav.scss';