Format a section with a heading.
(self, title, cls, contents, width=6,
prelude='', marginalia=None, gap=' ')
| 672 | ''' % (title, extras or ' ') |
| 673 | |
| 674 | def section(self, title, cls, contents, width=6, |
| 675 | prelude='', marginalia=None, gap=' '): |
| 676 | """Format a section with a heading.""" |
| 677 | if marginalia is None: |
| 678 | marginalia = '<span class="code">' + ' ' * width + '</span>' |
| 679 | result = '''<p> |
| 680 | <table class="section"> |
| 681 | <tr class="decor %s-decor heading-text"> |
| 682 | <td class="section-title" colspan=3> <br>%s</td></tr> |
| 683 | ''' % (cls, title) |
| 684 | if prelude: |
| 685 | result = result + ''' |
| 686 | <tr><td class="decor %s-decor" rowspan=2>%s</td> |
| 687 | <td class="decor %s-decor" colspan=2>%s</td></tr> |
| 688 | <tr><td>%s</td>''' % (cls, marginalia, cls, prelude, gap) |
| 689 | else: |
| 690 | result = result + ''' |
| 691 | <tr><td class="decor %s-decor">%s</td><td>%s</td>''' % (cls, marginalia, gap) |
| 692 | |
| 693 | return result + '\n<td class="singlecolumn">%s</td></tr></table>' % contents |
| 694 | |
| 695 | def bigsection(self, title, *args): |
| 696 | """Format a section with a big heading.""" |
no outgoing calls
no test coverage detected