##// END OF EJS Templates
little gui change for file source
marcink -
r505:5aba7adf default
parent child Browse files
Show More
@@ -213,14 +213,23 b' class _FilesBreadCrumbs(object):'
213 return literal('/'.join(url_l))
213 return literal('/'.join(url_l))
214
214
215 files_breadcrumbs = _FilesBreadCrumbs()
215 files_breadcrumbs = _FilesBreadCrumbs()
216 class CodeHtmlFormatter(HtmlFormatter):
216
217
218 def wrap(self, source, outfile):
219 return self._wrap_div(self._wrap_pre(self._wrap_code(source)))
220
221 def _wrap_code(self, source):
222 for cnt, it in enumerate(source, 1):
223 i, t = it
224 t = '<div id="#S-%s">%s</div>' % (cnt, t)
225 yield i, t
217 def pygmentize(filenode, **kwargs):
226 def pygmentize(filenode, **kwargs):
218 """
227 """
219 pygmentize function using pygments
228 pygmentize function using pygments
220 @param filenode:
229 @param filenode:
221 """
230 """
222 return literal(code_highlight(filenode.content,
231 return literal(code_highlight(filenode.content,
223 filenode.lexer, HtmlFormatter(**kwargs)))
232 filenode.lexer, CodeHtmlFormatter(**kwargs)))
224
233
225 def pygmentize_annotation(filenode, **kwargs):
234 def pygmentize_annotation(filenode, **kwargs):
226 """
235 """
@@ -22,10 +22,13 b' div.codeblock .code-header .commit{'
22 margin-left:25px;
22 margin-left:25px;
23 font-weight: normal;
23 font-weight: normal;
24 }
24 }
25
25 div.codeblock .code-body table{
26 div.codeblock .code-body table{
26 width: 0 !important;
27 width: 0 !important;
27 }
28 }
28
29 div.code-body {
30 background-color: #FFFFFF;
31 }
29 div.code-body pre .match{
32 div.code-body pre .match{
30 background-color: #FAFFA6;
33 background-color: #FAFFA6;
31 }
34 }
@@ -36,13 +39,10 b' div.code-body pre .break{'
36 display: block;
39 display: block;
37
40
38 }
41 }
39
40 div.annotatediv{
42 div.annotatediv{
41 margin-left:2px;
43 margin-left:2px;
42 margin-right:4px;
44 margin-right:4px;
43 }
45 }
44
45
46 .code-highlight {
46 .code-highlight {
47 padding: 0px;
47 padding: 0px;
48 margin-top: 5px;
48 margin-top: 5px;
@@ -55,7 +55,6 b' div.annotatediv{'
55 }
55 }
56 .linenos a { text-decoration: none; }
56 .linenos a { text-decoration: none; }
57
57
58
59 .code { display: block; }
58 .code { display: block; }
60 .code-highlight .hll { background-color: #ffffcc }
59 .code-highlight .hll { background-color: #ffffcc }
61 .code-highlight .c { color: #408080; font-style: italic } /* Comment */
60 .code-highlight .c { color: #408080; font-style: italic } /* Comment */
General Comments 0
You need to be logged in to leave comments. Login now