Format a section with a heading.
(self, title, cls, contents, width=6,
prelude='', marginalia=None, gap=' ')
| 608 | ''' % (title, extras or ' ') |
| 609 | |
| 610 | def section(self, title, cls, contents, width=6, |
| 611 | prelude='', marginalia=None, gap=' '): |
| 612 | """Format a section with a heading.""" |
| 613 | if marginalia is None: |
| 614 | marginalia = '<span class="code">' + ' ' * width + '</span>' |
| 615 | result = '''<p> |
| 616 | <table class="section"> |
| 617 | <tr class="decor %s-decor heading-text"> |
| 618 | <td class="section-title" colspan=3> <br>%s</td></tr> |
| 619 | ''' % (cls, title) |
| 620 | if prelude: |
| 621 | result = result + ''' |
| 622 | <tr><td class="decor %s-decor" rowspan=2>%s</td> |
| 623 | <td class="decor %s-decor" colspan=2>%s</td></tr> |
| 624 | <tr><td>%s</td>''' % (cls, marginalia, cls, prelude, gap) |
| 625 | else: |
| 626 | result = result + ''' |
| 627 | <tr><td class="decor %s-decor">%s</td><td>%s</td>''' % (cls, marginalia, gap) |
| 628 | |
| 629 | return result + '\n<td class="singlecolumn">%s</td></tr></table>' % contents |
| 630 | |
| 631 | def bigsection(self, title, *args): |
| 632 | """Format a section with a big heading.""" |
no outgoing calls
no test coverage detected