98a0ee228a
browser-specific CSS hack and looked crappy. Those elements that are still rounded are now implemented with nice smooth images instead. Also changed downloaded HTML generation to specify sans-serif for the font.
27 lines
550 B
Python
27 lines
550 B
Python
from Tags import Div
|
|
|
|
|
|
class Rounded_div( Div ):
|
|
def __init__( self, image_name, *args, **kwargs ):
|
|
# if no corners were specified, assumed all corners should be rounded
|
|
corners = kwargs.pop( "corners", [] )
|
|
if len( corners ) == 0:
|
|
corners = ( u"tl", u"tr", u"bl", u"br" )
|
|
|
|
div = Div(
|
|
*args,
|
|
**kwargs
|
|
)
|
|
|
|
for corner in corners:
|
|
div = Div(
|
|
div,
|
|
class_ = u"%s_%s" % ( image_name, corner ),
|
|
)
|
|
|
|
Div.__init__(
|
|
self,
|
|
div,
|
|
class_ = u"%s_color" % image_name,
|
|
)
|