Merge "Add basic syntax highlighting to cgit"

This commit is contained in:
Jenkins 2013-10-08 16:25:59 +00:00 committed by Gerrit Code Review
commit 1d148095de
3 changed files with 16 additions and 1 deletions

View File

@ -33,6 +33,7 @@ class cgit(
package { [
'cgit',
'git-daemon',
'highlight',
'socat',
]:
ensure => present,

View File

@ -66,7 +66,7 @@ mimetype.png=image/png
mimetype.svg=image/svg+xml
# Enable syntax highlighting (requires the highlight package)
#source-filter=/usr/libexec/cgit/filters/syntax-highlighting.sh
source-filter=/usr/libexec/cgit/filters/syntax-highlighting.sh
# Increase the number of entries to list per page on the repository
# index page (default 50)

View File

@ -66,3 +66,17 @@ div#cgit table.list tr.nohover {
div#cgit table.list tr.nohover:hover {
background: #eef3f5;
}
/* Syntax highlighting */
div#cgit table.blob .num { color:#2928ff; }
div#cgit table.blob .esc { color:#ff00ff; }
div#cgit table.blob .str { color:#ff0000; }
div#cgit table.blob .dstr { color:#818100; }
div#cgit table.blob .slc { color:#838183; font-style:italic; }
div#cgit table.blob .com { color:#838183; font-style:italic; }
div#cgit table.blob .dir { color:#008200; }
div#cgit table.blob .sym { color:#000000; }
div#cgit table.blob .kwa { color:#000000; font-weight:bold; }
div#cgit table.blob .kwb { color:#830000; }
div#cgit table.blob .kwc { color:#000000; font-weight:bold; }
div#cgit table.blob .kwd { color:#010181; }