[svn r38213] Some small cleanups, made fonts a bit smaller and more consistent.
--HG-- branch : trunk
This commit is contained in:
		
							parent
							
								
									0f37c632ac
								
							
						
					
					
						commit
						999da7a376
					
				|  | @ -112,12 +112,13 @@ class H(html): | |||
|             super(H.SourceSnippet, self).__init__( | ||||
|                 link, H.div(*sourceels)) | ||||
|      | ||||
|     class SourceDef(html.div): | ||||
|     class PythonSource(Content): | ||||
|         style = html.Style(font_size='0.8em') | ||||
|         def __init__(self, *sourceels): | ||||
|             super(H.SourceDef, self).__init__( | ||||
|             super(H.PythonSource, self).__init__( | ||||
|                 H.div(*sourceels)) | ||||
| 
 | ||||
|     class SourceCode(html.div): | ||||
|     class SourceBlock(html.div): | ||||
|         style = html.Style(margin_top='1em', margin_bottom='1em') | ||||
|         def __init__(self): | ||||
|             self.linenotable = lntable = H.table(style='float: left') | ||||
|  | @ -128,7 +129,7 @@ class H(html): | |||
|             self.linetbody = ltbody = H.tbody() | ||||
|             ltable.append(ltbody) | ||||
|              | ||||
|             super(H.SourceCode, self).__init__(lntable, ltable) | ||||
|             super(H.SourceBlock, self).__init__(lntable, ltable) | ||||
| 
 | ||||
|         def add_line(self, lineno, els): | ||||
|             if els == []: | ||||
|  | @ -136,10 +137,11 @@ class H(html): | |||
|             self.linenotbody.append(H.tr(H.td(lineno, class_='lineno'))) | ||||
|             self.linetbody.append(H.tr(H.td(class_='code', *els))) | ||||
| 
 | ||||
|     class NonPythonSource(html.pre): | ||||
|         pass # style = html.Style(margin_left='15em') | ||||
|     class NonPythonSource(Content): | ||||
|         def __init__(self, *args): | ||||
|             super(H.NonPythonSource, self).__init__(H.pre(*args)) | ||||
| 
 | ||||
|     class DirList(html.div): | ||||
|     class DirList(Content): | ||||
|         def __init__(self, dirs, files): | ||||
|             dirs = [H.DirListItem(text, href) for (text, href) in dirs] | ||||
|             files = [H.DirListItem(text, href) for (text, href) in files] | ||||
|  |  | |||
|  | @ -124,7 +124,7 @@ def wrap_page(project, title, contentel, navel, relbase, basepath, | |||
|     return page | ||||
| 
 | ||||
| def enumerate_and_color(codelines, firstlineno, enc): | ||||
|     snippet = H.SourceCode() | ||||
|     snippet = H.SourceBlock() | ||||
|     tokenizer = source_color.Tokenizer(source_color.PythonSchema) | ||||
|     for i, line in enumerate(codelines): | ||||
|         try: | ||||
|  | @ -230,7 +230,7 @@ class SourcePageBuilder(AbstractPageBuilder): | |||
|         source = fspath.read() | ||||
|         sep = get_linesep(source) | ||||
|         colored = enumerate_and_color(source.split(sep), 0, enc) | ||||
|         tag = H.SourceDef(colored) | ||||
|         tag = H.PythonSource(colored) | ||||
|         nav = self.build_navigation(fspath) | ||||
|         return tag, nav | ||||
| 
 | ||||
|  | @ -597,7 +597,7 @@ class ApiPageBuilder(AbstractPageBuilder): | |||
|         return cslinks | ||||
| 
 | ||||
|     def build_callsite(self, dotted_name, call_site, index): | ||||
|         tbtag = self.gen_traceback(dotted_name, reversed(call_site)) | ||||
|         tbtag = H.Content(self.gen_traceback(dotted_name, reversed(call_site))) | ||||
|         parent_dotted_name, _ = split_of_last_part(dotted_name) | ||||
|         nav = self.build_navigation(parent_dotted_name, False) | ||||
|         id = 'callsite_%s_%s' % (dotted_name, index) | ||||
|  |  | |||
|  | @ -80,10 +80,6 @@ ul li { | |||
|   background-color: white; | ||||
| } | ||||
| 
 | ||||
| .property { | ||||
|   font-size: 1.2em; | ||||
| } | ||||
| 
 | ||||
| .callstackitem { | ||||
|   border: 1px solid black; | ||||
|   margin-bottom: 1em; | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue