From 1be33b26911375b00a65073ff8c30dece10c49dc Mon Sep 17 00:00:00 2001 From: Runxi Yu Date: Mon, 10 Feb 2025 14:51:57 +0800 Subject: [PATCH] repo_tree: Add chroma.css --- static/chroma.css | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ templates/repo_tree_file.html | 1 + diff --git a/static/chroma.css b/static/chroma.css new file mode 100644 index 0000000000000000000000000000000000000000..0898db3ecaabe2f2d1139d84a3bdd65a4c9923f1 --- /dev/null +++ b/static/chroma.css @@ -0,0 +1,49 @@ +/* Background */ .bg { background-color: #ffffff; } +/* PreWrapper */ .chroma { background-color: #ffffff; } +/* Error */ .chroma .err { } +/* LineLink */ .chroma .lnlinks { outline: none; text-decoration: none; color: inherit } +/* LineTableTD */ .chroma .lntd { vertical-align: top; padding: 0; margin: 0; border: 0; } +/* LineTable */ .chroma .lntable { border-spacing: 0; padding: 0; margin: 0; border: 0; } +/* LineHighlight */ .chroma .hl { background-color: #e5e5e5 } +/* LineNumbersTable */ .chroma .lnt { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* LineNumbers */ .chroma .ln { white-space: pre; -webkit-user-select: none; user-select: none; margin-right: 0.4em; padding: 0 0.4em 0 0.4em;color: #7f7f7f } +/* Line */ .chroma .line { display: flex; } +/* Keyword */ .chroma .k { font-weight: bold } +/* KeywordConstant */ .chroma .kc { font-weight: bold } +/* KeywordDeclaration */ .chroma .kd { font-weight: bold } +/* KeywordNamespace */ .chroma .kn { font-weight: bold } +/* KeywordPseudo */ .chroma .kp { } +/* KeywordReserved */ .chroma .kr { font-weight: bold } +/* KeywordType */ .chroma .kt { } +/* NameClass */ .chroma .nc { font-weight: bold } +/* NameEntity */ .chroma .ni { font-weight: bold } +/* NameException */ .chroma .ne { font-weight: bold } +/* NameNamespace */ .chroma .nn { font-weight: bold } +/* NameTag */ .chroma .nt { font-weight: bold } +/* LiteralString */ .chroma .s { font-style: italic } +/* LiteralStringAffix */ .chroma .sa { font-style: italic } +/* LiteralStringBacktick */ .chroma .sb { font-style: italic } +/* LiteralStringChar */ .chroma .sc { font-style: italic } +/* LiteralStringDelimiter */ .chroma .dl { font-style: italic } +/* LiteralStringDoc */ .chroma .sd { font-style: italic } +/* LiteralStringDouble */ .chroma .s2 { font-style: italic } +/* LiteralStringEscape */ .chroma .se { font-weight: bold; font-style: italic } +/* LiteralStringHeredoc */ .chroma .sh { font-style: italic } +/* LiteralStringInterpol */ .chroma .si { font-weight: bold; font-style: italic } +/* LiteralStringOther */ .chroma .sx { font-style: italic } +/* LiteralStringRegex */ .chroma .sr { font-style: italic } +/* LiteralStringSingle */ .chroma .s1 { font-style: italic } +/* LiteralStringSymbol */ .chroma .ss { font-style: italic } +/* OperatorWord */ .chroma .ow { font-weight: bold } +/* Comment */ .chroma .c { font-style: italic } +/* CommentHashbang */ .chroma .ch { font-style: italic } +/* CommentMultiline */ .chroma .cm { font-style: italic } +/* CommentSingle */ .chroma .c1 { font-style: italic } +/* CommentSpecial */ .chroma .cs { font-style: italic } +/* CommentPreproc */ .chroma .cp { } +/* CommentPreprocFile */ .chroma .cpf { } +/* GenericEmph */ .chroma .ge { font-style: italic } +/* GenericHeading */ .chroma .gh { font-weight: bold } +/* GenericPrompt */ .chroma .gp { font-weight: bold } +/* GenericStrong */ .chroma .gs { font-weight: bold } +/* GenericSubheading */ .chroma .gu { font-weight: bold } diff --git a/templates/repo_tree_file.html b/templates/repo_tree_file.html index d56148529d34cba92c6524a9e52fb173bf45c074..4324208e0a75c81e94a642442609223b50d4104c 100644 --- a/templates/repo_tree_file.html +++ b/templates/repo_tree_file.html @@ -3,6 +3,7 @@ + {{ .category_name }}/repos/{{ .repo_name }}/{{ .path_spec }} -- 2.48.1