Format a section with a heading.
(self, title, cls, contents, width=6,
prelude='', marginalia=None, gap=' ')
| 627 | ''' % (title, extras or ' ') |
| 628 | |
| 629 | def section(self, title, cls, contents, width=6, |
| 630 | prelude='', marginalia=None, gap=' '): |
| 631 | """Format a section with a heading.""" |
| 632 | if marginalia is None: |
| 633 | marginalia = '<span class="code">' + ' ' * width + '</span>' |
| 634 | result = '''<p> |
| 635 | <table class="section"> |
| 636 | <tr class="decor %s-decor heading-text"> |
| 637 | <td class="section-title" colspan=3> <br>%s</td></tr> |
| 638 | ''' % (cls, title) |
| 639 | if prelude: |
| 640 | result = result + ''' |
| 641 | <tr><td class="decor %s-decor" rowspan=2>%s</td> |
| 642 | <td class="decor %s-decor" colspan=2>%s</td></tr> |
| 643 | <tr><td>%s</td>''' % (cls, marginalia, cls, prelude, gap) |
| 644 | else: |
| 645 | result = result + ''' |
| 646 | <tr><td class="decor %s-decor">%s</td><td>%s</td>''' % (cls, marginalia, gap) |
| 647 | |
| 648 | return result + '\n<td class="singlecolumn">%s</td></tr></table>' % contents |
| 649 | |
| 650 | def bigsection(self, title, *args): |
| 651 | """Format a section with a big heading.""" |
no outgoing calls
no test coverage detected