Add basic syntax highlighting to cgit
* modules/cgit/manifests/init.pp: Add highlight package dependency to cgit server * modules/openstack_project/files/git/cgitrc: Enable syntax highlighting option * modules/openstack_project/files/git/openstack.css: Add basic syntax highlighting, copied from CSS that used to ship with cgit by default Closes-Bug: #1228361 Change-Id: Ic496215b5782527ac8159dedf639e549debeed2b
This commit is contained in:
parent
42ef2c7b9b
commit
c2879e7da6
@ -33,6 +33,7 @@ class cgit(
|
||||
package { [
|
||||
'cgit',
|
||||
'git-daemon',
|
||||
'highlight',
|
||||
'socat',
|
||||
]:
|
||||
ensure => present,
|
||||
|
@ -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)
|
||||
|
@ -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; }
|
||||
|
Loading…
x
Reference in New Issue
Block a user